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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x380
mov eax, dword [0x51df40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x260], eax
mov al, 1
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x24c], 0
mov byte [ebp - 5], 0
mov byte [ebp - 0x22d], al
push edi
test esi, esi
je 0x4583f5
cmp dword [esi], 0
jl 0x4583f5
mov edi, dword [ebp + 0xc]
cmp byte [edi], 0x5f
je 0x458408
push str.only_service_queries_currently_supported
call fcn.00457a20
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x458419
call fcn.00457a60
add ebx, eax
mov dword [ebp + 0x14], ebx
push 0x8000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x244], eax
test eax, eax
je 0x4583f5
mov eax, dword [esi]
push str.Entering_main_loop_n
mov dword [ebp - 0x37c], eax
mov dword [ebp - 0x380], 1
call fcn.00457a20
add esp, 4
mov dword [esi + 0xc], edi
lea eax, [esi + 0xc]
mov dword [esi + 4], 1
mov dword [ebp - 0x23c], eax
call fcn.00457a60
mov dword [ebp - 0x234], eax
nop
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0xc350
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov edi, eax
mov ecx, edx
mov ebx, 0x1a9fbe77
mov dword [ebp - 0x238], edi
mul ebx
mov eax, edi
mov dword [ebp - 0x248], ecx
mov esi, edx
mov edx, 0x624dd2f
mul edx
mov edi, eax
mov dword [ebp - 0x258], edx
mov eax, ecx
mul ebx
mov ecx, eax
mov ebx, edx
mov eax, dword [ebp - 0x248]
mov edx, 0x624dd2f
mul edx
add ecx, esi
mov dword [ebp - 0x250], eax
adc ebx, 0
add edi, ecx
mov ecx, dword [ebp - 0x258]
adc ecx, 0
xor eax, eax
add ebx, ecx
mov ecx, dword [ebp - 0x250]
adc eax, eax
add ecx, ebx
mov ebx, dword [ebp - 0x238]
adc edx, eax
mov eax, dword [ebp - 0x248]
sub ebx, ecx
sbb eax, edx
shrd ebx, eax, 1
shr eax, 1
add ebx, ecx
adc eax, edx
shrd ebx, eax, 9
mov dword [ebp - 0x238], ebx
cmp ebx, dword [ebp - 0x234]
jb 0x458589
mov eax, ebx
sub eax, dword [ebp - 0x24c]
cmp eax, 1
jbe 0x458589
mov esi, dword [ebp - 0x23c]
lea eax, [ebx + 0x78]
mov dword [ebp - 0x234], eax
lea eax, [ebp - 0x234]
push ebx
push eax
push esi
call fcn.00459550
mov ecx, dword [ebp - 0x240]
add esp, 0xc
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x458572
cmp dword [ecx + 0x14], 0
je 0x458572
cmp dword [eax + 4], 1
jne 0x45856a
cmp ebx, dword [eax + 0x18]
jae 0x458572
cmp ebx, dword [eax + 0xc]
jae 0x458572
cmp ebx, dword [eax + 0x24]
jae 0x458572
mov eax, dword [eax]
test eax, eax
jne 0x458555
jmp 0x458589
push dword [ebp + 0x10]
push 0xc
push dword [esi]
push dword [ecx]
call fcn.004589d0
add esp, 0x10
mov dword [ebp - 0x24c], ebx
mov ecx, 0x41
lea esi, [ebp - 0x380]
lea edi, [ebp - 0x21c]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x14]
mov ecx, 0x41
push eax
lea esi, [ebp - 0x380]
lea edi, [ebp - 0x118]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x240]
lea eax, [ebp - 0x118]
push eax
push 0
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [esi]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp dword [esi + 4], 0
mov edi, eax
je 0x4587dc
mov eax, dword [esi + 8]
cmp eax, 2
je 0x4587dc
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4585fa
cmp ebx, ecx
ja 0x4587dc
cmp eax, 1
jne 0x458618
lea eax, [esi + 0xc]
push eax
call fcn.00457950
add esp, 4
mov dword [esi + 8], 0
mov dword [ebp - 0x234], ebx
test edi, edi
js 0x458856
je 0x458470
lea eax, [ebp - 0x118]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x458840
push str.Receiving_data_n
call fcn.00457a20
add esp, 4
mov dword [ebp - 0xc], 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0
push 0x8000
push dword [ebp - 0x244]
push dword [esi]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
test edi, edi
js 0x45882a
jne 0x458690
push str.unknown_error
mov byte [ebp - 0x22d], 0
call fcn.00457a20
add esp, 4
push dword [ebp - 0x228]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push edi
push str.Received__u_bytes_from__s_n
call fcn.00457a20
push str.Attempting_to_parse_received_data_n
xor esi, esi
call fcn.00457a20
mov ebx, dword [ebp - 0x23c]
add esp, 0x10
nop dword [eax]
lea eax, [ebp - 0x27c]
push eax
mov eax, dword [ebp - 0x244]
push edi
add eax, esi
push eax
push ebx
push dword [ebp - 0x228]
call fcn.00457ae0
add esp, 0x14
test eax, eax
jle 0x4586f9
add esi, eax
push edi
push esi
push str.__Parsed__u_bytes_of__u_received_bytes_n
call fcn.00457a20
add esp, 0xc
cmp esi, edi
jl 0x4586c0
mov esi, dword [ebp - 0x25c]
test esi, esi
setne al
movzx eax, al
push eax
push ebx
call fcn.00459140
mov edi, dword [ebp - 0x238]
mov ebx, eax
push edi
lea eax, [edi + 0x78]
mov dword [ebp - 0x234], eax
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x23c]
call fcn.00459550
add esp, 0x14
test esi, esi
je 0x4587cc
lea eax, [ebp - 5]
push eax
push dword [ebp - 0x260]
push ebx
call esi
add esp, 0xc
test al, al
jne 0x4587cc
test ebx, ebx
je 0x4587cc
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop dword [eax + eax]
mov eax, dword [ebx]
push dword [ebx + 8]
mov dword [ebp - 0x250], eax
call esi
push dword [ebx + 0xc]
call esi
xor esi, esi
add esp, 8
cmp dword [ebx + 0x24], esi
jle 0x4587af
nop dword [eax]
mov eax, dword [ebx + 0x20]
mov eax, dword [eax + esi*8]
test eax, eax
je 0x458794
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebx + 0x20]
mov eax, dword [eax + esi*8 + 4]
test eax, eax
je 0x4587a9
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
inc esi
cmp esi, dword [ebx + 0x24]
jl 0x458780
push dword [ebx + 0x20]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push ebx
call esi
mov eax, dword [ebp - 0x250]
add esp, 8
mov ebx, eax
test eax, eax
jne 0x458760
cmp byte [ebp - 5], 0
je 0x458470
mov esi, dword [ebp - 0x240]
push dword [ebp - 0x244]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ebx
add esp, 4
cmp dword [esi + 4], 0
jne 0x45886f
lea eax, [esi + 0xc]
push eax
call fcn.00457950
add esp, 4
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
mov dword [esi], 0xffffffff
call ebx
mov al, byte [ebp - 0x22d]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push str.error_receiving
mov byte [ebp - 0x22d], 0
call fcn.00457a20
add esp, 4
jmp 0x4587dc
push str.exception_on_socket
mov byte [ebp - 0x22d], 0
call fcn.00457a20
add esp, 4
jmp 0x4587dc
push str.Select_error_n
mov byte [ebp - 0x22d], 0
call fcn.00457a20
add esp, 4
jmp 0x4587dc
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x22d]
xor ecx, ebp
pop edi
mov dword [esi + 8], 0
mov dword [esi + 4], 0
pop esi
pop ebx
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret