Function at 0x409740
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x490ee0
mov eax, dword fs:[0]
push eax
sub esp, 0x454
mov eax, dword [0x4b0300]
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 edi, ecx
mov dword [ebp - 0x450], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x448], eax
lea eax, [edi + 0x18]
mov dword [ebp - 0x460], eax
mov dword [ebp - 0x458], eax
push eax
mov eax, dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov dword [ebp - 0x444], eax
call eax
mov byte [ebp - 0x454], 1
mov dword [ebp - 4], 0
cmp byte [edi + 0xd0], 0
mov eax, dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov dword [ebp - 0x44c], eax
jne 0x409d34
mov eax, dword [edi + 0xa8]
lea ecx, [edi + 0xc0]
mov dword [ebp - 0x45c], ecx
mov dword [eax], 0
mov eax, dword [edi + 0xb4]
mov dword [edi + 0xb0], 0xffffffff
mov dword [eax], 0
mov dword [edi + 0xbc], 0xffffffff
mov eax, dword [ecx]
mov dword [eax], 0
xor eax, eax
mov dword [ecx + 8], 0xffffffff
mov esi, dword [edi + 0xa8]
mov ebx, dword [edi + 0x30]
mov ecx, dword [esi]
test ecx, ecx
je 0x409837
nop word [eax + eax]
cmp dword [esi + 4], ebx
lea esi, [esi + 4]
je 0x4098bc
inc eax
cmp eax, ecx
jb 0x409820
mov esi, dword [edi + 0xa8]
mov edx, dword [edi + 0xac]
inc ecx
cmp ecx, edx
jbe 0x4098ae
mov eax, edx
shr eax, 1
add eax, edx
cmp eax, ecx
cmovae ecx, eax
mov dword [ebp - 0x434], ecx
lea eax, [ecx*4 + 4]
push eax
call fcn.0046923f
mov ecx, dword [edi + 0xa8]
mov esi, eax
add esp, 4
mov ecx, dword [ecx]
mov dword [esi], ecx
xor ecx, ecx
mov eax, dword [edi + 0xa8]
cmp dword [eax], ecx
jbe 0x409893
nop dword [eax + eax]
mov eax, dword [eax + ecx*4 + 4]
mov dword [esi + ecx*4 + 4], eax
inc ecx
mov eax, dword [edi + 0xa8]
cmp ecx, dword [eax]
jb 0x409880
push eax
call fcn.004694c0
mov eax, dword [ebp - 0x434]
add esp, 4
mov dword [edi + 0xa8], esi
mov dword [edi + 0xac], eax
mov eax, dword [esi]
mov dword [esi + eax*4 + 4], ebx
mov eax, dword [edi + 0xa8]
inc dword [eax]
mov esi, dword [edi + 0xcc]
xor ebx, ebx
test esi, esi
je 0x4098dc
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x4098dc
mov esi, dword [esi + 4]
test esi, esi
jne 0x4098c8
lea eax, [edi + 0x38]
mov dword [ebp - 0x434], 3
lea esi, [edi + 0xb0]
mov edi, eax
push ecx
push edi
lea ecx, [esi - 8]
call fcn.004088f0
cmp dword [esi], ebx
cmova ebx, dword [esi]
add edi, 0x1c
sub dword [ebp - 0x434], 1
lea esi, [esi + 0xc]
jne 0x4098f1
mov edi, dword [ebp - 0x450]
push ecx
lea esi, [edi + 0x8c]
push esi
lea ecx, [edi + 0xb4]
call fcn.004088f0
mov eax, dword [edi + 0xbc]
cmp eax, ebx
push ecx
push esi
lea ecx, [edi + 0xc0]
cmova ebx, eax
call fcn.004088f0
mov eax, dword [edi + 0xc8]
mov ecx, 0x11e1a300
mov esi, dword [edi + 0xcc]
cmp eax, ebx
cmova ebx, eax
test esi, esi
je 0x409971
nop word [eax + eax]
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 0x409960
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x418], eax
imul eax, eax, 0xf4240
sub ecx, eax
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 0x414], ecx
call dword [ebp - 0x44c]
mov ecx, dword [edi + 0xc0]
lea esi, [edi + 0xc0]
mov edx, dword [edi + 0xb4]
xor al, al
mov byte [ebp - 0x42d], al
mov byte [ebp - 0x454], al
mov eax, dword [edi + 0xa8]
test eax, eax
jne 0x409a09
test edx, edx
jne 0x409a09
test ecx, ecx
jne 0x409a09
mov eax, 0x10624dd3
imul dword [ebp - 0x414]
imul eax, dword [ebp - 0x418], 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 ebx, ebx
jmp 0x409c95
cmp dword [ebp - 0x418], 0
jne 0x409a3e
mov eax, dword [ebp - 0x414]
test eax, eax
jle 0x409a38
cmp eax, 0x3e8
mov dword [ebp - 0x41c], 0x3e8
cmovl eax, dword [ebp - 0x41c]
mov dword [ebp - 0x414], eax
mov eax, dword [edi + 0xa8]
lea esi, [ebp - 0x418]
push esi
push ecx
push edx
push eax
lea eax, [ebx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
lea ecx, [ebp - 0x440]
mov edx, ebx
mov dword [ebp - 0x434], ebx
shr edx, 0x1f
call fcn.004063a0
lea esi, [edi + 0xc0]
test ebx, ebx
jle 0x409c95
push dword [edi + 0xa8]
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x409c95
lea eax, [ebp - 0x410]
mov dword [ebp - 0x420], 0x400
xorps xmm0, xmm0
mov dword [ebp - 0x41c], eax
movq qword [ebp - 0x42c], xmm0
mov dword [ebp - 0x424], 0
nop word [eax + eax]
mov ecx, dword [edi + 0x30]
lea eax, [ebp - 0x42c]
push eax
sub esp, 8
lea edx, [ebp - 0x420]
call fcn.004069c0
add esp, 0xc
cmp eax, 0x400
je 0x409ac0
test eax, eax
jg 0x409c8b
je 0x409c04
mov eax, dword [0x4b0e00]
mov ebx, dword [0x4b0e04]
cmp eax, 0x257edfd1
jne 0x409b0a
cmp ebx, 0xb2ab117a
je 0x409b19
cmp eax, 0x257edfd0
jne 0x409b1d
cmp ebx, 0xb2ab117a
jne 0x409b1d
mov al, 1
jmp 0x409b37
mov eax, dword [0x4b0df8]
mov ecx, 0x4b0df8
push 0x2733
mov eax, dword [eax + 0x18]
call eax
mov ebx, dword [0x4b0e04]
movzx eax, al
lea edx, [ebp - 0x440]
mov dword [ebp - 0x440], 0x2733
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x43c], 0x4b0df8
add eax, 2
movq xmm0, qword [ebp - 0x440]
movq qword [ebp - 0x440], xmm0
mov dword [ebp - 0x438], eax
call fcn.004059f0
test al, al
jne 0x409c85
mov eax, dword [0x4b0e00]
cmp eax, 0x257edfd1
jne 0x409b94
cmp ebx, 0xb2ab117a
je 0x409ba3
cmp eax, 0x257edfd0
jne 0x409ba7
cmp ebx, 0xb2ab117a
jne 0x409ba7
mov al, 1
jmp 0x409bbb
mov eax, dword [0x4b0df8]
mov ecx, 0x4b0df8
push 0x4d5
mov eax, dword [eax + 0x18]
call eax
movzx eax, al
lea edx, [ebp - 0x440]
mov dword [ebp - 0x440], 0x4d5
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x43c], 0x4b0df8
add eax, 2
movq xmm0, qword [ebp - 0x440]
movq qword [ebp - 0x440], xmm0
mov dword [ebp - 0x438], eax
call fcn.004059f0
test al, al
jne 0x409c85
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x444]
mov ebx, dword [edi + 0x14]
mov al, 1
mov byte [ebp - 0x42d], al
mov byte [ebp - 0x454], al
mov byte [edi + 0xd0], al
lea eax, [edi + 0xd8]
lock inc dword [ebx + 0x18]
push eax
push 0
push 0
mov dword [eax + 0x1c], 1
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.DLL_PostQueuedCompletionStatus]
test eax, eax
jne 0x409c85
lea eax, [ebx + 0x38]
push eax
call dword [ebp - 0x444]
lea eax, [edi + 0xd8]
mov dword [eax + 0x14], 0
mov ecx, dword [ebx + 0x58]
test ecx, ecx
je 0x409c6b
mov dword [ecx + 0x14], eax
jmp 0x409c6e
mov dword [ebx + 0x54], eax
mov dword [ebx + 0x58], eax
mov ecx, 1
lea eax, [ebx + 0x34]
xchg dword [eax], ecx
lea eax, [ebx + 0x38]
push eax
call dword [ebp - 0x44c]
mov ebx, dword [ebp - 0x434]
dec ebx
cmp byte [ebp - 0x42d], 0
jne 0x409cad
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x444]
mov al, 1
mov byte [ebp - 0x42d], al
mov byte [ebp - 0x454], al
test ebx, ebx
jle 0x409d06
mov ebx, dword [ebp - 0x448]
lea eax, [edi + 0x8c]
push ebx
push eax
mov ecx, esi
call fcn.004089a0
push ebx
lea eax, [edi + 0x8c]
push eax
lea ecx, [edi + 0xb4]
call fcn.004089a0
lea ebx, [edi + 0x70]
mov esi, 2
mov edi, dword [ebp - 0x45c]
push dword [ebp - 0x448]
mov ecx, edi
push ebx
call fcn.004089a0
sub ebx, 0x1c
sub edi, 0xc
sub esi, 1
jns 0x409ce7
mov edi, dword [ebp - 0x450]
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x409d25
mov edi, dword [ebp - 0x448]
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x409d16
cmp byte [ebp - 0x42d], 0
je 0x409d3c
mov eax, dword [ebp - 0x44c]
push dword [ebp - 0x460]
call eax
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.00469231
mov esp, ebp
pop ebp
ret 8