Function at 0x4168cf
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
mov eax, dword [0x53b070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x328], edx
mov dword [ebp - 0x338], esi
push edi
test esi, esi
je 0x41690a
xor edi, edi
mov eax, edi
test edx, edx
je 0x41690a
cmp dword [esi + eax*8], 0xffffffff
jne 0x416926
inc eax
cmp eax, edx
jb 0x4168ff
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004167c1
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ca9ff
leave
ret
or dword [ebp - 0x324], 0xffffffff
mov ebx, edi
mov ecx, edi
mov dword [ebp - 0x218], ebx
xor eax, eax
mov dword [ebp - 0x110], ecx
mov dword [ebp - 0x320], edi
mov dword [ebp - 0x330], eax
xor edx, edx
mov word [esi + eax*8 + 6], dx
mov edx, dword [esi + eax*8]
cmp edx, 0xffffffff
je 0x416a56
jae 0x416a84
movzx ecx, word [esi + eax*8 + 4]
mov dword [ebp - 0x32c], ecx
test cl, 7
mov ecx, dword [ebp - 0x110]
je 0x416a56
cmp edx, dword [ebp - 0x324]
mov eax, edx
cmovbe eax, dword [ebp - 0x324]
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x32c]
test al, 1
je 0x4169d4
xor eax, eax
test ebx, ebx
je 0x4169b1
cmp dword [ebp + eax*4 - 0x214], edx
je 0x4169b1
inc eax
cmp eax, ebx
jb 0x4169a3
cmp eax, ebx
jne 0x4169ce
cmp ebx, 0x40
jae 0x4169ce
mov dword [ebp + eax*4 - 0x214], edx
mov ebx, dword [ebp - 0x218]
inc ebx
mov dword [ebp - 0x218], ebx
mov eax, dword [ebp - 0x32c]
test al, 4
je 0x416a0f
xor eax, eax
test ecx, ecx
je 0x4169ec
cmp dword [ebp + eax*4 - 0x10c], edx
je 0x4169ec
inc eax
cmp eax, ecx
jb 0x4169de
cmp eax, ecx
jne 0x416a09
cmp ecx, 0x40
jae 0x416a09
mov dword [ebp + eax*4 - 0x10c], edx
mov ecx, dword [ebp - 0x110]
inc ecx
mov dword [ebp - 0x110], ecx
mov eax, dword [ebp - 0x32c]
test al, 2
je 0x416a50
xor eax, eax
test edi, edi
je 0x416a27
cmp dword [ebp + eax*4 - 0x31c], edx
je 0x416a27
inc eax
cmp eax, edi
jb 0x416a19
cmp eax, edi
jne 0x416a44
cmp edi, 0x40
jae 0x416a44
mov dword [ebp + eax*4 - 0x31c], edx
mov edi, dword [ebp - 0x320]
inc edi
mov dword [ebp - 0x320], edi
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x330]
inc eax
mov dword [ebp - 0x330], eax
cmp eax, dword [ebp - 0x328]
jb 0x41694b
test ebx, ebx
jne 0x416a97
test ecx, ecx
jne 0x416a97
test edi, edi
jne 0x416a97
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004167c1
pop ecx
pop ecx
jmp 0x416aeb
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x416917
push dword [ebp + 0xc]
lea ecx, [ebp - 0x334]
push dword [ebp + 8]
call fcn.0041b9c9
pop ecx
pop ecx
push eax
xor eax, eax
lea esi, [ebp - 0x320]
test edi, edi
lea ecx, [ebp - 0x110]
cmove esi, eax
cmp dword [ebp - 0x110], eax
push esi
cmove ecx, eax
xor edi, edi
test ebx, ebx
lea eax, [ebp - 0x218]
push ecx
cmove eax, edi
push eax
mov eax, dword [ebp - 0x324]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, dword [ebp - 0x338]
test eax, eax
jle 0x416917
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
xor edi, edi
mov eax, dword [ebp - 0x328]
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x416b6b
lea eax, [ebp - 0x218]
push eax
push dword [esi - 6]
call ebx
test eax, eax
je 0x416b29
test byte [esi - 2], 1
je 0x416b29
or word [esi], 1
lea eax, [ebp - 0x110]
push eax
push dword [esi - 6]
call ebx
test eax, eax
je 0x416b43
test byte [esi - 2], 4
je 0x416b43
or word [esi], 4
lea eax, [ebp - 0x320]
push eax
push dword [esi - 6]
call ebx
test eax, eax
je 0x416b5d
test byte [esi - 2], 2
je 0x416b5d
or word [esi], 2
xor eax, eax
cmp word [esi], ax
mov eax, dword [ebp - 0x328]
je 0x416b6b
inc edi
add esi, 8
sub eax, 1
mov dword [ebp - 0x328], eax
jne 0x416b04
mov eax, edi
jmp 0x416917