Function at 0x472580
Capabilities:
Get socket status

Disassembly:
sub esp, 0x334
mov eax, dword [0x649ffc]
xor eax, esp
mov dword [esp + 0x330], eax
mov edx, dword [esp + 0x338]
mov dword [esp + 0x14], edx
push esi
test edx, edx
je 0x4725bc
mov esi, dword [esp + 0x340]
xor eax, eax
test esi, esi
je 0x4725bc
cmp dword [edx + eax*8], 0xffffffff
jne 0x47260a
inc eax
cmp eax, esi
jb 0x4725b1
mov ecx, dword [esp + 0x344]
mov eax, ecx
mov edx, dword [esp + 0x348]
or eax, edx
je 0x472977
test edx, edx
jg 0x472963
jl 0x4725e6
test ecx, ecx
jae 0x472958
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0056e987
add esp, 0x334
ret
push ebx
push ebp
push edi
xor ebx, ebx
mov dword [esp + 0x10], 0xffffffff
xor ebp, ebp
mov dword [esp + 0x34], ebx
xor edi, edi
mov dword [esp + 0x138], ebp
xor eax, eax
mov dword [esp + 0x23c], edi
mov dword [esp + 0x14], eax
xor ecx, ecx
mov word [edx + eax*8 + 6], cx
mov ecx, dword [edx + eax*8]
cmp ecx, 0xffffffff
je 0x47271d
jae 0x47275b
movzx edx, word [edx + eax*8 + 4]
test dl, 7
je 0x472719
cmp ecx, dword [esp + 0x10]
mov eax, ecx
cmovbe eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
test dl, 1
je 0x472695
xor eax, eax
test ebx, ebx
je 0x47267f
cmp dword [esp + eax*4 + 0x38], ecx
je 0x47267f
inc eax
cmp eax, ebx
jb 0x472674
cmp eax, ebx
jne 0x472695
cmp ebx, 0x40
jae 0x472695
mov dword [esp + eax*4 + 0x38], ecx
mov ebx, dword [esp + 0x34]
inc ebx
mov dword [esp + 0x34], ebx
test dl, 4
je 0x4726cd
xor eax, eax
test ebp, ebp
je 0x4726ae
cmp dword [esp + eax*4 + 0x13c], ecx
je 0x4726ae
inc eax
cmp eax, ebp
jb 0x4726a0
cmp eax, ebp
jne 0x4726cd
cmp ebp, 0x40
jae 0x4726cd
mov dword [esp + eax*4 + 0x13c], ecx
mov ebp, dword [esp + 0x138]
inc ebp
mov dword [esp + 0x138], ebp
test dl, 2
je 0x472715
xor eax, eax
test edi, edi
je 0x4726ee
nop dword [eax + eax]
cmp dword [esp + eax*4 + 0x240], ecx
je 0x4726ee
inc eax
cmp eax, edi
jb 0x4726e0
cmp eax, edi
jne 0x47270d
cmp edi, 0x40
jae 0x47270d
mov dword [esp + eax*4 + 0x240], ecx
mov edi, dword [esp + 0x23c]
inc edi
mov dword [esp + 0x23c], edi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
inc eax
mov dword [esp + 0x14], eax
cmp eax, esi
jb 0x472633
test ebx, ebx
jne 0x4727c5
test ebp, ebp
jne 0x4727c5
test edi, edi
jne 0x4727c5
mov ecx, dword [esp + 0x350]
mov eax, ecx
mov edx, dword [esp + 0x354]
or eax, edx
jne 0x472782
jmp 0x4728c6
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0056e987
add esp, 0x334
ret
test edx, edx
jg 0x4727aa
jl 0x47278c
test ecx, ecx
jae 0x47279f
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x4728c6
test edx, edx
jl 0x4727b7
jg 0x4727aa
cmp ecx, 0xffffffff
jb 0x4727b7
mov ecx, 0xfffffffe
mov dword [esp + 0x20], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x4728c6
mov ecx, dword [esp + 0x354]
lea eax, [esp + 0x14]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x350]
test ecx, ecx
jg 0x472804
jl 0x4727e5
test eax, eax
jae 0x4727f2
mov dword [esp + 0x1c], 0
jmp 0x47288e
test ecx, ecx
jl 0x47287e
jg 0x472804
test eax, eax
je 0x47287e
push 0
push 0x3e8
push ecx
push eax
call fcn.0056f5d0
push 0
push 0x3e8
mov esi, edx
mov dword [esp + 0x1c], eax
push esi
push eax
call fcn.0056fb10
mov ecx, dword [esp + 0x350]
sub ecx, eax
mov eax, dword [esp + 0x354]
push 0
push 0x3e8
sbb eax, edx
push eax
push ecx
call fcn.0056fb10
mov ecx, eax
test esi, esi
jl 0x472870
jg 0x472859
mov eax, dword [esp + 0x14]
cmp eax, 0x7fffffff
jbe 0x472874
mov eax, accept
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jmp 0x47288e
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jmp 0x47288e
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
push dword [esp + 0x1c]
xor eax, eax
lea edx, [esp + 0x240]
test edi, edi
lea ecx, [esp + 0x13c]
cmove edx, eax
test ebp, ebp
push edx
cmove ecx, eax
xor esi, esi
test ebx, ebx
lea eax, [esp + 0x3c]
push ecx
cmove eax, esi
push eax
mov eax, dword [esp + 0x20]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x472769
mov esi, dword [esp + 0x24]
xor edi, edi
mov ebx, dword [esp + 0x34c]
add esi, 6
nop
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x472949
lea ecx, [esp + 0x34]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x472906
test byte [esi - 2], 1
je 0x472906
or word [esi], 1
lea eax, [esp + 0x138]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x472924
test byte [esi - 2], 4
je 0x472924
or word [esi], 4
lea eax, [esp + 0x23c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x472942
test byte [esi - 2], 2
je 0x472942
or word [esi], 2
cmp word [esi], 0
je 0x472949
inc edi
add esi, 8
sub ebx, 1
jne 0x4728e0
mov eax, edi
jmp 0x472769
test edx, edx
jl 0x472970
jg 0x472963
cmp ecx, 0xffffffff
jb 0x472970
mov ecx, 0xfffffffe
mov dword [esp + 0x1c], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x334]
xor eax, eax
pop esi
xor ecx, esp
call fcn.0056e987
add esp, 0x334
ret