Function at 0x490090
Capabilities:
Get socket status

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x26c
mov dword [esp + 0x58], 0
mov dword [esp + 0x15c], 0
mov eax, dword [esp + 0x284]
test eax, eax
je 0x4906ae
mov edx, dword [esp + 0x280]
mov dword [esp + 0x34], 0
xor esi, esi
xor ebx, ebx
mov dword [edx + 0xc], 0
mov al, byte [edx]
cmp al, 2
je 0x49011c
cmp al, 3
je 0x4903f0
dec al
je 0x490340
test esi, esi
je 0x490454
mov dword [esp + 8], str.Invalid_descriptor_passed_to_libssh2_poll__
mov dword [esp + 4], 0xffffffdd
mov dword [esp], esi
call fcn.0049ffcc
mov eax, 0xffffffff
add esp, 0x26c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x58]
test edi, edi
je 0x49046b
mov eax, dword [edx + 4]
mov ebp, dword [eax + 0x48]
mov ecx, dword [ebp + 0x11c]
cmp dword [esp + 0x5c], ecx
je 0x490154
xor eax, eax
jmp 0x490146
cmp dword [esp + eax*4 + 0x5c], ecx
je 0x490154
inc eax
cmp eax, edi
jne 0x490140
cmp eax, 0x3f
jbe 0x49046d
cmp dword [esp + 0x34], ecx
jae 0x49015e
mov dword [esp + 0x34], ecx
test esi, esi
je 0x490464
inc ebx
add edx, 0x10
cmp ebx, dword [esp + 0x284]
jne 0x4900cf
mov eax, dword [esp + 0x34]
inc eax
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x288]
mov dword [esp + 0x38], edx
mov ebx, dword [esp + 0x284]
nop
test ebx, ebx
je 0x4905dc
mov esi, dword [esp + 0x280]
mov dword [esp + 0x34], 0
xor ebp, ebp
mov edx, ebx
xor ebx, ebx
lea esi, [esi]
mov ecx, dword [esi + 8]
mov edi, dword [esi + 0xc]
cmp ecx, edi
je 0x4901d2
mov al, byte [esi]
cmp al, 2
je 0x4904c8
cmp al, 3
je 0x490490
mov ecx, edi
test ecx, ecx
jne 0x4904c0
inc ebp
add esi, 0x10
cmp ebp, edx
jne 0x4901b4
mov dword [esp + 0x34], ebx
mov ebx, edx
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4905dc
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 4], 0
lea edx, [esp + 0x48]
mov dword [esp], edx
call fcn.00594790
lea eax, [esp + 0x40]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea edx, [esp + 0x15c]
mov dword [esp + 8], edx
lea eax, [esp + 0x58]
mov dword [esp + 4], eax
mov edx, dword [esp + 0x3c]
mov dword [esp], edx
call sub.WS2_32.dll_select
sub esp, 0x14
mov edi, eax
mov dword [esp + 4], 0
lea eax, [esp + 0x50]
mov dword [esp], eax
call fcn.00594790
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x50]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
mov edx, dword [esp + 0x38]
lea ebp, [edx + eax*8]
mov esi, dword [esp + 0x54]
sub esi, dword [esp + 0x4c]
mov eax, 0x10624dd3
imul esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x2c]
sar eax, 6
sar esi, 0x1f
sub esi, eax
add esi, ebp
mov dword [esp + 0x38], esi
test edi, edi
jle 0x490318
test ebx, ebx
je 0x490318
mov edi, dword [esp + 0x280]
xor esi, esi
jmp 0x4902d0
cmp al, 3
je 0x49058c
dec al
je 0x49053c
inc esi
add edi, 0x10
cmp esi, ebx
je 0x490318
mov al, byte [edi]
cmp al, 2
jne 0x4902b8
lea edx, [esp + 0x58]
mov dword [esp + 4], edx
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x48]
mov eax, dword [eax + 0x11c]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x4902c8
lea esi, [esi]
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x48]
mov dword [esp], eax
call fcn.004a060c
test eax, eax
jg 0x4902fc
inc esi
add edi, 0x10
cmp esi, ebx
jne 0x4902d0
nop
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x49032c
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x490194
mov ebp, dword [esp + 0x34]
mov eax, ebp
add esp, 0x26c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [edx + 8]
test ebp, 1
je 0x49038e
mov edi, dword [esp + 0x58]
test edi, edi
je 0x4906c2
mov ecx, dword [edx + 4]
cmp dword [esp + 0x5c], ecx
je 0x490384
xor eax, eax
jmp 0x49036a
cmp dword [esp + eax*4 + 0x5c], ecx
je 0x490384
inc eax
cmp eax, edi
jne 0x490364
cmp eax, 0x3f
ja 0x490384
mov ecx, dword [edx + 4]
mov dword [esp + eax*4 + 0x5c], ecx
inc edi
mov dword [esp + 0x58], edi
mov ebp, dword [edx + 8]
nop
cmp dword [esp + 0x34], ecx
jae 0x49038e
mov dword [esp + 0x34], ecx
and ebp, 4
je 0x490166
mov edi, dword [esp + 0x15c]
mov ecx, dword [edx + 4]
xor eax, eax
test edi, edi
je 0x4903c7
cmp dword [esp + 0x160], ecx
je 0x4903dc
xor eax, eax
jmp 0x4903bd
cmp dword [esp + eax*4 + 0x160], ecx
je 0x4903dc
inc eax
cmp eax, edi
jne 0x4903b4
cmp eax, 0x3f
ja 0x4903dc
mov dword [esp + eax*4 + 0x160], ecx
inc edi
mov dword [esp + 0x15c], edi
mov ecx, dword [edx + 4]
lea esi, [esi]
cmp dword [esp + 0x34], ecx
jae 0x490166
mov dword [esp + 0x34], ecx
jmp 0x490166
mov edi, dword [esp + 0x58]
test edi, edi
je 0x4906bb
mov eax, dword [edx + 4]
mov ebp, dword [eax + 0xc]
mov ecx, dword [ebp + 0x11c]
cmp dword [esp + 0x5c], ecx
je 0x490154
xor eax, eax
jmp 0x490422
cmp dword [esp + eax*4 + 0x5c], ecx
je 0x490154
inc eax
cmp eax, edi
jne 0x490418
cmp eax, 0x3f
ja 0x490154
mov ecx, dword [edx + 4]
mov ebp, dword [ecx + 0xc]
mov ebp, dword [ebp + 0x11c]
mov dword [esp + eax*4 + 0x5c], ebp
inc edi
mov dword [esp + 0x58], edi
mov ebp, dword [ecx + 0xc]
mov ecx, dword [ebp + 0x11c]
jmp 0x490154
mov eax, 0xffffffff
add esp, 0x26c
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, ebp
jmp 0x490166
xor eax, eax
mov ecx, dword [edx + 4]
mov ebp, dword [ecx + 0x48]
mov ebp, dword [ebp + 0x11c]
mov dword [esp + eax*4 + 0x5c], ebp
inc edi
mov dword [esp + 0x58], edi
mov ebp, dword [ecx + 0x48]
mov ecx, dword [ebp + 0x11c]
jmp 0x490154
and ecx, 1
je 0x4904a1
test edi, 1
je 0x490654
mov eax, dword [esi + 4]
mov eax, dword [eax + 0xc]
cmp dword [eax + 0x120], 0xffffffff
jne 0x4901d0
or edi, 0x90
mov dword [esi + 0xc], edi
lea esi, [esi]
inc ebx
jmp 0x4901da
test cl, 1
je 0x4904d9
test edi, 1
je 0x490624
test cl, 2
je 0x4904ea
test edi, 2
je 0x49067c
mov eax, dword [esi + 4]
and ecx, 4
je 0x49050a
test edi, 4
jne 0x49050a
cmp dword [eax + 0x24], 1
sbb ecx, ecx
not ecx
and ecx, 4
or edi, ecx
mov dword [esi + 0xc], edi
mov ecx, edi
cmp byte [eax + 0x40], 0
jne 0x490518
cmp byte [eax + 0x2c], 0
je 0x49051e
or cl, 0x80
mov dword [esi + 0xc], ecx
mov eax, dword [eax + 0x48]
cmp dword [eax + 0x120], 0xffffffff
jne 0x4901d2
or cl, 0x90
mov dword [esi + 0xc], ecx
inc ebx
jmp 0x4901da
lea edx, [esp + 0x58]
mov dword [esp + 4], edx
mov eax, dword [edi + 4]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x49055a
or dword [edi + 0xc], 1
lea eax, [esp + 0x15c]
mov dword [esp + 4], eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
jne 0x4905cc
mov eax, dword [edi + 0xc]
test eax, eax
je 0x4902c8
inc dword [esp + 0x34]
jmp 0x4902c8
lea eax, [esp + 0x58]
mov dword [esp + 4], eax
mov eax, dword [edi + 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x11c]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
je 0x4902c8
nop
mov eax, dword [edi + 4]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call fcn.004a060c
test eax, eax
jg 0x4905b4
jmp 0x4902c8
or dword [edi + 0xc], 4
inc dword [esp + 0x34]
jmp 0x4902c8
mov eax, 0x10624dd3
imul dword [esp + 0x38]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x2c]
sar ecx, 6
mov eax, dword [esp + 0x38]
cdq
sub ecx, edx
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
shl edx, 3
sub eax, edx
lea edx, [eax + eax*4]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
shl edx, 3
mov dword [esp + 0x34], 0
jmp 0x490200
mov dword [esp + 4], 0
mov eax, dword [esi + 4]
mov dword [esp], eax
mov dword [esp + 0x30], edx
call sym.curl.exe_libssh2_poll_channel_read
test eax, eax
setne al
movzx eax, al
or edi, eax
mov dword [esi + 0xc], edi
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x30]
jmp 0x4904d9
mov eax, dword [esi + 4]
add eax, 0x18
mov dword [esp], eax
mov dword [esp + 0x30], edx
call fcn.004a0520
test eax, eax
setne al
movzx eax, al
or edi, eax
mov dword [esi + 0xc], edi
mov edx, dword [esp + 0x30]
jmp 0x4904a1
mov dword [esp + 4], 1
mov eax, dword [esi + 4]
mov dword [esp], eax
mov dword [esp + 0x30], edx
call sym.curl.exe_libssh2_poll_channel_read
cmp eax, 1
sbb eax, eax
not eax
and eax, 2
or edi, eax
mov dword [esi + 0xc], edi
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x30]
jmp 0x4904ea
mov dword [esp + 0x3c], 1
jmp 0x490180
xor eax, eax
jmp 0x490430
xor eax, eax
jmp 0x490374