you can check Angelius bot project. he hook the CNetwork class.
[Only registered and activated users can see links. Click Here To Register...]
this for last version:
Code:
BYTE pattern[] = { 0x51,0x50,0xB9,0x00,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x00,0x5E,0xC3,0x6A,0x04 };
bool wildcards[] = { 0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0 };
PBYTE match = (PBYTE)Scan::FindMemoryPattern(pattern, wildcards, sizeof(wildcards));
match += 2;
// PrintDebugHex("CNetworkmatch: ", (DWORD)match);
DWORD callDstInter;
ReadProcessMemory(GetCurrentProcess(), (LPVOID)(match +1), &callDstInter, sizeof(callDstInter), NULL);//match + 1 for call
NetwordAddress = callDstInter;
Code:
BYTE pattern[] = { 0x6A,0x0C,0xB8,0x00,0x00,0x00,0x00,0xE8,0x00,0x00,0x00,0x00,0x8B,0xF1,0x89,0x75,0xE8,0x33,0xDB,0x39,0x5E,0x18 };
bool wildcards[] = { 0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0 };
PBYTE match = (PBYTE)Scan::FindMemoryPattern(pattern, wildcards, sizeof(wildcards));
//PrintDebugHex("CNetworkSend: ", (DWORD)match);
SendPacketAddress = (DWORD)match;
Code:
static void SendToServer(const char* msg, int len)
{
__asm
{
push len
PUSH DWORD PTR DS:[msg]
MOV ECX, NetwordAddress
CALL SendPacketAddress
}
}
Special Thanks to Angelius .