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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x1c]
call fcn.00401bf0
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
cmp dword [ebp - 4], 0
jne 0x40189b
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.00401820
jmp 0x401a38
mov edx, dword [ebp - 4]
cmp dword [edx + 0x24], 0
jbe 0x4018c6
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
push ecx
push 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2c]
push eax
call fcn.00410a90
add esp, 0xc
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x24], 0
mov edx, dword [ebp - 4]
cmp dword [edx + 0x18], 0
jbe 0x40191a
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x2c]
push edx
call fcn.00410750
add esp, 0xc
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x24], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
push ecx
push 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x20]
push eax
call fcn.00410a90
add esp, 0xc
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x18], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2c]
mov ecx, dword [ebp - 4]
add eax, dword [ecx + 0x24]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 0x28]
sub ecx, dword [eax + 0x24]
mov dword [ebp - 8], ecx
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WS2_32.dll_recv
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x401971
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x401971
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x1c]
call fcn.00401820
jmp 0x401a38
cmp dword [ebp - 0x14], 0
jle 0x401986
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov dword [edx + 0x24], ecx
cmp dword [ebp - 0x14], 0
jg 0x40191a
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x24]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0
cmp dword [ebp - 8], 4
jb 0x401a06
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
movzx eax, word [edx]
cmp eax, 4
jae 0x4019cd
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.00401820
jmp 0x401a38
mov edx, dword [ebp - 0x18]
movzx eax, word [edx]
cmp dword [ebp - 8], eax
jge 0x4019da
jmp 0x401a06
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x1c]
call fcn.00401a40
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
mov edx, dword [ebp - 8]
sub edx, ecx
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0xc], ecx
jmp 0x4019a5
cmp dword [ebp - 8], 0
jle 0x401a38
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2c]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x20]
push ecx
call fcn.00410750
add esp, 0xc
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov dword [edx + 0x18], eax
mov esp, ebp
pop ebp
ret 4