开发者

dll injection war3

I have ths code:

    __asm
    {
     PUSHAD
     MOV        EAX, DWORD PTR DS:[hStorm_LOBBYPTR]
     TEST       EAX, EAX
     JE         nick_false
     MOV        ECX, DWORD PTR DS:[EAX+0xC464]
     TEST       ECX, ECX
     JE         nick_false
     MOV        EAX, DWORD PTR DS:[ECX+0x170+0xB0]
     TEST       EAX, EAX
     JE         nick_false
     MOV        EDX, i
     MOV        ECX, DWORD PTR DS:[EAX+EDX*4]
     MOV        EAX, DWORD PTR DS:[ECX+0x1A0]
     MOV        ECX, DWORD PTR DS:[EAX+0x1E4]
     MOV        EAX, DWORD PTR DS:[ECX+0x1E4]
     MOV        ECX, DWORD PTR DS:[EAX+0x1E8]
     MOV    开发者_如何学JAVA    tempdw, ECX
     POPAD
     JMP        nick_true

nick_false:
     XOR        EAX, EAX
     MOV        tempdw, EAX
     POPAD
    }

nick_true:
        /* do check if tempdw is NULL and then proceed with your stuff */
  1. How can I wrap it into DLL (Visual Studio C++ 2008)?
  2. After that, I need to inject the DLL into some process and then retrieve tempdw, how can I do that?


you'll need to warp that in a normal C func, however, judging by the labels, it won't be a naked func:

void MyHook()
{
    __asm
   {
     //asm here
   }

nick_true:
    //the other stuff
}

this then needs to be put into a basic dll project that writes the needed hooks using WriteProcessMemory (nothing more than that can be given as there isn't enough info). To inject it, you can use RemoteDll or edit the launcher from w3l

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜