Function at 0x410280
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e2dd
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x49d140]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x20], edi
lea eax, [edi + 0x18]
mov dword [ebp - 0x38], eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x14], eax
call eax
mov byte [ebp - 0x34], 1
mov dword [ebp - 4], 0
cmp byte [edi + 0xd0], 0
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x18], eax
jne 0x41067b
mov eax, dword [edi + 0xa8]
lea ecx, [edi + 0xc0]
mov dword [ebp - 0x28], 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 0x41034a
cmp dword [esi + 4], ebx
lea esi, [esi + 4]
je 0x4103c9
inc eax
cmp eax, ecx
jb 0x410333
mov esi, dword [edi + 0xa8]
mov edx, dword [edi + 0xac]
inc ecx
cmp ecx, edx
jbe 0x4103bb
mov eax, edx
shr eax, 1
add eax, edx
cmp eax, ecx
cmovae ecx, eax
mov dword [ebp - 0x1c], ecx
lea eax, [ecx*4 + 4]
push eax
call fcn.00458728
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 0x4103a3
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 0x410390
push eax
call fcn.00458abe
mov eax, dword [ebp - 0x1c]
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 0x4103e9
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x4103e9
mov esi, dword [esi + 4]
test esi, esi
jne 0x4103d5
lea eax, [edi + 0x38]
mov dword [ebp - 0x1c], 3
lea esi, [edi + 0xb0]
mov edi, eax
nop dword [eax + eax]
push ecx
push edi
lea ecx, [esi - 8]
call fcn.0040e440
cmp dword [esi], ebx
cmova ebx, dword [esi]
add edi, 0x1c
sub dword [ebp - 0x1c], 1
lea esi, [esi + 0xc]
jne 0x410400
mov edi, dword [ebp - 0x20]
push ecx
lea esi, [edi + 0x8c]
push esi
lea ecx, [edi + 0xb4]
call fcn.0040e440
mov eax, dword [edi + 0xbc]
cmp eax, ebx
push ecx
push esi
lea ecx, [edi + 0xc0]
cmova ebx, eax
call fcn.0040e440
mov eax, dword [edi + 0xc8]
mov ecx, 1
mov esi, dword [edi + 0xcc]
cmp eax, ebx
cmova ebx, eax
test esi, esi
je 0x410474
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 0x410463
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x30], eax
imul eax, eax, 0xf4240
sub ecx, eax
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 0x2c], ecx
call dword [ebp - 0x18]
mov ecx, dword [edi + 0xc0]
lea esi, [edi + 0xc0]
mov edx, dword [edi + 0xb4]
xor al, al
mov byte [ebp - 0xd], al
mov byte [ebp - 0x34], al
mov eax, dword [edi + 0xa8]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0x49dbf8
test eax, eax
jne 0x410505
test edx, edx
jne 0x410505
test ecx, ecx
jne 0x410505
mov eax, 0x10624dd3
imul dword [ebp - 0x2c]
imul eax, dword [ebp - 0x30], 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 0x4105fb
cmp dword [ebp - 0x30], 0
jne 0x41052b
mov eax, dword [ebp - 0x2c]
test eax, eax
jle 0x410525
cmp eax, 0x3e8
mov dword [ebp - 0x24], 0x3e8
cmovl eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 0xa8]
lea esi, [ebp - 0x30]
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 - 0x40]
mov edx, ebx
mov dword [ebp - 0x1c], ebx
shr edx, 0x1f
call fcn.0040e5f0
lea esi, [edi + 0xc0]
test ebx, ebx
jle 0x4105fb
push dword [edi + 0xa8]
push dword [edi + 0x30]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x4105fb
lea ecx, [edi + 0x30]
call fcn.0040fc50
test al, al
jne 0x4105f4
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x14]
mov ebx, dword [edi + 0x14]
mov al, 1
mov byte [ebp - 0xd], al
mov byte [ebp - 0x34], 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 0x4105f1
lea eax, [ebx + 0x38]
push eax
call dword [ebp - 0x14]
lea eax, [edi + 0xd8]
mov dword [eax + 0x14], 0
mov ecx, dword [ebx + 0x58]
test ecx, ecx
je 0x4105da
mov dword [ecx + 0x14], eax
jmp 0x4105dd
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 - 0x18]
mov ebx, dword [ebp - 0x1c]
dec ebx
cmp byte [ebp - 0xd], 0
jne 0x41060a
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x14]
mov al, 1
mov byte [ebp - 0xd], al
mov byte [ebp - 0x34], al
test ebx, ebx
mov ebx, dword [ebp + 0xc]
jle 0x41065c
push ebx
lea eax, [edi + 0x8c]
mov ecx, esi
push eax
call fcn.0040e4f0
push ebx
lea eax, [edi + 0x8c]
push eax
lea ecx, [edi + 0xb4]
call fcn.0040e4f0
lea ebx, [edi + 0x70]
mov esi, 2
mov edi, dword [ebp - 0x28]
nop
push dword [ebp + 0xc]
mov ecx, edi
push ebx
call fcn.0040e4f0
sub ebx, 0x1c
sub edi, 0xc
sub esi, 1
jns 0x410640
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp + 0xc]
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x410675
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x10]
mov esi, dword [esi + 4]
test esi, esi
jne 0x410666
cmp byte [ebp - 0xd], 0
je 0x410682
lea eax, [edi + 0x18]
push eax
call dword [ebp - 0x18]
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