Function at 0x4014b0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x33c
mov eax, dword [0x44a00c]
xor eax, esp
mov dword [esp + 0x338], eax
cmp dword [0x44bb94], 0
push ebx
push esi
push edi
mov dword [esp + 0x14], edx
mov ebx, ecx
jne 0x401512
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.WSAPoll
push eax
mov dword [0x44bb94], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x44bb98], eax
test eax, eax
je 0x401537
push str._Above_Windows_7__Use__WSAPoll__replace__select__function_._n
call fcn.0040eaf0
mov edx, dword [esp + 0x18]
add esp, 4
mov eax, dword [0x44bb98]
test eax, eax
je 0x401537
push dword [ebp + 8]
push edx
push ebx
call eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x338]
xor ecx, esp
call fcn.0041be62
mov esp, ebp
pop ebp
ret
xor eax, eax
xor edi, edi
xor edx, edx
mov dword [esp + 0x28], edi
xor esi, esi
mov dword [esp + 0x130], edx
mov dword [esp + 0x238], esi
mov dword [esp + 0x10], eax
cmp dword [esp + 0x14], eax
jbe 0x401648
nop
movzx eax, word [ebx + eax*8 + 4]
mov dword [esp + 0x18], eax
test eax, 0x300
je 0x4015ac
xor ecx, ecx
test edi, edi
je 0x40158b
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax*8]
nop dword [eax]
cmp dword [esp + ecx*4 + 0x2c], eax
je 0x40158b
inc ecx
cmp ecx, edi
jb 0x401580
cmp ecx, edi
jne 0x4015a8
cmp edi, 0x40
jae 0x4015a8
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax*8]
mov dword [esp + ecx*4 + 0x2c], eax
mov edi, dword [esp + 0x28]
inc edi
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x18]
test al, 0x10
je 0x4015f4
xor ecx, ecx
test edx, edx
je 0x4015ce
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax*8]
nop dword [eax]
cmp dword [esp + ecx*4 + 0x134], eax
je 0x4015ce
inc ecx
cmp ecx, edx
jb 0x4015c0
cmp ecx, edx
jne 0x4015f4
cmp edx, 0x40
jae 0x4015f4
mov eax, dword [esp + 0x10]
mov eax, dword [ebx + eax*8]
mov dword [esp + ecx*4 + 0x134], eax
mov edx, dword [esp + 0x130]
inc edx
mov dword [esp + 0x130], edx
xor eax, eax
test esi, esi
je 0x40160f
mov ecx, dword [esp + 0x10]
mov ecx, dword [ebx + ecx*8]
cmp dword [esp + eax*4 + 0x23c], ecx
je 0x40160f
inc eax
cmp eax, esi
jb 0x401601
cmp eax, esi
jne 0x401635
cmp esi, 0x40
jae 0x401635
mov ecx, dword [esp + 0x10]
mov ecx, dword [ebx + ecx*8]
mov dword [esp + eax*4 + 0x23c], ecx
mov esi, dword [esp + 0x238]
inc esi
mov dword [esp + 0x238], esi
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x14]
jb 0x401560
mov ecx, dword [ebp + 8]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x23c]
push eax
lea eax, [esp + 0x138]
push eax
lea eax, [esp + 0x34]
push eax
push 0x40
call dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x401753
cmp dword [esp + 0x14], 0
jbe 0x401753
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea esi, [ebx + 6]
lea eax, [esp + 0x28]
push eax
push dword [esi - 6]
call edi
mov ebx, eax
lea eax, [esp + 0x130]
push eax
push dword [esi - 6]
call edi
mov edi, eax
lea eax, [esp + 0x238]
push eax
push dword [esi - 6]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test ebx, ebx
je 0x4016ec
mov ecx, 0x300
or word [esi], cx
test edi, edi
je 0x4016f4
or word [esi], 0x10
test ebx, ebx
je 0x4016fc
test edi, edi
jne 0x401700
test eax, eax
je 0x40173b
lea eax, [esp + 0x18]
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x1c], 4
push eax
push 0x1007
push 0xffff
push dword [esi - 6]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x401737
cmp dword [esp + 0x10], eax
je 0x40173b
or word [esi], 1
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
add esi, 8
sub dword [esp + 0x14], 1
jne 0x4016b4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x344]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041be62
mov esp, ebp
pop ebp
ret