Function at 0x10047e60
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010ff0d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x10163164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
lea eax, [esi + 0x18]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x3c], eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x1c], eax
call eax
mov byte [ebp - 0x38], 1
mov dword [ebp - 4], 0
cmp byte [esi + 0xd0], 0
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], eax
jne 0x100481e8
mov eax, dword [esi + 0xa8]
lea ebx, [esi + 0xc0]
xor ecx, ecx
mov dword [ebp - 0x14], ebx
mov dword [eax], 0
mov eax, dword [esi + 0xb4]
mov dword [esi + 0xb0], 0xffffffff
mov dword [eax], 0
mov dword [esi + 0xbc], 0xffffffff
mov eax, dword [ebx]
mov dword [eax], 0
mov dword [ebx + 8], 0xffffffff
mov eax, dword [esi + 0xa8]
mov edi, dword [esi + 0x30]
mov edx, dword [eax]
test edx, edx
je 0x10047f2c
add eax, 4
nop dword [eax]
cmp dword [eax], edi
je 0x10047f4f
inc ecx
add eax, 4
cmp ecx, edx
jb 0x10047f20
lea eax, [edx + 1]
push eax
lea ecx, [esi + 0xa8]
call fcn.100470e0
mov ecx, dword [esi + 0xa8]
mov eax, dword [ecx]
mov dword [ecx + eax*4 + 4], edi
mov eax, dword [esi + 0xa8]
inc dword [eax]
mov esi, dword [esi + 0xcc]
xor edi, edi
test esi, esi
je 0x10047f74
nop dword [eax + eax]
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x10047f74
mov esi, dword [esi + 4]
test esi, esi
jne 0x10047f60
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x24], 3
lea esi, [ebx + 0xb0]
add ebx, 0x38
push ecx
push ebx
lea ecx, [esi - 8]
call fcn.10046f60
cmp dword [esi], edi
cmova edi, dword [esi]
add ebx, 0x1c
sub dword [ebp - 0x24], 1
lea esi, [esi + 0xc]
jne 0x10047f87
mov esi, dword [ebp - 0x18]
push ecx
lea ebx, [esi + 0x8c]
push ebx
lea ecx, [esi + 0xb4]
call fcn.10046f60
mov eax, dword [esi + 0xbc]
cmp eax, edi
push ecx
push ebx
mov ebx, dword [ebp - 0x14]
cmova edi, eax
mov ecx, ebx
call fcn.10046f60
mov eax, dword [esi + 0xc8]
mov ecx, 0x11e1a300
cmp eax, edi
cmovbe eax, edi
mov edi, esi
mov dword [ebp - 0x28], eax
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x10048001
nop
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 0x10047ff0
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x34], eax
imul eax, eax, 0xf4240
sub ecx, eax
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 0x30], ecx
call dword [ebp - 0x20]
mov edx, dword [ebx]
xor al, al
mov ebx, dword [edi + 0xa8]
mov esi, dword [edi + 0xb4]
mov byte [ebp - 0xd], al
mov byte [ebp - 0x38], al
test ebx, ebx
jne 0x10048078
test esi, esi
jne 0x10048078
test edx, edx
jne 0x10048078
mov eax, 0x10624dd3
imul dword [ebp - 0x30]
imul eax, dword [ebp - 0x34], 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]
jmp 0x10048165
cmp dword [ebp - 0x34], 0
jne 0x10048097
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x24], 0x3e8
lea eax, [ecx - 1]
cmp eax, 0x3e6
cmovbe ecx, dword [ebp - 0x24]
mov dword [ebp - 0x30], ecx
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x28]
push edx
push esi
push ebx
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x28], eax
mov esi, eax
test eax, eax
jns 0x100480c2
call fcn.10008d10
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x10048165
mov esi, eax
test eax, eax
jle 0x10048165
push dword [edi + 0xa8]
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10048165
lea ecx, [edi + 0x30]
call fcn.10047780
test al, al
jne 0x1004815b
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x1c]
mov esi, dword [edi + 0x14]
lea ebx, [edi + 0xd8]
mov al, 1
mov byte [ebp - 0xd], al
mov byte [ebp - 0x38], al
mov byte [edi + 0xd0], al
lock inc dword [esi + 0x18]
push ebx
push 0
push 0
mov dword [ebx + 0x1c], 1
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1004815b
lea eax, [esi + 0x38]
push eax
call dword [ebp - 0x1c]
mov dword [ebx + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x10048144
mov dword [eax + 0x14], ebx
jmp 0x10048147
mov dword [esi + 0x54], ebx
mov dword [esi + 0x58], ebx
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
lea eax, [esi + 0x38]
push eax
call dword [ebp - 0x20]
mov esi, dword [ebp - 0x28]
dec esi
cmp byte [ebp - 0xd], 0
jne 0x10048174
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x1c]
mov al, 1
mov byte [ebp - 0xd], al
mov byte [ebp - 0x38], al
mov ebx, dword [ebp + 0xc]
test esi, esi
jle 0x100481c0
mov ecx, dword [ebp - 0x14]
lea esi, [edi + 0x8c]
push ebx
push esi
call fcn.10047020
push ebx
push esi
lea ecx, [edi + 0xb4]
call fcn.10047020
mov eax, dword [ebp - 0x14]
mov esi, 2
add edi, 0x70
push ebx
push edi
mov ecx, eax
call fcn.10047020
mov eax, dword [ebp - 0x14]
sub edi, 0x1c
sub eax, 0xc
sub esi, 1
mov dword [ebp - 0x14], eax
jns 0x100481a3
mov edi, dword [ebp - 0x18]
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x100481df
nop word [eax + eax]
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x100481d0
cmp byte [ebp - 0xd], 0
je 0x100481ed
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x2c]
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