Function at 0x46ad40
Capabilities:
Get socket status

Disassembly:
mov eax, 0x301c
call fcn.00426320
push ebx
push ebp
mov ebp, dword [esp + 0x302c]
push esi
cmp ebp, 0xffffffff
push edi
jne 0x46ad7e
cmp dword [esp + 0x3038], ebp
jne 0x46ad7e
mov eax, dword [esp + 0x303c]
push eax
call fcn.0046afe0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x301c
ret
mov ebx, dword [esp + 0x303c]
mov esi, ebx
call fcn.0045fc10
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor eax, eax
xor ecx, ecx
xor edi, edi
cmp ebp, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1024], eax
je 0x46adc7
mov ecx, 1
mov dword [esp + 0x1028], ebp
mov dword [esp + 0x1024], ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ecx
mov edi, ebp
mov edx, dword [esp + 0x3038]
mov dword [esp + 0x2028], eax
cmp edx, 0xffffffff
je 0x46ae36
xor eax, eax
mov dword [esp + 0x202c], edx
test ecx, ecx
mov dword [esp + 0x2028], 1
jbe 0x46ae17
lea edx, [esp + 0x24]
mov ebp, dword [esp + 0x3038]
cmp dword [edx], ebp
je 0x46ae09
inc eax
add edx, 4
cmp eax, ecx
jb 0x46adf6
mov ebp, dword [esp + 0x3034]
mov edx, dword [esp + 0x3038]
cmp eax, ecx
jne 0x46ae30
cmp ecx, 0x400
jae 0x46ae30
mov dword [esp + eax*4 + 0x24], edx
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp edx, edi
jbe 0x46ae36
mov edi, edx
xor ecx, ecx
lea edx, [esp + 0x18]
test ebx, ebx
setl cl
dec ecx
and ecx, edx
je 0x46ae89
mov eax, 0x10624dd3
mov dword [esp + 0x18], 1
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jg 0x46ae68
mov dword [esp + 0x18], edx
mov eax, esi
mov ebp, 0x3e8
cdq
idiv ebp
mov ebp, dword [esp + 0x3034]
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 0x1c], edx
push ecx
lea eax, [esp + 0x24]
lea ecx, [esp + 0x202c]
push eax
lea edx, [esp + 0x102c]
push ecx
inc edi
push edx
push edi
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jne 0x46aef7
test ebx, ebx
jl 0x46aed4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0045fc10
push edx
push eax
call fcn.0045fc70
mov esi, ebx
add esp, 0x10
sub esi, eax
test esi, esi
jle 0x46af56
mov eax, dword [esp + 0x3030]
test eax, eax
je 0x46ad94
mov edx, eax
push edx
call fcn.0045ff70
add esp, 4
test eax, eax
jne 0x46af56
jmp 0x46ad94
cmp eax, 0xffffffff
jne 0x46af42
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test eax, eax
je 0x46af46
cmp eax, 0x2726
je 0x46af46
cmp eax, 0x2719
je 0x46af46
test ebx, ebx
jl 0x46ad94
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0045fc10
push edx
push eax
call fcn.0045fc70
mov esi, ebx
add esp, 0x10
sub esi, eax
test esi, esi
jle 0x46af46
jmp 0x46ad94
test eax, eax
jge 0x46af54
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x301c
ret
jne 0x46af63
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x301c
ret
xor esi, esi
cmp ebp, 0xffffffff
je 0x46af93
lea edx, [esp + 0x1024]
push edx
push ebp
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x46af81
mov esi, 1
lea eax, [esp + 0x20]
push eax
push ebp
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x46af93
or esi, 4
mov edi, dword [esp + 0x3038]
cmp edi, 0xffffffff
je 0x46afc6
lea ecx, [esp + 0x2028]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x46afb4
or esi, 2
lea edx, [esp + 0x20]
push edx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x46afc6
or esi, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x301c
ret