Function at 0x405dc0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428a2d
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x4360e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x3c], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
lea eax, [ebx + 0x18]
mov dword [ebp - 0x44], eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x2c], eax
call eax
mov byte [ebp - 0x40], 1
mov dword [ebp - 4], 0
cmp byte [ebx + 0xd0], 0
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x34], eax
jne 0x4061bb
mov eax, dword [ebx + 0xa8]
lea ecx, [ebx + 0xc0]
mov dword [ebp - 0x48], ecx
mov dword [eax], 0
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0xb0], 0xffffffff
mov dword [eax], 0
mov dword [ebx + 0xbc], 0xffffffff
mov eax, dword [ecx]
mov dword [eax], 0
xor eax, eax
mov dword [ecx + 8], 0xffffffff
mov esi, dword [ebx + 0xa8]
mov edi, dword [ebx + 0x30]
mov ecx, dword [esi]
test ecx, ecx
je 0x405e8f
nop dword [eax]
cmp dword [esi + eax*4 + 4], edi
je 0x405f09
inc eax
cmp eax, ecx
jb 0x405e80
mov edx, dword [ebx + 0xac]
inc ecx
cmp ecx, edx
jbe 0x405efb
mov eax, edx
shr eax, 1
add eax, edx
cmp eax, ecx
cmovae ecx, eax
mov dword [ebp - 0x28], ecx
lea eax, [ecx*4 + 4]
push eax
call fcn.0040fa4b
mov ecx, dword [ebx + 0xa8]
mov esi, eax
add esp, 4
mov ecx, dword [ecx]
mov dword [esi], ecx
xor ecx, ecx
mov edx, dword [ebx + 0xa8]
cmp dword [edx], ecx
jbe 0x405ee3
mov eax, dword [edx + ecx*4 + 4]
mov dword [esi + ecx*4 + 4], eax
inc ecx
mov edx, dword [ebx + 0xa8]
cmp ecx, dword [edx]
jb 0x405ed0
push edx
call fcn.0040fde1
mov eax, dword [ebp - 0x28]
add esp, 4
mov dword [ebx + 0xa8], esi
mov dword [ebx + 0xac], eax
mov eax, dword [esi]
mov dword [esi + eax*4 + 4], edi
mov eax, dword [ebx + 0xa8]
inc dword [eax]
mov esi, dword [ebx + 0xcc]
xor edi, edi
test esi, esi
je 0x405f29
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x405f29
mov esi, dword [esi + 4]
test esi, esi
jne 0x405f15
lea eax, [ebx + 0x38]
mov dword [ebp - 0x28], 3
lea esi, [ebx + 0xb0]
mov ebx, eax
nop dword [eax + eax]
push ecx
push ebx
lea ecx, [esi - 8]
call fcn.00404220
cmp dword [esi], edi
cmova edi, dword [esi]
add ebx, 0x1c
sub dword [ebp - 0x28], 1
lea esi, [esi + 0xc]
jne 0x405f40
mov ebx, dword [ebp - 0x3c]
push ecx
lea esi, [ebx + 0x8c]
push esi
lea ecx, [ebx + 0xb4]
call fcn.00404220
mov eax, dword [ebx + 0xbc]
cmp eax, edi
push ecx
push esi
lea ecx, [ebx + 0xc0]
cmova edi, eax
call fcn.00404220
mov eax, dword [ebx + 0xc8]
mov ecx, 0x11e1a300
mov esi, dword [ebx + 0xcc]
cmp eax, edi
cmova edi, eax
test esi, esi
je 0x405fb4
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 0x405fa3
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x18], eax
imul eax, eax, 0xf4240
sub ecx, eax
lea eax, [ebx + 0x18]
push eax
mov dword [ebp - 0x14], ecx
call dword [ebp - 0x34]
mov ecx, dword [ebx + 0xb4]
lea esi, [ebx + 0xc0]
mov edx, dword [esi]
xor al, al
mov byte [ebp - 0x21], al
mov byte [ebp - 0x40], al
mov eax, dword [ebx + 0xa8]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x436998
test eax, eax
jne 0x406041
test ecx, ecx
jne 0x406041
test edx, edx
jne 0x406041
mov eax, 0x10624dd3
imul dword [ebp - 0x14]
imul eax, dword [ebp - 0x18], 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]
xor edi, edi
jmp 0x406137
cmp dword [ebp - 0x18], 0
jne 0x406067
mov eax, dword [ebp - 0x14]
test eax, eax
jle 0x406061
cmp eax, 0x3e8
mov dword [ebp - 0x38], 0x3e8
cmovl eax, dword [ebp - 0x38]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0xa8]
lea esi, [ebp - 0x18]
push esi
push edx
push ecx
push eax
lea eax, [edi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
lea ecx, [ebp - 0x20]
test edi, edi
mov dword [ebp - 0x28], edi
sets dl
call fcn.004043e0
lea esi, [ebx + 0xc0]
test edi, edi
jle 0x406137
push dword [ebx + 0xa8]
push dword [ebx + 0x30]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x406137
lea ecx, [ebx + 0x30]
call fcn.004057b0
test al, al
jne 0x406130
lea eax, [ebx + 0x18]
push eax
call dword [ebp - 0x2c]
mov edi, dword [ebx + 0x14]
mov al, 1
mov byte [ebp - 0x21], al
mov byte [ebp - 0x40], al
mov byte [ebx + 0xd0], al
lea eax, [ebx + 0xd8]
lock inc dword [edi + 0x18]
push eax
push 0
push 0
mov dword [eax + 0x1c], 1
push dword [edi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x40612d
lea eax, [edi + 0x38]
push eax
call dword [ebp - 0x2c]
lea eax, [ebx + 0xd8]
mov dword [eax + 0x14], 0
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x406116
mov dword [ecx + 0x14], eax
jmp 0x406119
mov dword [edi + 0x54], eax
mov dword [edi + 0x58], eax
mov ecx, 1
lea eax, [edi + 0x34]
xchg dword [eax], ecx
lea eax, [edi + 0x38]
push eax
call dword [ebp - 0x34]
mov edi, dword [ebp - 0x28]
dec edi
cmp byte [ebp - 0x21], 0
jne 0x406146
lea eax, [ebx + 0x18]
push eax
call dword [ebp - 0x2c]
mov al, 1
mov byte [ebp - 0x21], al
mov byte [ebp - 0x40], al
test edi, edi
jle 0x406199
mov edi, dword [ebp - 0x30]
lea eax, [ebx + 0x8c]
push edi
push eax
mov ecx, esi
call fcn.004042e0
push edi
lea eax, [ebx + 0x8c]
push eax
lea ecx, [ebx + 0xb4]
call fcn.004042e0
lea edi, [ebx + 0x70]
mov esi, 2
mov ebx, dword [ebp - 0x48]
nop word [eax + eax]
push dword [ebp - 0x30]
mov ecx, ebx
push edi
call fcn.004042e0
sub edi, 0x1c
sub ebx, 0xc
sub esi, 1
jns 0x406180
mov ebx, dword [ebp - 0x3c]
mov esi, dword [ebx + 0xcc]
test esi, esi
je 0x4061b5
mov edi, dword [ebp - 0x30]
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x4061a6
cmp byte [ebp - 0x21], 0
je 0x4061c2
lea eax, [ebx + 0x18]
push eax
call dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f853
mov esp, ebp
pop ebp
ret 8