Function at 0x413ef0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x35c
mov edi, dword [ebp + 0x14]
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 0x348], 0
mov dword [ebp - 0x34c], 0
jne 0x413f29
cmp dword [ebp + 0xc], 0xffffffff
jne 0x413f29
cmp dword [ebp + 0x10], 0xffffffff
je 0x414311
xor esi, esi
test edi, edi
jle 0x413f42
call fcn.00420e30
mov esi, edi
mov dword [ebp - 0x348], eax
mov dword [ebp - 0x34c], edx
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x324], 0
je 0x413f7f
mov eax, dword [ebp + 8]
mov dword [ebp - 0x324], 1
mov dword [ebp - 0x11c], 1
mov dword [ebp - 0x320], eax
mov dword [ebp - 0x118], eax
cmp dword [ebp + 0xc], 0xffffffff
je 0x4142f7
mov edx, dword [ebp - 0x324]
test edx, edx
je 0x41433b
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x320], eax
je 0x414355
lea ebx, [ebp - 0x324]
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x33c], ebx
jmp 0x413fc6
cmp dword [ebx + eax*4 + 4], ecx
je 0x413fe5
add eax, 1
cmp eax, edx
jne 0x413fc0
cmp eax, 0x3f
ja 0x413fe5
mov ebx, dword [ebp + 0xc]
add edx, 1
mov dword [ebp - 0x324], edx
mov dword [ebp + eax*4 - 0x320], ebx
mov edx, dword [ebp - 0x11c]
test edx, edx
je 0x41432e
mov eax, dword [ebp + 0xc]
lea ebx, [ebp - 0x11c]
cmp dword [ebp - 0x118], eax
je 0x414036
xor eax, eax
mov ecx, dword [ebp + 0xc]
lea ebx, [ebp - 0x11c]
jmp 0x414017
cmp dword [ebx + eax*4 + 4], ecx
je 0x414036
add eax, 1
cmp eax, edx
jne 0x414011
cmp eax, 0x3f
ja 0x414036
mov ecx, dword [ebp + 0xc]
add edx, 1
mov dword [ebp - 0x11c], edx
mov dword [ebp + eax*4 - 0x118], ecx
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 8], eax
mov ecx, eax
cmovae ecx, dword [ebp + 8]
cmp dword [ebp + 0x10], 0xffffffff
mov dword [ebp - 0x220], 0
je 0x4140d9
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x220], 1
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x11c]
test eax, eax
mov edx, eax
mov dword [ebp - 0x340], eax
je 0x41434e
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x118], eax
je 0x4140d2
mov dword [ebp - 0x340], ecx
xor eax, eax
mov ecx, dword [ebp + 0x10]
jmp 0x4140a1
cmp dword [ebx + eax*4 + 4], ecx
je 0x4142d6
add eax, 1
cmp eax, edx
jne 0x414097
cmp eax, 0x3f
mov ecx, dword [ebp - 0x340]
mov dword [ebp - 0x340], edx
ja 0x4140d2
mov edx, dword [ebp + 0x10]
mov dword [ebp + eax*4 - 0x118], edx
mov edx, dword [ebp - 0x340]
add edx, 1
mov dword [ebp - 0x11c], edx
cmp ecx, dword [ebp + 0x10]
cmovb ecx, dword [ebp + 0x10]
xor edx, edx
test edi, edi
lea eax, [ebp - 0x32c]
cmovs eax, edx
mov dword [ebp - 0x340], eax
lea eax, [ecx + 1]
mov dword [ebp - 0x344], eax
cmp edi, 0
jle 0x4141d0
mov eax, 0x10624dd3
imul esi
mov eax, esi
sar eax, 0x1f
sar edx, 6
sub edx, eax
mov eax, esi
mov dword [ebp - 0x32c], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [ebp - 0x328], eax
mov eax, dword [ebp - 0x340]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x220]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x33c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x344]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
cmp eax, 0xffffffff
jne 0x4141f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41418b
mov edx, dword [0x473280]
test edx, edx
jne 0x4142e8
cmp eax, 0x2714
jne 0x4142e8
test edi, edi
jle 0x4140f5
call fcn.00420e30
mov ecx, dword [ebp - 0x348]
mov esi, edi
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x34c]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
call fcn.00420e60
sub esi, eax
test esi, esi
jg 0x4140f5
xor edi, edi
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
jne 0x41412b
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x328], 0
jmp 0x41412b
test eax, eax
js 0x4142e8
je 0x4141c4
xor edi, edi
cmp dword [ebp + 8], 0xffffffff
je 0x414240
mov eax, dword [ebp - 0x33c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
setne al
movzx eax, al
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
mov edx, edi
or edx, 4
sub esp, 8
test eax, eax
cmovne edi, edx
cmp dword [ebp + 0xc], 0xffffffff
je 0x414284
mov eax, dword [ebp - 0x33c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
mov edx, edi
or edx, 8
sub esp, 8
test eax, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], ebx
cmovne edi, edx
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
mov edx, edi
or edx, 4
sub esp, 8
test eax, eax
cmovne edi, edx
cmp dword [ebp + 0x10], 0xffffffff
je 0x4141c6
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
mov edx, edi
or edx, 2
sub esp, 8
test eax, eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], ebx
cmovne edi, edx
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
mov edx, edi
or edx, 4
sub esp, 8
test eax, eax
cmovne edi, edx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x340]
cmp ecx, dword [ebp + 0x10]
cmovb ecx, dword [ebp + 0x10]
jmp 0x4140d9
lea esp, [ebp - 0xc]
mov edi, 0xffffffff
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x324]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x33c], eax
lea ebx, [ebp - 0x11c]
jmp 0x414042
test edi, edi
je 0x4141c4
js 0x414366
mov dword [esp], edi
nop
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x4141c4
xor eax, eax
lea ebx, [ebp - 0x11c]
jmp 0x414023
lea ebx, [ebp - 0x324]
xor eax, eax
mov dword [ebp - 0x33c], ebx
jmp 0x413fd2
xor eax, eax
jmp 0x4140b9
lea eax, [ebp - 0x324]
mov dword [ebp - 0x33c], eax
jmp 0x413fe5
mov dword [esp], 0x2726
mov edi, 0xffffffff
call dword [sym.imp.WS2_32.dll_WSASetLastError]
sub esp, 4
jmp 0x4141c6