Function at 0x466e40
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
mov eax, dword [0x51df40]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
mov ecx, 0x7d0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x318], ebx
mov dword [ebp - 0x320], ecx
mov dword [ebp - 0x324], 0
jne 0x466e93
movzx eax, word [ebx + 4]
test al, 8
jne 0x466e93
or eax, 8
mov dword [ebp - 0x324], 1
mov word [ebx + 4], ax
mov eax, dword [ebp + 0x10]
nop word [eax + eax]
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0
jne 0x46716c
test eax, eax
js 0x466ebb
cmp eax, ecx
cmovl ecx, eax
mov dword [ebp - 0x320], ecx
mov eax, 0x10624dd3
mov dword [ebp - 0x31c], 0
imul ecx
xor edi, edi
xor esi, esi
sar edx, 6
mov eax, edx
mov dword [ebp - 0x108], edi
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x310], esi
mov dword [ebp - 0x338], eax
xor edx, edx
imul eax, eax, 0x3e8
mov dword [ebp - 0x20c], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x334], eax
xor eax, eax
mov dword [ebp - 0x314], eax
cmp dword [ebp + 0xc], eax
jbe 0x467080
lea ecx, [ebx + 6]
mov dword [ebp - 0x328], ecx
mov ecx, eax
nop dword [eax]
nop dword [eax + eax]
mov ebx, dword [ebp - 0x328]
lea eax, [ebx + eax*8]
mov dword [ebp - 0x330], eax
movzx eax, word [eax - 2]
mov ebx, eax
mov dword [ebp - 0x32c], ebx
test al, 0xd
je 0x46704a
test al, 1
je 0x466fac
xor ecx, ecx
test edi, edi
je 0x466f80
mov ebx, dword [ebp - 0x314]
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + ebx*8]
mov ebx, dword [ebp - 0x32c]
cmp dword [ebp + ecx*4 - 0x104], eax
je 0x466f80
inc ecx
cmp ecx, edi
jb 0x466f72
cmp ecx, edi
jne 0x466fac
cmp edi, 0x40
jae 0x466fac
mov edi, dword [ebp - 0x314]
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + edi*8]
mov dword [ebp + ecx*4 - 0x104], eax
mov edi, dword [ebp - 0x108]
inc edi
mov dword [ebp - 0x108], edi
test bl, 4
je 0x466ffa
mov ebx, dword [ebp - 0x318]
xor ecx, ecx
test edx, edx
je 0x466fd4
mov eax, dword [ebp - 0x314]
mov eax, dword [ebx + eax*8]
cmp dword [ebp + ecx*4 - 0x208], eax
je 0x466fd4
inc ecx
cmp ecx, edx
jb 0x466fc6
cmp ecx, edx
jne 0x466ffa
cmp edx, 0x40
jae 0x466ffa
mov eax, dword [ebp - 0x314]
mov eax, dword [ebx + eax*8]
mov dword [ebp + ecx*4 - 0x208], eax
mov edx, dword [ebp - 0x20c]
inc edx
mov dword [ebp - 0x20c], edx
mov ebx, dword [ebp - 0x318]
xor eax, eax
test esi, esi
je 0x46701e
mov ecx, dword [ebp - 0x314]
mov ecx, dword [ebx + ecx*8]
nop
cmp dword [ebp + eax*4 - 0x30c], ecx
je 0x46701e
inc eax
cmp eax, esi
jb 0x467010
cmp eax, esi
jne 0x467044
cmp esi, 0x40
jae 0x467044
mov ecx, dword [ebp - 0x314]
mov ecx, dword [ebx + ecx*8]
mov dword [ebp + eax*4 - 0x30c], ecx
mov esi, dword [ebp - 0x310]
inc esi
mov dword [ebp - 0x310], esi
mov ecx, dword [ebp - 0x31c]
mov eax, dword [ebp - 0x330]
xor ebx, ebx
mov word [eax], bx
mov eax, dword [ebp - 0x314]
mov ebx, dword [ebp - 0x318]
cmp dword [ebx + eax*8], ecx
cmova ecx, dword [ebx + eax*8]
inc eax
mov dword [ebp - 0x31c], ecx
mov dword [ebp - 0x314], eax
cmp eax, dword [ebp + 0xc]
jb 0x466f30
jmp 0x467082
xor ecx, ecx
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ecx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
test edi, edi
jg 0x4670e1
jne 0x467143
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4670ce
mov ecx, dword [ebp - 0x320]
sub eax, ecx
mov dword [ebp + 0x10], eax
test eax, eax
jg 0x466ea0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jbe 0x467143
lea esi, [ebx + 6]
mov ebx, dword [ebp + 0xc]
nop dword [eax]
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x467107
or word [esi], 1
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x46711e
or word [esi], 4
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x467135
or word [esi], 8
add esi, 8
sub ebx, 1
jne 0x4670f0
mov ebx, dword [ebp - 0x318]
cmp dword [ebp - 0x324], 0
je 0x467159
mov al, byte [ebx + 6]
or ecx, 0xffffffff
and al, 0xd
cmp al, 8
cmove edi, ecx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xfffffffe
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret