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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
add eax, 0x4f
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
mov eax, dword [ecx + 4]
sub eax, dword [edx]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
xor ecx, ecx
mov dword [ebp - 0xc], ecx
xor edx, edx
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2b]
movzx edx, word [ecx + 0x18]
mov dword [ebp - 0x28], edx
mov eax, dword [0x42f5cc]
and eax, 1
je 0x40ccb0
push str.soread
push 0x426f78
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414be4
add esp, 0xc
mov edx, dword [0x42f5c8]
push edx
call fcn.00414b88
add esp, 4
mov eax, dword [0x42f5cc]
and eax, 1
je 0x40cd02
mov ecx, dword [0x42f5c8]
push ecx
push 0x20
call fcn.00415811
add esp, 8
mov edx, dword [ebp + 8]
push edx
push 0x426f80
mov eax, dword [0x42f5c8]
push eax
call fcn.00414be4
add esp, 0xc
mov ecx, dword [0x42f5c8]
push ecx
push 0xa
call fcn.00415811
add esp, 8
mov edx, dword [0x42f5c8]
push edx
call fcn.00414b88
add esp, 4
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
mov edx, dword [eax + 4]
sub edx, dword [ecx]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
mov ecx, dword [edx + 8]
cmp ecx, dword [eax + 0xc]
jae 0x40cd68
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
mov ecx, dword [edx + 0xc]
sub ecx, dword [eax + 8]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x20]
jbe 0x40cd44
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x28]
jbe 0x40cd5c
mov eax, dword [ebp - 0xc]
xor edx, edx
div dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
sub eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], 1
jmp 0x40ce34
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x10]
mov eax, dword [ebp - 0x18]
add edx, dword [eax + 4]
mov ecx, dword [ebp - 0x18]
sub edx, dword [ecx + 8]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x20]
jbe 0x40cd8b
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 0x20], ecx
je 0x40ce15
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x10]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
mov eax, dword [ecx + 0xc]
sub eax, dword [edx + 0x10]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x20]
jbe 0x40cdbc
mov edx, dword [ebp - 0x20]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 4]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x28]
jle 0x40ce0c
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 0x28]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x2c]
jbe 0x40cdf1
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 2
jmp 0x40ce0a
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x2c]
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], 1
jmp 0x40ce13
mov dword [ebp - 0x14], 2
jmp 0x40ce34
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x28]
jbe 0x40ce2d
mov eax, dword [ebp - 0xc]
xor edx, edx
div dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
sub ecx, edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], 1
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jg 0x40cee7
cmp dword [ebp - 0x1c], 0
jge 0x40ce7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 4
je 0x40ce74
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
jne 0x40ce7d
xor eax, eax
jmp 0x40cf94
mov eax, dword [0x42f5cc]
and eax, 2
je 0x40cec4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041528e
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push str._____soread___disconnected__nn___d__errno___d__s_n
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0x14
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040e220
add esp, 4
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2b]
push eax
call fcn.00411e80
add esp, 4
or eax, 0xffffffff
jmp 0x40cf94
cmp dword [ebp - 0x14], 2
jne 0x40cf1e
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0xc]
jne 0x40cf1e
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jle 0x40cf1e
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
mov ecx, dword [0x42f5cc]
and ecx, 2
je 0x40cf4f
mov edx, dword [ebp - 0x1c]
push edx
push str._..._read_nn___d_bytes_n
mov eax, dword [0x42f5c8]
push eax
call fcn.00414be4
add esp, 0xc
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp - 0x18]
add eax, dword [ecx + 4]
mov edx, dword [ebp - 0x18]
cmp dword [edx + 8], eax
jb 0x40cf91
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
mov edx, dword [eax + 8]
sub edx, dword [ecx + 4]
mov eax, dword [ebp - 0x18]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret