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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x540
mov eax, dword [0x4d4664]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
push ebx
push edi
xor edi, edi
mov dword [ebp - 0x520], eax
mov dword [ebp - 0x530], ecx
lea ebx, [ebp - 0x510]
test eax, eax
je 0x40278d
test ecx, ecx
je 0x40278d
and dword [ebp - 0x514], edi
mov eax, ebx
mov dword [ebp - 0x51c], eax
xor eax, eax
mov dword [ebp - 0x528], eax
lea eax, [ebp - 0x524]
push esi
push eax
mov dword [ebp - 0x518], 8
xor esi, esi
call fcn.00489035
pop ecx
lea eax, [ebp - 0x52c]
push eax
call fcn.00489035
pop ecx
cmp dword [ebp + 0xc], esi
jle 0x40250d
mov eax, dword [ebp - 0x52c]
sub eax, dword [ebp - 0x524]
cmp eax, dword [ebp + 0xc]
jg 0x402702
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x104], eax
lea eax, [ebp - 0x540]
push eax
push ecx
push ecx
lea eax, [ebp - 0x108]
mov dword [ebp - 0x53c], ecx
push eax
push ecx
mov dword [ebp - 0x540], 2
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x534], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, dword [ebp - 0x534]
cmp eax, 0xffffffff
jne 0x40256a
cmp ecx, 0x2733
jne 0x4025c5
cmp eax, 1
jne 0x40269b
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40269b
mov eax, dword [ebp - 0x518]
sub eax, dword [ebp - 0x514]
push 0
push eax
mov eax, dword [ebp - 0x51c]
add eax, dword [ebp - 0x514]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4025cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4026be
push 0xfffffffffffffff4
jmp 0x402704
test eax, eax
jle 0x402750
add dword [ebp - 0x514], eax
lea eax, [ebp - 0x524]
push eax
call fcn.00489035
pop ecx
cmp dword [ebp - 0x528], esi
jne 0x4026be
cmp dword [ebp - 0x514], 8
jl 0x4026be
cmp byte [ebx], 0x4a
jne 0x40274c
cmp byte [ebx + 1], 0x5e
jne 0x40274c
cmp byte [ebx + 2], 0x7a
jne 0x40274c
cmp byte [ebx + 3], 4
jne 0x40274c
movzx edi, byte [ebx + 4]
movzx eax, byte [ebx + 5]
shl edi, 8
or edi, eax
movzx eax, byte [ebx + 6]
shl edi, 8
or edi, eax
movzx eax, byte [ebx + 7]
shl edi, 8
or edi, eax
cmp edi, 0x400
jle 0x40268a
cmp edi, 0x2000000
jge 0x402748
lea eax, [edi + 8]
push eax
call fcn.004856fc
mov ebx, eax
pop ecx
test ebx, ebx
je 0x402744
push dword [ebp - 0x514]
lea eax, [ebp - 0x510]
mov dword [ebp - 0x51c], ebx
push eax
push ebx
call fcn.00480c10
add esp, 0xc
add dword [ebp - 0x518], edi
xor eax, eax
inc eax
mov dword [ebp - 0x528], eax
jmp 0x4026be
lea eax, [ebp - 0x538]
push eax
call fcn.00489035
mov eax, dword [ebp - 0x538]
pop ecx
cmp eax, dword [ebp - 0x52c]
jne 0x4026be
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x514]
cmp ecx, dword [ebp - 0x518]
jl 0x4024e6
lea eax, [edi + 8]
cmp ecx, eax
jl 0x402705
lea eax, [ebp - 0x510]
push edi
cmp ebx, eax
je 0x40275e
lea eax, [ebx + 8]
mov ebx, dword [ebp - 0x51c]
push eax
push ebx
call fcn.00482640
mov ecx, dword [ebp - 0x520]
add esp, 0xc
mov dword [ecx], ebx
jmp 0x402783
push 0xfffffffffffffff1
pop esi
lea eax, [ebp - 0x510]
cmp ebx, eax
je 0x402716
push ebx
call fcn.004856f7
pop ecx
mov eax, dword [ebp - 0x530]
mov ecx, dword [ebp - 0x520]
and dword [eax], 0
and dword [ecx], 0
mov eax, dword [ebp - 0x514]
test eax, eax
jle 0x40273f
push 0
push eax
push 2
call fcn.00402949
add esp, 0xc
mov eax, esi
pop esi
jmp 0x402790
push 0xfffffffffffffff5
jmp 0x402704
push 0xffffffffffffffed
jmp 0x402704
push 0xfffffffffffffff3
jmp 0x402704
mov esi, eax
neg esi
sbb esi, esi
and esi, 0xffffffa9
add esi, 0xfffffff4
jmp 0x402705
call fcn.004856fc
pop ecx
mov ecx, dword [ebp - 0x520]
mov dword [ecx], eax
test eax, eax
je 0x402780
push edi
lea ecx, [ebx + 8]
push ecx
push eax
call fcn.00480c10
add esp, 0xc
jmp 0x402783
push 0xfffffffffffffff5
pop esi
mov eax, dword [ebp - 0x530]
mov dword [eax], edi
jmp 0x402728
push 0xfffffffffffffffd
pop eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0047f259
mov esp, ebp
pop ebp
ret