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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14c
mov ebx, eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [eax], esi
mov eax, dword [ebx + 4]
test eax, eax
je 0x56f977
mov edi, edx
mov esi, ecx
mov edx, 0xfffffffd
test ecx, ecx
je 0x56f986
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x11c], 1
xor ecx, ecx
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x120], 0x1f4
lea edx, [ebp - 0x124]
mov dword [esp + 0x10], edx
xor edx, edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
lea ecx, [ebp - 0x11c]
mov dword [esp + 4], ecx
inc eax
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
mov edx, eax
cmp eax, 0xffffffff
lea ecx, [ebp - 0x11c]
jne 0x56f6da
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebx
cmp eax, 9
je 0x56f76d
cmp eax, 0xb
je 0x56f763
cmp eax, 4
je 0x56f79a
jmp 0x56f7cf
test eax, eax
je 0x56f802
mov dword [ebp - 0x12c], eax
mov dword [esp + 4], ecx
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
push edx
push edx
test eax, eax
mov edx, dword [ebp - 0x12c]
je 0x56f802
mov eax, dword [ebx + 4]
bt dword [ebx], 0xe
jae 0x56f834
lea edx, [ebx + 0x18]
mov dword [esp + 0x14], edx
add ebx, 8
mov dword [esp + 0x10], ebx
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_recvfrom]
sub esp, 0x18
cmp eax, 0xffffffff
jne 0x56f966
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x6c
je 0x56f8e6
jg 0x56f869
cmp eax, 0xb
jne 0x56f85b
mov edx, 0xffffffd3
jmp 0x56f986
cmp dword [0x5af054], 1
jbe 0x56f8dc
mov dword [0x611418], 2
mov dword [0x611414], 3
mov dword [esp], str._socket__cannot_select__BAD_descriptor_n
jmp 0x56f8d7
cmp dword [0x5af054], 1
ja 0x56f7ad
mov edx, 0xffffffd4
jmp 0x56f986
mov dword [0x611418], 2
mov dword [0x611414], 3
mov dword [esp], str._socket__network_is_lost_n
call fcn.004268ea
jmp 0x56f7a3
cmp dword [0x5af054], 1
jbe 0x56f95f
mov dword [0x611418], 2
mov dword [0x611414], 3
call ebx
mov dword [esp + 4], eax
mov dword [esp], str._socket__cannot_select__error__d__n
jmp 0x56f95a
cmp dword [0x5af054], 3
jbe 0x56f7a3
mov dword [0x611418], 4
mov dword [0x611414], 3
mov dword [esp + 4], edx
mov dword [esp], str._socket__nothing_to_be_read___ready__d_n
call fcn.004268ea
jmp 0x56f7a3
xor edx, edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_recv]
sub esp, 0x10
test eax, eax
jne 0x56f97c
jmp 0x56f8dc
cmp eax, 0x6a
je 0x56f90c
jmp 0x56f932
cmp eax, 0x73
je 0x56f878
cmp eax, 0x7e
je 0x56f8b3
jmp 0x56f932
cmp dword [0x5af054], 0
je 0x56f8a9
mov dword [0x611418], 1
mov dword [0x611414], 3
mov dword [esp + 4], 0x73
mov dword [esp], str._socket__error_reading___socket_error__d_n
call fcn.004268ea
mov edx, 0xfffffffe
jmp 0x56f986
cmp dword [0x5af054], 0
je 0x56f8dc
mov dword [0x611418], 1
mov dword [0x611414], 3
mov dword [esp], str._socket__error_reading___not_connected_n
call fcn.004268ea
mov edx, 0xffffffd5
jmp 0x56f986
cmp dword [0x5af054], 0
je 0x56f8dc
mov dword [0x611418], 1
mov dword [0x611414], 3
mov dword [esp], str._socket__error_reading___connection_reset_n
jmp 0x56f8d7
cmp dword [0x5af054], 0
je 0x56f8dc
mov dword [0x611418], 1
mov dword [0x611414], 3
mov dword [esp], str._socket__error_reading___connection_aborted_n
jmp 0x56f8d7
cmp dword [0x5af054], 0
je 0x56f95f
mov dword [0x611418], 1
mov dword [0x611414], 3
mov dword [esp + 4], eax
mov dword [esp], str._socket__error_reading___socket_error__d_n
call fcn.004268ea
mov edx, 0xffffffd6
jmp 0x56f986
test eax, eax
je 0x56f7a3
mov edi, dword [ebp + 8]
mov dword [edi], eax
xor edx, edx
jmp 0x56f986
or edx, 0xffffffff
jmp 0x56f986
cmp eax, 0xffffffff
jne 0x56f96e
jmp 0x56f745
mov eax, edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret