Guest User

Untitled

a guest
May 25th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. void CNetGame_SendPacketToPlayer( uint32_t netgame, RakNet::BitStream* bStream, uint16_t playerid )
  2. {
  3.     uint32_t unknown; // don't mind about it
  4.  
  5.     _asm
  6.     {
  7.         mov     esi, netgame
  8.         mov     ecx, [esi+0x3C]
  9.         mov     eax, [ecx]
  10.         push    edx
  11.         push    playerid                // playerid
  12.         lea     edx, unknown            // set the address of unknown on edx
  13.         push    edx
  14.         call    dword ptr [eax+0xE0]    // GetPlayerIDFromIndex
  15.         mov     ecx, [esi+0x3C]
  16.         mov     edx, [ecx]
  17.         mov     edi, [eax]              // Set PlayerID (the raknet one) on edi
  18.         mov     ax, [eax+4]
  19.         push    0                       // set the last parameter of RakServerInterface->Send to false
  20.         sub     esp, 8
  21.         mov     ecx, esp
  22.         push    1
  23.         mov     [ecx], edi
  24.         push    1
  25.         mov     [ecx+0x04], ax
  26.         mov     ecx, bStream
  27.         push    1
  28.         push    ecx
  29.         mov     ecx, [esi+0x3C]
  30.         call    dword ptr [edx+0x1C]
  31.     }
  32. }
Add Comment
Please, Sign In to add comment