Function at 0x40f43f
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x33c], ebx
mov dword [ebp - 0x338], ebx
mov dword [ebp - 0x334], ebx
mov dword [ebp - 0x320], ebx
cmp edx, ebx
je 0x40f48f
xor eax, eax
cmp dword [ebp + 0xc], ebx
jbe 0x40f48f
cmp dword [edx + eax*8], 0xffffffff
jne 0x40f49d
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x40f483
push dword [ebp + 0x10]
call fcn.0040f08f
pop ecx
jmp 0x40f7a7
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jle 0x40f4c9
mov dword [ebp - 0x320], eax
lea eax, [ebp - 0x34c]
push eax
call fcn.004261eb
mov edx, dword [ebp - 0x318]
mov esi, eax
lea edi, [ebp - 0x33c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
movsd dword es:[edi], dword [esi]
xor ecx, ecx
xor esi, esi
xor edi, edi
or dword [ebp - 0x31c], 0xffffffff
mov dword [ebp - 0x20c], ecx
mov dword [ebp - 0x310], esi
mov dword [ebp - 0x108], edi
mov dword [ebp - 0x314], ebx
jmp 0x40f4f6
mov edx, dword [ebp - 0x318]
mov eax, dword [ebp - 0x314]
shl eax, 3
mov dword [ebp - 0x324], eax
xor ebx, ebx
lea eax, [eax + edx + 4]
mov word [eax + 2], bx
mov ebx, dword [ebp - 0x324]
mov edx, dword [ebx + edx]
cmp edx, 0xffffffff
je 0x40f5e6
movzx ebx, word [eax]
test ebx, 0x710
je 0x40f5e6
cmp edx, dword [ebp - 0x31c]
jbe 0x40f53e
mov dword [ebp - 0x31c], edx
test ebx, 0x300
je 0x40f577
xor eax, eax
test ecx, ecx
je 0x40f55a
cmp dword [ebp + eax*4 - 0x208], edx
je 0x40f55a
inc eax
cmp eax, ecx
jb 0x40f54c
cmp eax, ecx
jne 0x40f577
cmp ecx, 0x40
jae 0x40f577
mov dword [ebp + eax*4 - 0x208], edx
mov ecx, dword [ebp - 0x20c]
inc ecx
mov dword [ebp - 0x20c], ecx
test bl, 0x10
je 0x40f5ad
xor eax, eax
test esi, esi
je 0x40f590
cmp dword [ebp + eax*4 - 0x30c], edx
je 0x40f590
inc eax
cmp eax, esi
jb 0x40f582
cmp eax, esi
jne 0x40f5ad
cmp esi, 0x40
jae 0x40f5ad
mov dword [ebp + eax*4 - 0x30c], edx
mov esi, dword [ebp - 0x310]
inc esi
mov dword [ebp - 0x310], esi
test ebx, 0x600
je 0x40f5e6
xor eax, eax
test edi, edi
je 0x40f5c9
cmp dword [ebp + eax*4 - 0x104], edx
je 0x40f5c9
inc eax
cmp eax, edi
jb 0x40f5bb
cmp eax, edi
jne 0x40f5e6
cmp edi, 0x40
jae 0x40f5e6
mov dword [ebp + eax*4 - 0x104], edx
mov edi, dword [ebp - 0x108]
inc edi
mov dword [ebp - 0x108], edi
inc dword [ebp - 0x314]
mov eax, dword [ebp - 0x314]
cmp eax, dword [ebp + 0xc]
jb 0x40f4f0
xor ebx, ebx
cmp ecx, ebx
jne 0x40f60d
cmp esi, ebx
jne 0x40f60d
cmp edi, ebx
je 0x40f48f
cmp dword [ebp + 0x10], ebx
jge 0x40f61a
mov dword [ebp - 0x314], ebx
jmp 0x40f626
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x314], eax
mov eax, dword [ebp - 0x31c]
inc eax
mov dword [ebp - 0x324], eax
jmp 0x40f647
mov ecx, dword [ebp - 0x20c]
mov esi, dword [ebp - 0x310]
mov edi, dword [ebp - 0x108]
cmp dword [ebp + 0x10], ebx
jle 0x40f66e
mov eax, dword [ebp - 0x320]
cdq
mov ebx, 0x3e8
idiv ebx
imul edx, edx, 0x3e8
mov dword [ebp - 0x32c], eax
mov dword [ebp - 0x328], edx
jmp 0x40f67c
jne 0x40f67c
mov dword [ebp - 0x32c], ebx
mov dword [ebp - 0x328], ebx
push dword [ebp - 0x314]
neg edi
sbb edi, edi
lea eax, [ebp - 0x108]
and edi, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x310]
and esi, eax
neg ecx
push edi
sbb ecx, ecx
lea eax, [ebp - 0x20c]
push esi
and ecx, eax
push ecx
push dword [ebp - 0x324]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40f723
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ebx, ebx
cmp eax, ebx
je 0x40f6d5
cmp dword [0x463aa0], ebx
jne 0x40f729
cmp eax, 0x2714
jne 0x40f729
cmp dword [ebp + 0x10], ebx
jle 0x40f635
lea eax, [ebp - 0x34c]
push eax
call fcn.004261eb
sub esp, 0xc
mov edi, esp
lea esi, [ebp - 0x33c]
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 + 0x10]
sub ecx, eax
add esp, 0x20
mov dword [ebp - 0x320], ecx
cmp ecx, ebx
jg 0x40f635
xor eax, eax
jmp 0x40f725
xor ebx, ebx
cmp eax, ebx
jge 0x40f72e
or eax, 0xffffffff
jmp 0x40f7a7
jne 0x40f734
xor eax, eax
jmp 0x40f7a7
mov esi, dword [ebp - 0x318]
mov edi, dword [ebp + 0xc]
add esi, 6
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x40f79f
lea ecx, [ebp - 0x20c]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f766
mov eax, 0x300
or word [esi], ax
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f77d
or word [esi], 0x10
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40f798
mov eax, 0x400
or word [esi], ax
cmp word [esi], 0
je 0x40f79f
inc ebx
add esi, 8
dec edi
jne 0x40f740
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043c86a
leave
ret