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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
push 0
push 1
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 1
je 0x406772
cmp dword [ebp - 4], 0xffffffff
jne 0x40672d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00406090
add esp, 4
test eax, eax
je 0x406711
mov dword [ebp - 0x334], 0
xor edx, edx
mov dword [ebp - 0x330], edx
mov dword [ebp - 0x114], 0x2ee
mov eax, dword [ebp - 0x114]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x334], eax
mov eax, dword [ebp - 0x114]
xor edx, edx
mov ecx, 0x3e8
div ecx
imul edx, edx, 0x3e8
mov dword [ebp - 0x330], edx
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x338], 0
jmp 0x4064fe
mov edx, dword [ebp - 0x338]
add edx, 1
mov dword [ebp - 0x338], edx
mov eax, dword [ebp - 0x338]
cmp eax, dword [ebp - 0x328]
jae 0x406522
mov ecx, dword [ebp - 0x338]
mov edx, dword [ebp + ecx*4 - 0x324]
cmp edx, dword [ebp + 8]
jne 0x406520
jmp 0x406522
jmp 0x4064ef
mov eax, dword [ebp - 0x338]
cmp eax, dword [ebp - 0x328]
jne 0x406558
cmp dword [ebp - 0x328], 0x40
jae 0x406558
mov ecx, dword [ebp - 0x338]
mov edx, dword [ebp + 8]
mov dword [ebp + ecx*4 - 0x324], edx
mov eax, dword [ebp - 0x328]
add eax, 1
mov dword [ebp - 0x328], eax
xor ecx, ecx
jne 0x4064e3
mov dword [ebp - 0x33c], 0
jmp 0x406577
mov edx, dword [ebp - 0x33c]
add edx, 1
mov dword [ebp - 0x33c], edx
mov eax, dword [ebp - 0x33c]
cmp eax, dword [ebp - 0x220]
jae 0x40659b
mov ecx, dword [ebp - 0x33c]
mov edx, dword [ebp + ecx*4 - 0x21c]
cmp edx, dword [ebp + 8]
jne 0x406599
jmp 0x40659b
jmp 0x406568
mov eax, dword [ebp - 0x33c]
cmp eax, dword [ebp - 0x220]
jne 0x4065d1
cmp dword [ebp - 0x220], 0x40
jae 0x4065d1
mov ecx, dword [ebp - 0x33c]
mov edx, dword [ebp + 8]
mov dword [ebp + ecx*4 - 0x21c], edx
mov eax, dword [ebp - 0x220]
add eax, 1
mov dword [ebp - 0x220], eax
xor ecx, ecx
jne 0x40655c
lea edx, [ebp - 0x334]
push edx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x328]
push edx
mov eax, dword [ebp + 8]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x32c], eax
cmp dword [ebp - 0x32c], 0
jle 0x4066aa
lea ecx, [ebp - 0x328]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40662c
jmp 0x406439
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x406665
mov edx, dword [ebp + 8]
push edx
call fcn.00406380
add esp, 4
push eax
push str.Exception_on_socket_fd:_Read_failed__SO_ERROR_d
mov eax, dword [ebp + 0x10]
push eax
call fcn.00405fa0
add esp, 0xc
jmp 0x406772
cmp dword [ebp + 0x10], 0
je 0x406699
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 8], 0
je 0x406699
push 0x16b
push str.Select_on_socket_fd_returned_no_data
push 9
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 8]
call edx
add esp, 0x10
mov dword [ebp - 0x340], eax
jmp 0x4066a3
mov dword [ebp - 0x340], 9
jmp 0x406772
cmp dword [ebp - 0x32c], 0
jne 0x4066f5
cmp dword [ebp + 0x10], 0
je 0x4066e7
mov eax, dword [ebp + 0x10]
cmp dword [eax + 8], 0
je 0x4066e7
push 0x172
push str.Timed_out_waiting_for_socket_to_have_data
push 9
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 8]
call ecx
add esp, 0x10
mov dword [ebp - 0x344], eax
jmp 0x4066f1
mov dword [ebp - 0x344], 9
jmp 0x406772
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Select_on_socket_fd_failed_with_error:__d
mov edx, dword [ebp + 0x10]
push edx
call fcn.00405fa0
add esp, 0xc
jmp 0x406772
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Recv_on_socket_fd_failed_with_error:__d
mov eax, dword [ebp + 0x10]
push eax
call fcn.00405fa0
add esp, 0xc
jmp 0x406772
cmp dword [ebp + 0x10], 0
je 0x406761
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 8], 0
je 0x406761
push 0x186
push str.Read_on_the_socket_fd_was_terminated_by_the_server_disconnecting
push 9
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 8]
call edx
add esp, 0x10
mov dword [ebp - 0x348], eax
jmp 0x40676b
mov dword [ebp - 0x348], 9
jmp 0x406772
xor eax, eax
cmp dword [ebp - 4], 1
sete al
mov esp, ebp
pop ebp
ret