In main thread:
Code:
RealRecv = (RecvPtr)GetProcAddress(GetModuleHandle(L"ws2_32.dll"), "recv"); RealRecv = (RecvPtr)Detour((BYTE*)RealRecv, (BYTE*)&OurRecv, 5);
Code:
INT WINAPI OurRecv(SOCKET sock, CHAR* buf, INT len, INT flags)
{
cout << "Received: ";
for(int i=0;i<strlen(buf);i++)
cout << hex << static_cast<WORD>(buf[i]) << ' ';
cout << '\n';
return RealRecv(sock, buf, len, flags);
}
So is the game using some alternative function to recv data? Even that i know asm i don't know how to use olly so it can be useful. Tried to set a bp on loadlibrary in engine so i can look when ehsvc.dll is loaded or doing the same with recv but i guess i was doing something wrong because i failed
Any idea how to solve the problem?






