Function at 0x40f0b7
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x334], esi
mov dword [ebp - 0x330], esi
mov dword [ebp - 0x32c], esi
mov dword [ebp - 0x318], esi
cmp dword [ebp + 0x18], esi
jl 0x40f0fe
mov eax, bind
jg 0x40f0f8
cmp dword [ebp + 0x14], eax
jb 0x40f0fe
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], esi
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
or edi, 0xffffffff
cmp ebx, edi
jne 0x40f124
cmp ecx, edi
jne 0x40f124
cmp edx, edi
jne 0x40f124
push dword [ebp + 0x14]
call fcn.0040f08f
pop ecx
jmp 0x40f430
cmp dword [ebp + 0x18], esi
jl 0x40f15d
jg 0x40f130
cmp dword [ebp + 0x14], esi
jbe 0x40f15d
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x318], eax
lea eax, [ebp - 0x344]
push eax
call fcn.004261eb
mov edx, dword [ebp + 0x10]
mov esi, eax
lea edi, [ebp - 0x334]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
mov ecx, dword [ebp + 0xc]
or edi, 0xffffffff
xor esi, esi
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x314], edi
mov dword [ebp - 0x20c], esi
cmp ebx, edi
je 0x40f194
xor esi, esi
inc esi
mov dword [ebp - 0x208], ebx
mov dword [ebp - 0x20c], esi
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x314], ebx
cmp ecx, edi
je 0x40f211
xor eax, eax
test esi, esi
je 0x40f1ac
cmp dword [ebp + eax*4 - 0x208], ecx
je 0x40f1ac
inc eax
cmp eax, esi
jb 0x40f19e
cmp eax, esi
jne 0x40f1c9
cmp esi, 0x40
jae 0x40f1c9
mov dword [ebp + eax*4 - 0x208], ecx
mov esi, dword [ebp - 0x20c]
inc esi
mov dword [ebp - 0x20c], esi
xor eax, eax
cmp eax, dword [ebp - 0x108]
jae 0x40f1eb
cmp dword [ebp + eax*4 - 0x104], ecx
je 0x40f1e5
inc eax
cmp eax, dword [ebp - 0x108]
jb 0x40f1d3
cmp eax, dword [ebp - 0x108]
jne 0x40f203
cmp dword [ebp - 0x108], 0x40
jae 0x40f203
mov dword [ebp + eax*4 - 0x104], ecx
inc dword [ebp - 0x108]
cmp ecx, dword [ebp - 0x314]
jbe 0x40f211
mov dword [ebp - 0x314], ecx
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x310], ecx
cmp edx, edi
je 0x40f26a
mov edi, dword [ebp - 0x108]
inc ecx
xor eax, eax
mov dword [ebp - 0x30c], edx
mov dword [ebp - 0x310], ecx
cmp edi, ebx
jbe 0x40f246
cmp dword [ebp + eax*4 - 0x104], edx
je 0x40f246
inc eax
cmp eax, edi
jb 0x40f238
cmp eax, edi
jne 0x40f25c
cmp edi, 0x40
jae 0x40f25c
mov dword [ebp + eax*4 - 0x104], edx
inc dword [ebp - 0x108]
cmp edx, dword [ebp - 0x314]
jbe 0x40f26a
mov dword [ebp - 0x314], edx
cmp dword [ebp + 0x18], ebx
jg 0x40f27e
jl 0x40f276
cmp dword [ebp + 0x14], ebx
jae 0x40f27e
mov dword [ebp - 0x31c], ebx
jmp 0x40f28a
lea eax, [ebp - 0x324]
mov dword [ebp - 0x31c], eax
mov ebx, dword [ebp - 0x314]
inc ebx
jmp 0x40f29f
mov esi, dword [ebp - 0x20c]
mov ecx, dword [ebp - 0x310]
xor eax, eax
cmp dword [ebp + 0x18], eax
jl 0x40f2c9
jg 0x40f2ad
cmp dword [ebp + 0x14], eax
jbe 0x40f2c9
mov eax, dword [ebp - 0x318]
cdq
mov edi, 0x3e8
idiv edi
imul edx, edx, 0x3e8
mov dword [ebp - 0x320], edx
jmp 0x40f2d7
mov edx, dword [ebp + 0x14]
or edx, dword [ebp + 0x18]
jne 0x40f2dd
mov dword [ebp - 0x320], eax
mov dword [ebp - 0x324], eax
push dword [ebp - 0x31c]
neg ecx
lea eax, [ebp - 0x108]
push eax
sbb ecx, ecx
lea eax, [ebp - 0x310]
and ecx, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x20c]
push ecx
and esi, eax
push esi
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40f383
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40f32a
cmp dword [0x463aa0], 0
jne 0x40f387
cmp eax, 0x2714
jne 0x40f387
cmp dword [ebp + 0x18], 0
jl 0x40f293
jg 0x40f340
cmp dword [ebp + 0x14], 0
jbe 0x40f293
lea eax, [ebp - 0x344]
push eax
call fcn.004261eb
sub esp, 0xc
mov edi, esp
lea esi, [ebp - 0x334]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0042626f
mov ecx, dword [ebp + 0x14]
sub ecx, eax
add esp, 0x20
mov dword [ebp - 0x318], ecx
test ecx, ecx
jg 0x40f293
xor eax, eax
test eax, eax
jns 0x40f38f
or eax, 0xffffffff
jmp 0x40f430
jne 0x40f398
xor eax, eax
jmp 0x40f430
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
je 0x40f3ca
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f3b4
inc esi
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f3ca
or esi, 4
cmp dword [ebp + 0xc], 0xffffffff
je 0x40f3fc
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f3e6
or esi, 8
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f3fc
or esi, 4
cmp dword [ebp + 0x10], 0xffffffff
je 0x40f42e
lea eax, [ebp - 0x310]
push eax
push dword [ebp + 0x10]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f418
or esi, 2
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f42e
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043c86a
leave
ret