Function at 0x47fbe0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7120ad
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x7f9c40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x48], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x44], 1
cmp byte [esi + 0xd0], 0
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 4], 0
mov dword [ebp - 0x28], eax
jne 0x48010f
mov eax, dword [esi + 0xa8]
lea ebx, [esi + 0xa8]
lea ecx, [esi + 0xc0]
mov dword [ebp - 0x18], ecx
mov dword [eax], 0
mov eax, dword [esi + 0xb4]
mov dword [ebx + 8], 0xffffffff
mov dword [eax], 0
mov dword [esi + 0xbc], 0xffffffff
mov eax, dword [ecx]
mov dword [eax], 0
mov dword [ecx + 8], 0xffffffff
xor ecx, ecx
mov eax, dword [ebx]
mov esi, dword [esi + 0x30]
mov edx, dword [eax]
test edx, edx
je 0x47fca0
add eax, 4
cmp dword [eax], esi
je 0x47fcb7
inc ecx
add eax, 4
cmp ecx, edx
jb 0x47fc94
lea eax, [edx + 1]
mov ecx, ebx
push eax
call fcn.0047e6a0
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov dword [ecx + eax*4 + 4], esi
mov eax, dword [ebx]
inc dword [eax]
mov ecx, dword [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x30], edi
mov esi, dword [ecx + 0xcc]
test esi, esi
je 0x47fce4
nop dword [eax]
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x47fcf9
mov esi, dword [esi + 4]
test esi, esi
jne 0x47fcd0
xor cl, cl
mov eax, dword [ebp - 0x14]
mov edx, 3
add eax, 0x3c
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x24], eax
jmp 0x47fd03
mov cl, 1
jmp 0x47fce6
mov cl, byte [ebp - 0xd]
test cl, cl
jne 0x47fd10
cmp dword [eax + 4], 0
mov byte [ebp - 0xd], cl
je 0x47fd14
mov byte [ebp - 0xd], 1
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, eax
je 0x47fdb4
mov ecx, dword [ebx]
mov edi, esi
mov esi, dword [esi]
mov dword [ebp - 0x38], edi
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 4]
cmp dword [ebp - 0x1c], eax
jbe 0x47fd98
mov ecx, dword [ebp - 0x1c]
shr eax, 1
add eax, dword [ebx + 4]
cmp eax, ecx
cmovae ecx, eax
mov dword [ebp - 0x1c], ecx
lea eax, [ecx*4 + 4]
push eax
call fcn.006debec
mov ecx, dword [ebx]
add esp, 4
mov dword [ebp - 0x2c], eax
mov ecx, dword [ecx]
mov dword [eax], ecx
xor ecx, ecx
mov edx, dword [ebx]
cmp dword [edx], ecx
jbe 0x47fd82
mov edi, eax
nop dword [eax]
mov eax, dword [edx + ecx*4 + 4]
mov dword [edi + ecx*4 + 4], eax
inc ecx
mov edx, dword [ebx]
cmp ecx, dword [edx]
jb 0x47fd70
mov edi, dword [ebp - 0x38]
push edx
call fcn.005069a0
mov ecx, dword [ebp - 0x2c]
add esp, 4
mov eax, dword [ebp - 0x1c]
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov edx, dword [ecx]
mov eax, dword [edi + 8]
mov dword [ecx + edx*4 + 4], eax
mov eax, dword [ebx]
inc dword [eax]
mov eax, dword [ebp - 0x24]
cmp esi, dword [eax]
jne 0x47fd20
mov edi, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
cmp dword [ebx + 8], edi
mov eax, dword [ebp - 0x24]
cmova edi, dword [ebx + 8]
add eax, 0x1c
add ebx, 0xc
mov dword [ebp - 0x30], edi
sub edx, 1
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], edx
jne 0x47fd00
cmp byte [ebp - 0xd], 0
mov eax, dword [ebp - 0x14]
jne 0x47fdec
cmp dword [eax + 0x94], 0
mov byte [ebp - 0xd], 0
je 0x47fdf0
mov byte [ebp - 0xd], 1
mov ebx, dword [ebp + 0xc]
lea esi, [eax + 0x8c]
push ebx
push esi
lea ecx, [eax + 0xb4]
call fcn.00480600
mov ecx, dword [ebp - 0x14]
push ebx
push esi
mov eax, dword [ecx + 0xbc]
cmp eax, edi
mov ecx, dword [ebp - 0x18]
cmova edi, eax
call fcn.00480600
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0xc8]
cmp eax, edi
cmovbe eax, edi
mov dword [ebp - 0x38], eax
test ecx, ecx
jne 0x47fe3f
cmp byte [ebp - 0xd], cl
je 0x48010c
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
test ecx, ecx
je 0x47fe95
mov esi, dword [edx + 0xcc]
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
test esi, esi
je 0x47fe76
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0xc]
mov esi, dword [esi + 4]
mov ecx, eax
test esi, esi
jne 0x47fe65
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x40], eax
imul eax, eax, 0xf4240
sub ecx, eax
mov dword [ebp - 0x3c], ecx
push dword [ebp - 0x20]
call dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
xor al, al
mov byte [ebp + 0xf], al
mov byte [ebp - 0x44], al
mov eax, dword [ebp - 0x18]
mov edi, dword [ecx + 0xa8]
mov esi, dword [ecx + 0xb4]
mov edx, dword [eax]
test edi, edi
jne 0x47ffd9
test esi, esi
jne 0x47ffd9
test edx, edx
jne 0x47ffd9
mov eax, 0x10624dd3
imul dword [ebp - 0x3c]
imul eax, dword [ebp - 0x40], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
mov eax, 1
cmove ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 0x20]
call edi
mov al, 1
mov byte [ebp + 0xf], al
mov byte [ebp - 0x44], al
test esi, esi
jle 0x4800ea
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push ebx
lea esi, [edi + 0x8c]
push esi
call fcn.0047d780
push ebx
push esi
lea ecx, [edi + 0xb4]
call fcn.0047d780
mov eax, dword [ebp - 0x18]
mov ecx, 2
add edi, 0x70
mov dword [ebp - 0x2c], ecx
mov dword [ebp + 8], edi
nop word [eax + eax]
mov eax, dword [eax]
mov dword [ebp - 0x34], 0
cmp dword [eax], 0
jbe 0x4800cf
xor edx, edx
mov dword [ebp - 0x30], edx
mov eax, dword [eax + edx + 4]
mov ecx, edi
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0047b730
mov esi, dword [eax]
cmp esi, dword [edi + 4]
je 0x4800af
mov edi, dword [esi + 0xc]
test edi, edi
je 0x48009f
mov eax, dword [edi + 0x34]
push edi
call eax
add esp, 4
test eax, eax
je 0x4800ac
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x47ffbf
mov eax, dword [ecx + 0x14]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x47ffb8
mov dword [esi + 0x10], eax
mov dword [ecx + 0x14], 0
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x48008f
mov dword [eax + 0x14], edi
jmp 0x480091
cmp dword [ebp - 0x40], 0
jne 0x47fff8
mov ecx, dword [ebp - 0x3c]
mov dword [ebp + 8], 0x3e8
lea eax, [ecx - 1]
cmp eax, 0x3e6
cmovbe ecx, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x38]
push edx
push esi
push edi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jns 0x480026
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x7f5028
push eax
lea ecx, [ebp - 0x54]
call fcn.0044c740
test esi, esi
jle 0x47fef9
mov eax, dword [ebp - 0x14]
lea edi, [eax + 0x30]
push dword [eax + 0xa8]
push dword [edi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47fef9
mov ecx, edi
call fcn.0047ed90
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test al, al
jne 0x48007f
push dword [ebp - 0x20]
call edi
mov ecx, dword [ebp - 0x14]
mov al, 1
mov byte [ebp + 0xf], al
mov byte [ebp - 0x44], al
push 0
mov byte [ecx + 0xd0], al
lea eax, [ecx + 0xd8]
mov ecx, dword [ecx + 0x14]
push eax
call fcn.0047d860
dec esi
cmp byte [ebp + 0xf], 0
jne 0x47ff0c
jmp 0x47feff
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov edi, dword [esi + 0xc]
test edi, edi
jne 0x47ff93
mov edi, dword [ebp + 8]
mov ecx, edi
push esi
call fcn.0047b590
jmp 0x4800af
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
inc ecx
add edx, 4
mov dword [ebp - 0x34], ecx
mov eax, dword [eax]
mov dword [ebp - 0x30], edx
cmp ecx, dword [eax]
jb 0x47ff67
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x18]
dec ecx
sub eax, 0xc
mov dword [ebp - 0x2c], ecx
sub edi, 0x1c
mov dword [ebp - 0x18], eax
mov dword [ebp + 8], edi
test ecx, ecx
jns 0x47ff50
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0xcc]
test esi, esi
je 0x480106
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x4800f7
cmp byte [ebp + 0xf], 0
je 0x480114
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x20]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8