Hello, I got an application that uses WSARecv() to receive packets and I have read a tip given by aluigi (
post5711.html) about finding out decryption routines.
Problem is, when I break on this api and the application receives some data, after I run til return using CTRL+F9 I don't see any data inside the receive buffer. What I suspect is that the application is using the message loop to get the content of the buffer another time or something like that.
I made a pseudo-code which looks like the application I' debugging. Oh and this application uses only one call to WSARecv(), there is no other references to it.
Code:
int MyRecv()
{
WSABUF buffer;
DWORD dwNumberOfBytesRecvd;
DWORD dwFlags;
WSAOVERLAPPED wsaover;
dwFlags = 0;
ZeroMemory(&wsaover, sizeof(WSAOVERLAPPED));
int ret = WSARecv( s, &buffer, 1, &dwNumberOfBytesRecvd, &dwFlags, &wsaover, NULL );
if( ret == SOCKET_ERROR && WSAGetLastError() != WSA_IO_PENDING )
{
return 0;
}
return 1;
}
Any ideas on how I could get the data?