Function at 0x4016c0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x318
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x334]
mov eax, 0x10624dd3
imul ecx
mov eax, edx
push edi
sar eax, 6
mov edx, eax
mov dword [esp + 0x10], esi
shr edx, 0x1f
add eax, edx
mov edx, dword [0x40f964]
test edx, edx
jne 0x401704
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x318
ret 0x10
mov ebp, dword [esi + 4]
cmp ebp, 0xffffffff
jne 0x40171b
pop edi
or eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x318
ret 0x10
mov dword [esp + 0x14], eax
lea eax, [eax + eax*4]
mov esi, dword [esp + 0x32c]
mov edi, dword [esp + 0x330]
lea eax, [eax + eax*4]
mov ebx, dword [esp + 0x334]
lea edx, [esp + 0x1c]
lea eax, [eax + eax*4]
shl eax, 3
sub ecx, eax
lea eax, [ecx + ecx*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
lea eax, [esp + 0x120]
shl ecx, 3
neg esi
sbb esi, esi
mov dword [esp + 0x18], ecx
and esi, edx
lea ecx, [esp + 0x224]
neg edi
sbb edi, edi
and edi, eax
neg ebx
sbb ebx, ebx
and ebx, ecx
test esi, esi
je 0x401780
mov dword [esi], 0
test edi, edi
je 0x40178a
mov dword [edi], 0
test ebx, ebx
je 0x401794
mov dword [ebx], 0
test esi, esi
je 0x4017c1
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
jbe 0x4017af
lea edx, [esi + 4]
cmp dword [edx], ebp
je 0x4017af
inc eax
add edx, 4
cmp eax, ecx
jb 0x4017a3
cmp eax, ecx
jne 0x4017c1
cmp ecx, 0x40
jae 0x4017c1
mov dword [esi + eax*4 + 4], ebp
mov eax, dword [esi]
inc eax
mov dword [esi], eax
test edi, edi
je 0x4017ee
mov ecx, dword [edi]
xor eax, eax
test ecx, ecx
jbe 0x4017dc
lea edx, [edi + 4]
cmp dword [edx], ebp
je 0x4017dc
inc eax
add edx, 4
cmp eax, ecx
jb 0x4017d0
cmp eax, ecx
jne 0x4017ee
cmp ecx, 0x40
jae 0x4017ee
mov dword [edi + eax*4 + 4], ebp
mov eax, dword [edi]
inc eax
mov dword [edi], eax
test ebx, ebx
je 0x40181b
mov ecx, dword [ebx]
xor eax, eax
test ecx, ecx
jbe 0x401809
lea edx, [ebx + 4]
cmp dword [edx], ebp
je 0x401809
inc eax
add edx, 4
cmp eax, ecx
jb 0x4017fd
cmp eax, ecx
jne 0x40181b
cmp ecx, 0x40
jae 0x40181b
mov dword [ebx + eax*4 + 4], ebp
mov eax, dword [ebx]
inc eax
mov dword [ebx], eax
mov eax, dword [esp + 0x32c]
test eax, eax
je 0x40182c
mov dword [eax], 0
mov eax, dword [esp + 0x330]
test eax, eax
je 0x40183d
mov dword [eax], 0
mov eax, dword [esp + 0x334]
test eax, eax
je 0x40184e
mov dword [eax], 0
lea edx, [esp + 0x14]
push edx
push ebx
push edi
push esi
push 0
call dword [0x40b160]
test eax, eax
jne 0x401874
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x318
ret 0x10
cmp eax, 0xffffffff
jne 0x401888
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x318
ret 0x10
test esi, esi
je 0x4018ad
push esi
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 4]
push eax
call fcn.004030e0
test eax, eax
je 0x4018b1
mov ecx, dword [esp + 0x32c]
mov dword [ecx], 1
jmp 0x4018b1
mov esi, dword [esp + 0x10]
test edi, edi
je 0x4018d0
mov edx, dword [esi + 4]
push edi
push edx
call fcn.004030e0
test eax, eax
je 0x4018d0
mov eax, dword [esp + 0x330]
mov dword [eax], 1
test ebx, ebx
je 0x4018ef
mov ecx, dword [esi + 4]
push ebx
push ecx
call fcn.004030e0
test eax, eax
je 0x4018ef
mov edx, dword [esp + 0x334]
mov dword [edx], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x318
ret 0x10