Function at 0x440580
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x401c
call fcn.004874e0
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call fcn.00441730
mov esi, dword [ebp + 8]
push 0
push 0x3e8
push dword [ebp + 0xc]
push esi
call fcn.00487300
mov dword [ebp - 0x4018], eax
imul eax, eax, 0x3e8
push 0x4004
push 0x4ad1d8
sub esi, eax
imul eax, esi, 0x3e8
mov dword [ebp - 0x4014], eax
lea eax, [ebp - 0x4010]
push eax
call fcn.00460ec0
add esp, 0xc
lea eax, [ebp - 0x4018]
push eax
push 0
push 0
lea eax, [ebp - 0x4010]
push eax
push dword [0x4b9420]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x44061e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
jne 0x4407e3
jmp 0x4407d0
push 0
call fcn.0046d284
mov edi, dword [ebp - 0x4010]
add esp, 4
xor esi, esi
mov dword [0x4c9428], eax
mov dword [0x4c942c], edx
test edi, edi
jle 0x440698
mov ecx, dword [0x51387c]
or ebx, 0xffffffff
nop dword [eax + eax]
mov eax, 1
cmp ecx, eax
jle 0x44066e
mov edx, dword [ebp + esi*4 - 0x400c]
cmp dword [eax*4 + 0x4cf878], edx
je 0x44066e
inc eax
cmp eax, ecx
jl 0x440660
cmp eax, ecx
cmove eax, ebx
mov edx, dword [eax*4 + 0x4b5420]
test edx, edx
je 0x440693
push eax
mov eax, dword [edx + 0x38]
call eax
mov edi, dword [ebp - 0x4010]
add esp, 4
mov ecx, dword [0x51387c]
inc esi
cmp esi, edi
jl 0x440650
call fcn.00441730
mov esi, 1
cmp dword [0x4b9420], esi
jle 0x4407d0
nop
mov edx, dword [esi*4 + 0x4b5420]
test edx, edx
je 0x4407c3
mov ebx, dword [edx + 0x28]
mov ecx, edx
mov eax, ebx
or eax, dword [edx + 0x2c]
je 0x44074a
mov edi, dword [0x4c9428]
mov eax, dword [0x4c942c]
sub edi, ebx
sbb eax, dword [edx + 0x2c]
cmp eax, dword [0x4a7aac]
jl 0x44074a
jg 0x4406ed
cmp edi, dword [0x4a7aa8]
jbe 0x44074a
mov cl, byte [edx]
test cl, 2
je 0x440708
mov al, cl
and al, 0xc
cmp al, 8
je 0x440704
and cl, 0xf7
or cl, 4
mov byte [edx], cl
mov ecx, edx
jmp 0x44074a
push esi
push str.Session__d_timed_out_n
call fcn.00442790
lea eax, [esi - 1]
add esp, 8
cmp eax, 0xffe
ja 0x440743
mov ecx, dword [esi*4 + 0x4b5420]
test ecx, ecx
je 0x440743
test byte [ecx], 1
jne 0x44074a
mov ecx, esi
call fcn.004416b0
mov ecx, dword [esi*4 + 0x4b5420]
or byte [ecx], 1
jmp 0x44074a
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x40]
push esi
call eax
mov edi, dword [esi*4 + 0x4b5420]
add esp, 4
test edi, edi
je 0x4407c3
mov eax, dword [edi + 0x18]
cmp eax, 0x800
jne 0x44078f
cmp dword [edi + 0x10], eax
jne 0x44078f
lea eax, [esi - 1]
cmp eax, 0xffe
ja 0x4407c3
test byte [edi], 1
jne 0x4407c3
mov ecx, esi
call fcn.004416b0
mov eax, dword [esi*4 + 0x4b5420]
or byte [eax], 1
jmp 0x4407c3
mov edx, dword [edi + 0x20]
cmp eax, edx
jne 0x4407a6
mov dword [edi + 0x20], 0
mov dword [edi + 0x18], 0
jmp 0x4407c3
sub eax, edx
mov dword [edi + 0x18], eax
mov ecx, dword [edi + 8]
push eax
lea eax, [edx + ecx]
push eax
push ecx
call fcn.00460ec0
add esp, 0xc
mov dword [edi + 0x20], 0
inc esi
cmp esi, dword [0x4b9420]
jl 0x4406b0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
call fcn.0043f530
push eax
push str.do_sockets:_select___failed___s__n
call fcn.00442830
add esp, 8
push 1
call fcn.0047280f
int3