Function at 0x47f650
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x62aabc]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, 0x7d0
mov dword [ebp - 0x318], ebx
push edi
mov dword [ebp - 0x324], esi
mov dword [ebp - 0x328], 0
jne 0x47f6a3
movzx eax, word [ebx + 4]
test al, 8
jne 0x47f6a3
or eax, 8
mov dword [ebp - 0x328], 1
mov word [ebx + 4], ax
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
jne 0x47f8d9
mov ecx, dword [ebp + 0x10]
test ecx, ecx
js 0x47f6c1
cmp ecx, esi
cmovl esi, ecx
mov dword [ebp - 0x324], esi
mov eax, 0x10624dd3
mov dword [ebp - 0x31c], 0
imul esi
xor ecx, ecx
xor edi, edi
sar edx, 6
mov eax, edx
mov dword [ebp - 0x108], edi
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x314], ecx
mov dword [ebp - 0x334], eax
xor edx, edx
imul eax, eax, 0x3e8
mov dword [ebp - 0x20c], edx
sub esi, eax
imul eax, esi, 0x3e8
xor esi, esi
mov dword [ebp - 0x310], esi
mov dword [ebp - 0x330], eax
cmp dword [ebp + 0xc], ecx
jbe 0x47f877
nop
lea eax, [ebx + 6]
mov dword [ebp - 0x320], eax
movzx eax, word [eax + ecx*8 - 2]
mov ebx, eax
mov dword [ebp - 0x32c], ebx
test al, 0xd
je 0x47f83a
test al, 1
je 0x47f79a
xor ecx, ecx
test edi, edi
je 0x47f76e
mov ebx, dword [ebp - 0x314]
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + ebx*8]
mov ebx, dword [ebp - 0x32c]
nop dword [eax]
cmp dword [ebp + ecx*4 - 0x104], eax
je 0x47f76e
inc ecx
cmp ecx, edi
jb 0x47f760
cmp ecx, edi
jne 0x47f79a
cmp edi, 0x40
jae 0x47f79a
mov edi, dword [ebp - 0x314]
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + edi*8]
mov dword [ebp + ecx*4 - 0x104], eax
mov edi, dword [ebp - 0x108]
inc edi
mov dword [ebp - 0x108], edi
test bl, 4
je 0x47f7e8
mov ebx, dword [ebp - 0x318]
xor ecx, ecx
test edx, edx
je 0x47f7c2
mov eax, dword [ebp - 0x314]
mov eax, dword [ebx + eax*8]
cmp dword [ebp + ecx*4 - 0x208], eax
je 0x47f7c2
inc ecx
cmp ecx, edx
jb 0x47f7b4
cmp ecx, edx
jne 0x47f7e8
cmp edx, 0x40
jae 0x47f7e8
mov eax, dword [ebp - 0x314]
mov eax, dword [ebx + eax*8]
mov dword [ebp + ecx*4 - 0x208], eax
mov edx, dword [ebp - 0x20c]
inc edx
mov dword [ebp - 0x20c], edx
mov ebx, dword [ebp - 0x318]
xor eax, eax
test esi, esi
je 0x47f80e
mov ecx, dword [ebp - 0x314]
mov ecx, dword [ebx + ecx*8]
nop dword [eax]
cmp dword [ebp + eax*4 - 0x30c], ecx
je 0x47f80e
inc eax
cmp eax, esi
jb 0x47f800
cmp eax, esi
jne 0x47f834
cmp esi, 0x40
jae 0x47f834
mov ecx, dword [ebp - 0x314]
mov ecx, dword [ebx + ecx*8]
mov dword [ebp + eax*4 - 0x30c], ecx
mov esi, dword [ebp - 0x310]
inc esi
mov dword [ebp - 0x310], esi
mov ecx, dword [ebp - 0x314]
mov eax, dword [ebp - 0x320]
xor ebx, ebx
mov word [eax + ecx*8], bx
mov ebx, dword [ebp - 0x318]
mov eax, dword [ebx + ecx*8]
cmp eax, dword [ebp - 0x31c]
cmovbe eax, dword [ebp - 0x31c]
inc ecx
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x314], ecx
cmp ecx, dword [ebp + 0xc]
jb 0x47f720
lea esi, [ebx + 6]
jmp 0x47f882
lea esi, [ebx + 6]
mov eax, ecx
mov dword [ebp - 0x320], esi
lea ecx, [ebp - 0x334]
inc eax
push ecx
lea ecx, [ebp - 0x310]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
test edi, edi
jg 0x47f902
jne 0x47f95d
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov esi, dword [ebp - 0x324]
sub eax, esi
test ecx, ecx
cmovle eax, ecx
mov ecx, eax
mov dword [ebp + 0x10], ecx
test ecx, ecx
jle 0x47f8ef
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
je 0x47f6b2
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054f742
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054f742
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x47f95d
nop dword [eax]
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f927
or word [esi], 1
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f93e
or word [esi], 4
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f955
or word [esi], 8
add esi, 8
sub ebx, 1
jne 0x47f910
cmp dword [ebp - 0x328], 0
je 0x47f978
mov eax, dword [ebp - 0x320]
or ecx, 0xffffffff
mov al, byte [eax]
and al, 0xd
cmp al, 8
cmove edi, ecx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054f742
mov esp, ebp
pop ebp
ret