.text:0058B47E push eax ; buf
.text:0058B47F push ecx ; s
.text:0058B480 call ds:recv ; recv pops its own arguments from the stack
.text:0058B486 mov ebx, eax
.text:0058B488 test ebx, ebx
.text:0058B48A mov [ebp+var_8], ebx
.text:0058B48D jge short loc_58B49E
.text:0058B48F call ds:WSAGetLastError
I don't get this.
Specifically, what I don't get, is this:
.text:0058B486 mov ebx, eax
.text:0058B488 test ebx, ebx
.text:0058B48D jge short loc_58B49E
You're testing ebx against itself. WOULDN'T IT ALWAYS BE EQUAL?!?
And why does no documentation I find about AND say what flags are set? Why would AND set the overflow flag? I mean, seriously?