Function at 0x5322f0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x340
mov eax, dword [0x6a5f90]
xor eax, ebp
mov dword [ebp - 8], eax
push 0
push 1
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_recv]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 1
je 0x53262c
cmp dword [ebp - 4], 0xffffffff
jne 0x5325e7
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
call fcn.00531f80
add esp, 4
test eax, eax
je 0x5325cb
mov dword [ebp - 0x32c], 0
xor edx, edx
mov dword [ebp - 0x328], edx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x32c], eax
mov eax, dword [ebp + 0x10]
xor edx, edx
mov ecx, 0x3e8
div ecx
imul edx, edx, 0x3e8
mov dword [ebp - 0x328], edx
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x330], 0
jmp 0x5323b8
mov edx, dword [ebp - 0x330]
add edx, 1
mov dword [ebp - 0x330], edx
mov eax, dword [ebp - 0x330]
cmp eax, dword [ebp - 0x320]
jae 0x5323dc
mov ecx, dword [ebp - 0x330]
mov edx, dword [ebp + ecx*4 - 0x31c]
cmp edx, dword [ebp + 8]
jne 0x5323da
jmp 0x5323dc
jmp 0x5323a9
mov eax, dword [ebp - 0x330]
cmp eax, dword [ebp - 0x320]
jne 0x532412
cmp dword [ebp - 0x320], 0x40
jae 0x532412
mov ecx, dword [ebp - 0x330]
mov edx, dword [ebp + 8]
mov dword [ebp + ecx*4 - 0x31c], edx
mov eax, dword [ebp - 0x320]
add eax, 1
mov dword [ebp - 0x320], eax
xor ecx, ecx
jne 0x53239d
mov dword [ebp - 0x334], 0
jmp 0x532431
mov edx, dword [ebp - 0x334]
add edx, 1
mov dword [ebp - 0x334], edx
mov eax, dword [ebp - 0x334]
cmp eax, dword [ebp - 0x218]
jae 0x532455
mov ecx, dword [ebp - 0x334]
mov edx, dword [ebp + ecx*4 - 0x214]
cmp edx, dword [ebp + 8]
jne 0x532453
jmp 0x532455
jmp 0x532422
mov eax, dword [ebp - 0x334]
cmp eax, dword [ebp - 0x218]
jne 0x53248b
cmp dword [ebp - 0x218], 0x40
jae 0x53248b
mov ecx, dword [ebp - 0x334]
mov edx, dword [ebp + 8]
mov dword [ebp + ecx*4 - 0x214], edx
mov eax, dword [ebp - 0x218]
add eax, 1
mov dword [ebp - 0x218], eax
xor ecx, ecx
jne 0x532416
lea edx, [ebp - 0x32c]
push edx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x320]
push edx
mov eax, dword [ebp + 8]
add eax, 1
push eax
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x324], eax
cmp dword [ebp - 0x324], 0
jle 0x532564
lea ecx, [ebp - 0x320]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x5324e6
jmp 0x532303
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x53251f
mov edx, dword [ebp + 8]
push edx
call fcn.00532280
add esp, 4
push eax
push str.Exception_on_socket_fd:_Read_failed__SO_ERROR_d
mov eax, dword [ebp + 0x14]
push eax
call fcn.00531d60
add esp, 0xc
jmp 0x53262c
cmp dword [ebp + 0x14], 0
je 0x532553
mov ecx, dword [ebp + 0x14]
cmp dword [ecx + 8], 0
je 0x532553
push 0x13d
push str.Select_on_socket_fd_returned_no_data
push 0xd
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 8]
call edx
add esp, 0x10
mov dword [ebp - 0x338], eax
jmp 0x53255d
mov dword [ebp - 0x338], 0xd
jmp 0x53262c
cmp dword [ebp - 0x324], 0
jne 0x5325af
cmp dword [ebp + 0x14], 0
je 0x5325a1
mov eax, dword [ebp + 0x14]
cmp dword [eax + 8], 0
je 0x5325a1
push 0x144
push str.Timed_out_waiting_for_socket_to_have_data
push 0xd
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 8]
call ecx
add esp, 0x10
mov dword [ebp - 0x33c], eax
jmp 0x5325ab
mov dword [ebp - 0x33c], 0xd
jmp 0x53262c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.Select_on_socket_fd_failed_with_error:__d
mov edx, dword [ebp + 0x14]
push edx
call fcn.00531d60
add esp, 0xc
jmp 0x53262c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.Recv_on_socket_fd_failed_with_error:__d
mov eax, dword [ebp + 0x14]
push eax
call fcn.00531d60
add esp, 0xc
jmp 0x53262c
cmp dword [ebp + 0x14], 0
je 0x53261b
mov ecx, dword [ebp + 0x14]
cmp dword [ecx + 8], 0
je 0x53261b
push 0x158
push str.Read_on_the_socket_fd_was_terminated_by_the_server_disconnecting
push 0xd
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 8]
call edx
add esp, 0x10
mov dword [ebp - 0x340], eax
jmp 0x532625
mov dword [ebp - 0x340], 0xd
jmp 0x53262c
xor eax, eax
cmp dword [ebp - 4], 1
sete al
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005327db
mov esp, ebp
pop ebp
ret