Function at 0x47f5a1
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x4b1810]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x324], ebx
mov dword [ebp - 0x328], ebx
mov dword [ebp - 0x314], ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x334], esi
push edi
test edx, edx
je 0x47f5f5
mov ecx, dword [ebp + 0xc]
mov eax, ebx
test ecx, ecx
je 0x47f5f5
cmp dword [edx + eax*8], 0xffffffff
jne 0x47f60d
inc eax
cmp eax, ecx
jb 0x47f5ea
push esi
call fcn.0047fae0
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004918a1
mov esp, ebp
pop ebp
ret
test esi, esi
jle 0x47f62e
mov dword [ebp - 0x314], esi
call fcn.0047855d
mov dword [ebp - 0x328], edx
mov edx, dword [ebp - 0x318]
mov dword [ebp - 0x324], eax
xor eax, eax
mov dword [ebp - 0x20c], ebx
or dword [ebp - 0x31c], 0xffffffff
mov edi, ebx
mov ecx, eax
mov dword [ebp - 0x310], edi
mov dword [ebp - 0x108], ecx
mov esi, eax
jmp 0x47f657
mov edx, dword [ebp - 0x318]
xor eax, eax
mov word [edx + esi*8 + 6], ax
mov edx, dword [edx + esi*8]
mov eax, dword [ebp + 0xc]
cmp edx, 0xffffffff
je 0x47f74b
mov eax, dword [ebp - 0x318]
movzx eax, word [eax + esi*8 + 4]
mov dword [ebp - 0x320], eax
test al, 7
je 0x47f748
mov eax, dword [ebp - 0x31c]
cmp edx, eax
cmova eax, edx
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x320]
test al, 1
je 0x47f6d8
xor eax, eax
test edi, edi
je 0x47f6b5
cmp dword [ebp + eax*4 - 0x30c], edx
je 0x47f6b5
inc eax
cmp eax, edi
jb 0x47f6a7
cmp eax, edi
jne 0x47f6d2
cmp edi, 0x40
jae 0x47f6d2
mov dword [ebp + eax*4 - 0x30c], edx
mov edi, dword [ebp - 0x310]
inc edi
mov dword [ebp - 0x310], edi
mov eax, dword [ebp - 0x320]
test al, 4
je 0x47f713
xor eax, eax
test ebx, ebx
je 0x47f6f0
cmp dword [ebp + eax*4 - 0x208], edx
je 0x47f6f0
inc eax
cmp eax, ebx
jb 0x47f6e2
cmp eax, ebx
jne 0x47f70d
cmp ebx, 0x40
jae 0x47f70d
mov dword [ebp + eax*4 - 0x208], edx
mov ebx, dword [ebp - 0x20c]
inc ebx
mov dword [ebp - 0x20c], ebx
mov eax, dword [ebp - 0x320]
test al, 2
je 0x47f748
xor eax, eax
test ecx, ecx
je 0x47f72b
cmp dword [ebp + eax*4 - 0x104], edx
je 0x47f72b
inc eax
cmp eax, ecx
jb 0x47f71d
cmp eax, ecx
jne 0x47f748
cmp ecx, 0x40
jae 0x47f748
mov dword [ebp + eax*4 - 0x104], edx
mov ecx, dword [ebp - 0x108]
inc ecx
mov dword [ebp - 0x108], ecx
mov eax, dword [ebp + 0xc]
inc esi
cmp esi, eax
jb 0x47f651
mov esi, dword [ebp - 0x334]
lea edi, [ebp - 0x330]
mov ebx, dword [ebp - 0x31c]
xor eax, eax
mov ecx, dword [ebp - 0x314]
test esi, esi
cmovs edi, eax
inc ebx
test esi, esi
jle 0x47f790
mov eax, ecx
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x330], eax
imul eax, edx, 0x3e8
jmp 0x47f79a
jne 0x47f7a0
xor eax, eax
mov dword [ebp - 0x330], eax
mov dword [ebp - 0x32c], eax
push edi
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x47f80c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x47f7d3
cmp eax, 0x2714
jne 0x47f810
mov ecx, dword [ebp - 0x314]
test esi, esi
jle 0x47f790
push dword [ebp - 0x328]
push dword [ebp - 0x324]
call fcn.0047855d
push edx
push eax
call fcn.00478507
mov ecx, esi
add esp, 0x10
sub ecx, eax
mov dword [ebp - 0x314], ecx
test ecx, ecx
jg 0x47f774
jmp 0x47f810
test eax, eax
jns 0x47f818
or eax, 0xffffffff
jmp 0x47f5fc
jne 0x47f821
xor eax, eax
jmp 0x47f5fc
mov esi, dword [ebp - 0x318]
xor ebx, ebx
mov eax, dword [ebp + 0xc]
mov edi, ebx
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x47f88a
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f853
or word [esi], 1
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f86a
or word [esi], 4
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f881
or word [esi], 2
mov eax, dword [ebp + 0xc]
cmp word [esi], bx
je 0x47f88a
inc edi
add esi, 8
dec eax
mov dword [ebp + 0xc], eax
jne 0x47f831
mov eax, edi
jmp 0x47f5fc