Function at 0x466478
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd8
push ebx
push esi
push edi
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 8]
jne 0x466495
cmp dword [ebp + 0xc], 0
ja 0x46649d
jmp 0x466497
jg 0x46649d
xor eax, eax
xor edx, edx
jmp 0x4664a2
call fcn.004a4adc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
xor ecx, ecx
mov dword [ebp - 0x124], ecx
xor eax, eax
lea edx, [ebp - 0x120]
jmp 0x4664c2
cmp ebx, dword [edx]
je 0x4664ca
inc eax
add edx, 4
cmp eax, dword [ebp - 0x124]
jb 0x4664ba
mov edx, dword [ebp - 0x124]
cmp eax, edx
jne 0x4664e6
cmp edx, 0x40
jae 0x4664e6
mov dword [ebp + eax*4 - 0x120], ebx
inc dword [ebp - 0x124]
xor eax, eax
mov dword [ebp - 0x228], eax
xor eax, eax
lea edx, [ebp - 0x224]
jmp 0x466500
cmp ebx, dword [edx]
je 0x466508
inc eax
add edx, 4
cmp eax, dword [ebp - 0x228]
jb 0x4664f8
mov edx, dword [ebp - 0x228]
cmp eax, edx
jne 0x466524
cmp edx, 0x40
jae 0x466524
mov dword [ebp + eax*4 - 0x224], ebx
inc dword [ebp - 0x228]
cmp dword [ebp + 0x10], 0
lea edi, [ebp - 0x228]
jne 0x466538
cmp dword [ebp + 0xc], 0
jb 0x466577
jmp 0x46653a
jl 0x466577
push 0
push 0x3e8
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call fcn.004af4bf
mov dword [ebp - 8], eax
push 0
push 0x3e8
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call fcn.004af580
mov edx, eax
lea eax, [ebp - 8]
shl edx, 3
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
mov dword [ebp - 4], edx
jmp 0x466579
xor eax, eax
push eax
push edi
lea edx, [ebp - 0x124]
lea ecx, [ebx + 1]
push edx
push 0
push ecx
call sub.WS2_32.DLL_select
mov esi, eax
test esi, esi
jl 0x466597
xor eax, eax
jmp 0x46659c
call sub.WS2_32.DLL_WSAGetLastError
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
push edx
call fcn.00465c84
pop ecx
test esi, esi
jle 0x4665f5
push edi
push ebx
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
je 0x4665f5
mov dword [ebp - 0x10], 4
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xc]
push eax
push edx
push 0x1007
push 0xffff
push ebx
or esi, 0xffffffff
call sub.WS2_32.DLL_getsockopt
test eax, eax
je 0x4665e6
call sub.WS2_32.DLL_WSAGetLastError
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00465c84
pop ecx
jmp 0x466682
cmp esi, 0xffffffff
jne 0x466682
cmp dword [ebp + 0x10], 0
jne 0x46660c
cmp dword [ebp + 0xc], 0
jbe 0x466682
jmp 0x46660e
jle 0x466682
cmp dword [ebp - 0xc], 0x2714
jne 0x466682
call fcn.0042557c
test ax, ax
jne 0x466682
call fcn.004a4adc
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x14]
jne 0x46663a
cmp eax, dword [ebp - 0x18]
jbe 0x466682
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
push edx
push eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x10], 0
jne 0x46667c
cmp dword [ebp + 0xc], 0
jbe 0x466682
jmp 0x4664a8
jg 0x4664a8
test esi, esi
jge 0x46668b
or eax, 0xffffffff
jmp 0x4666a9
test esi, esi
jle 0x4666a7
lea edx, [ebp - 0x124]
push edx
push ebx
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
je 0x4666a7
mov eax, 1
jmp 0x4666a9
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret