Function at 0x10061f80
Capabilities:
Get socket status

Disassembly:
sub esp, 0x22c
push ebx
push ebp
push esi
xor ebp, ebp
push edi
xor ebx, ebx
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x138], ebp
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x244], ebp
jbe 0x10062167
mov edx, dword [esp + 0x240]
add edx, 4
lea esp, [esp]
movzx eax, byte [edx - 4]
sub eax, 1
mov dword [edx + 8], 0
je 0x1006209e
sub eax, 1
je 0x1006203f
sub eax, 1
jne 0x10062145
test ecx, ecx
jbe 0x10061ffc
mov esi, dword [edx]
mov esi, dword [esi + 0xc]
mov esi, dword [esi + 0x11c]
cmp dword [esp + eax*4 + 0x38], esi
je 0x10061ffc
inc eax
cmp eax, ecx
jb 0x10061ff1
cmp eax, ecx
jne 0x1006201d
cmp ecx, 0x40
jae 0x1006201d
mov ecx, dword [edx]
mov ecx, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x11c]
mov dword [esp + eax*4 + 0x38], ecx
mov ecx, dword [esp + 0x34]
inc ecx
mov dword [esp + 0x34], ecx
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
mov eax, dword [esi + 0x11c]
cmp eax, edi
jbe 0x1006202e
mov edi, eax
test ebx, ebx
jne 0x10062127
mov dword [esp + 0x10], esi
jmp 0x10062127
xor eax, eax
test ecx, ecx
jbe 0x1006205b
mov esi, dword [edx]
mov esi, dword [esi + 0x48]
mov esi, dword [esi + 0x11c]
cmp dword [esp + eax*4 + 0x38], esi
je 0x1006205b
inc eax
cmp eax, ecx
jb 0x10062050
cmp eax, ecx
jne 0x1006207c
cmp ecx, 0x40
jae 0x1006207c
mov ecx, dword [edx]
mov ecx, dword [ecx + 0x48]
mov ecx, dword [ecx + 0x11c]
mov dword [esp + eax*4 + 0x38], ecx
mov ecx, dword [esp + 0x34]
inc ecx
mov dword [esp + 0x34], ecx
mov eax, dword [edx]
mov esi, dword [eax + 0x48]
mov eax, dword [esi + 0x11c]
cmp eax, edi
jbe 0x1006208d
mov edi, eax
test ebx, ebx
jne 0x10062127
mov dword [esp + 0x10], esi
jmp 0x10062127
mov ebx, dword [edx + 4]
test bl, 1
je 0x100620db
xor eax, eax
test ecx, ecx
jbe 0x100620bb
mov esi, dword [edx]
mov edi, edi
cmp dword [esp + eax*4 + 0x38], esi
je 0x100620bb
inc eax
cmp eax, ecx
jb 0x100620b0
cmp eax, ecx
jne 0x100620d3
cmp ecx, 0x40
jae 0x100620d3
mov ecx, dword [edx]
mov dword [esp + eax*4 + 0x38], ecx
mov ecx, dword [esp + 0x34]
inc ecx
mov dword [esp + 0x34], ecx
mov eax, dword [edx]
cmp eax, edi
jbe 0x100620db
mov edi, eax
test bl, 4
je 0x10062127
xor eax, eax
test ebp, ebp
jbe 0x100620fe
mov esi, dword [edx]
jmp 0x100620f0
cmp dword [esp + eax*4 + 0x13c], esi
je 0x100620fe
inc eax
cmp eax, ebp
jb 0x100620f0
cmp eax, ebp
jne 0x1006211f
cmp ebp, 0x40
jae 0x1006211f
mov esi, dword [edx]
mov dword [esp + eax*4 + 0x13c], esi
mov ebp, dword [esp + 0x138]
inc ebp
mov dword [esp + 0x138], ebp
mov eax, dword [edx]
cmp eax, edi
jbe 0x10062127
mov edi, eax
mov eax, dword [esp + 0x14]
inc eax
add edx, 0x10
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x244]
jae 0x10062167
mov ebx, dword [esp + 0x10]
jmp 0x10061fc0
test ebx, ebx
je 0x10062159
push str.Invalid_descriptor_passed_to_libssh2_poll__
push 0xffffffffffffffdd
push ebx
call fcn.1006cb50
add esp, 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x22c
ret
mov ebx, dword [esp + 0x248]
inc edi
mov dword [esp + 0x14], edi
jmp 0x10062180
mov edi, dword [esp + 0x244]
mov dword [esp + 0x10], 0
test edi, edi
jbe 0x1006229d
mov esi, dword [esp + 0x240]
add esi, 0xc
mov ebp, edi
mov ecx, dword [esi - 4]
mov edx, dword [esi]
cmp ecx, edx
je 0x10062280
movzx eax, byte [esi - 0xc]
sub eax, 2
je 0x100621fa
sub eax, 1
jne 0x10062280
test cl, 1
je 0x100621eb
test dl, 1
jne 0x100621eb
mov eax, dword [esi - 8]
add eax, 0x18
push eax
call fcn.1006d020
add esp, 4
neg eax
sbb eax, eax
neg eax
mov edx, 0
setne dl
or dword [esi], edx
mov eax, dword [esi - 8]
mov ecx, dword [eax + 0xc]
cmp dword [ecx + 0x120], 0xffffffff
jmp 0x10062278
test cl, 1
je 0x1006221a
test dl, 1
jne 0x1006221a
mov edx, dword [esi - 8]
push 0
push edx
call sym.EUFyncFtp.dll_libssh2_poll_channel_read
add esp, 8
neg eax
sbb eax, eax
neg eax
or dword [esi], eax
test byte [esi - 4], 2
je 0x1006223c
test byte [esi], 2
jne 0x1006223c
mov eax, dword [esi - 8]
push 1
push eax
call sym.EUFyncFtp.dll_libssh2_poll_channel_read
add esp, 8
neg eax
sbb eax, eax
and eax, 2
or dword [esi], eax
test byte [esi - 4], 4
je 0x10062259
mov eax, dword [esi]
test al, 4
jne 0x10062259
mov ecx, dword [esi - 8]
mov edx, dword [ecx + 0x24]
neg edx
sbb edx, edx
and edx, 4
or edx, eax
mov dword [esi], edx
mov eax, dword [esi - 8]
cmp byte [eax + 0x40], 0
jne 0x10062268
cmp byte [eax + 0x2c], 0
je 0x1006226e
or dword [esi], 0x80
mov eax, dword [eax + 0x48]
cmp dword [eax + 0x120], 0xffffffff
jne 0x10062280
or dword [esi], 0x90
cmp dword [esi], 0
je 0x10062289
inc dword [esp + 0x10]
add esi, 0x10
sub ebp, 1
jne 0x100621a3
cmp dword [esp + 0x10], ebp
je 0x1006229d
xor ebx, ebx
mov eax, 0x10624dd3
imul ebx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
imul eax, eax, 0x3e8
mov ecx, ebx
sub ecx, eax
imul ecx, ecx, 0x3e8
lea edx, [esp + 0x28]
push 0
push edx
mov dword [esp + 0x24], ecx
call fcn.1006d070
add esp, 8
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x40]
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [esp + 0x20]
push 0
push ecx
mov esi, eax
call fcn.1006d070
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x34]
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x28]
sar edx, 6
imul ecx, ecx, 0x3e8
mov eax, edx
shr eax, 0x1f
add eax, edx
sub ecx, eax
add esp, 8
add ebx, ecx
test esi, esi
jle 0x10062405
test edi, edi
jbe 0x10062405
mov esi, dword [esp + 0x240]
add esi, 4
mov ebp, 1
nop
movzx eax, byte [esi - 4]
sub eax, ebp
je 0x100623c4
sub eax, ebp
je 0x10062394
sub eax, ebp
jne 0x100623fa
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
lea edx, [esp + 0x34]
push edx
mov edx, dword [ecx + 0x11c]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100623fa
mov edi, edi
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.1006f600
add esp, 4
test eax, eax
jg 0x10062380
jmp 0x100623fa
mov eax, dword [esi]
mov ecx, dword [eax + 0x48]
lea edx, [esp + 0x34]
push edx
mov edx, dword [ecx + 0x11c]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100623fa
mov edi, edi
mov eax, dword [esi]
mov ecx, dword [eax + 0x48]
push ecx
call fcn.1006f600
add esp, 4
test eax, eax
jg 0x100623b0
jmp 0x100623fa
mov eax, dword [esi]
lea edx, [esp + 0x34]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100623d8
or dword [esi + 8], ebp
mov edx, dword [esi]
lea ecx, [esp + 0x138]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x100623f0
or dword [esi + 8], 4
cmp dword [esi + 8], 0
je 0x100623fa
add dword [esp + 0x10], ebp
add esi, 0x10
sub edi, ebp
jne 0x10062350
test ebx, ebx
jle 0x10062414
cmp dword [esp + 0x10], 0
je 0x10062180
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret