Function at 0x401740
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
cmp dword [eax + 8], 0
jne 0x401759
xor al, al
jmp 0x401933
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x10], 0
jne 0x401769
xor al, al
jmp 0x401933
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
push eax
push 0
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 8]
push edx
call sub.MSVCR71.dll_memset
add esp, 0xc
mov dword [ebp - 0x34], 0
mov dword [ebp - 8], 0
push 0x14
push 0
lea eax, [ebp - 0x30]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4017cc
mov ecx, dword [ebp - 0x38]
call fcn.004014d0
xor al, al
jmp 0x401933
mov ecx, 1
test ecx, ecx
je 0x401921
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
push 0
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x34]
push ecx
push 1
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x401840
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x401837
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x38]
call fcn.004014d0
xor al, al
jmp 0x401933
mov dword [ebp - 0x10], 1
jmp 0x401847
mov dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0
je 0x40191c
push 0
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0xc]
imul ecx, ecx, 0x3e8
push ecx
push 0
lea edx, [ebp - 0x20]
push edx
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x401880
cmp dword [ebp - 4], 0x102
jne 0x401899
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x38]
call fcn.004014d0
xor al, al
jmp 0x401933
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
lea edx, [ebp - 0x1c]
push edx
push 0
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
jne 0x4018d8
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x38]
call fcn.004014d0
xor al, al
jmp 0x401933
cmp dword [ebp - 0x34], 0
ja 0x4018f4
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x38]
call fcn.004014d0
xor al, al
jmp 0x401933
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x34]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x34]
mov dword [ebp - 0x18], ecx
je 0x401911
cmp dword [ebp - 0x18], 0x7fffffff
jbe 0x401913
jmp 0x401921
mov edx, dword [ebp - 0x14]
add edx, dword [ebp - 0x34]
mov dword [ebp - 0x14], edx
jmp 0x4017cc
cmp dword [ebp - 0x20], 0
je 0x401931
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov al, 1
mov esp, ebp
pop ebp
ret 4