Function at 0x40be90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x2678
call fcn.00444bf0
mov eax, dword [ebp - 0x10]
mov edi, edx
mov esi, eax
mov dword [esp], esi
mov eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_strrchr
test eax, eax
mov ebx, eax
je 0x40c24c
mov byte [eax], 0
inc ebx
test edi, edi
je 0x40c19a
mov dword [esp + 4], edi
mov dword [esp], str.psftp:_multiple_usernames_specified__using___s__n
call sub.msvcrt.dll_printf
mov eax, dword [0x45a6a0]
test eax, eax
jne 0x40bf0e
mov byte [ebp - 0x2658], 0
lea eax, [ebp - 0x2658]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040fd70
cmp byte [ebp - 0x2658], 0
jne 0x40c184
mov dword [esp + 4], ebx
mov esi, 0x1ff
mov dword [esp + 8], esi
mov dword [esp], 0x4570c0
call sub.msvcrt.dll_strncpy
mov byte [0x4572bf], 0
cmp dword [0x4572c4], 3
je 0x40bf4d
mov ebx, 3
mov ecx, 0x16
mov dword [0x4572c4], ebx
mov dword [0x4572c0], ecx
mov eax, dword [0x457d4c]
sub eax, 2
cmp eax, 1
jbe 0x40bf65
mov edx, 2
mov dword [0x457d4c], edx
mov dword [esp], 0x4570c0
call fcn.00402230
mov dword [esp], 0x4570c0
mov eax, 0x449f45
mov dword [esp + 4], eax
call sub.msvcrt.dll_strspn
mov ebx, eax
mov ecx, 0x4570c0
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x40bf90
test edx, 0x8080
jne 0x40bfb5
shr edx, 0x10
add ecx, 2
mov dword [esp], 0x4570c0
add dl, dl
lea eax, [ebx + 0x4570c0]
sbb ecx, 3
sub ecx, ebx
sub ecx, 0x4570bf
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memmove
cmp byte [0x4570c0], 0
je 0x40c02c
mov dword [esp], 0x4570c0
mov eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_strrchr
test eax, eax
mov ebx, eax
je 0x40c02c
sub eax, 0x4570c0
cmp eax, 0x63
jbe 0x40c253
inc ebx
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [esp + 4], ebx
inc eax
mov dword [esp + 8], eax
mov dword [esp], 0x4570c0
call sub.msvcrt.dll_memmove
mov dword [esp], 0x4570c0
mov eax, 0x449f48
xor esi, esi
mov dword [esp + 4], eax
xor ebx, ebx
call sub.msvcrt.dll_strcspn
mov byte [eax + 0x4570c0], 0
movzx eax, byte [0x4570c0]
test al, al
je 0x40c085
mov cl, al
lea esi, [esi]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x40c079
mov byte [esi + 0x4570c0], cl
inc esi
inc ebx
movzx ecx, byte [ebx + 0x4570c0]
test cl, cl
jne 0x40c060
mov byte [esi + 0x4570c0], 0
test edi, edi
je 0x40c099
cmp byte [edi], 0
jne 0x40c1a1
mov eax, dword [ebp + 8]
test eax, eax
je 0x40c0a8
mov eax, dword [ebp + 8]
mov dword [0x4572c0], eax
mov byte [0x4591e5], 0
mov eax, str.test__x__usr_lib_sftp_server__exec__usr_lib_sftp_server_ntest__x__usr_local_lib_sftp_server__exec__usr_local_lib_sftp_server_nexec_sftp_server
xor edi, edi
mov dword [0x457bf4], eax
xor eax, eax
xor esi, esi
mov dword [0x457d64], eax
mov eax, 0x446280
mov ecx, 1
mov dword [0x4570a0], eax
mov eax, dword [0x4572dc]
mov edx, 1
mov dword [0x459154], edi
mov ebx, 0x70746673
mov edi, 0x4570b0
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x265c]
mov dword [esp + 0x14], eax
mov eax, dword [0x4572c0]
mov dword [0x457c28], esi
mov byte [0x4591e4], 0
mov dword [esp + 0x10], eax
mov eax, 0x4570c0
mov dword [esp + 0xc], eax
mov eax, 0x4570c0
mov dword [0x4579f0], ebx
mov byte [0x4579f4], 0
mov dword [0x457d60], ecx
mov dword [0x457bf8], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [0x446280]
test eax, eax
je 0x40c1c6
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov esi, str.ssh_init:__s_n
mov dword [esp + 4], esi
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, 1
add esp, 0x267c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
mov eax, 0x4570c0
mov dword [esp + 4], eax
call fcn.0040fd70
jmp 0x40bf2e
mov edi, esi
jmp 0x40bedf
mov dword [esp + 4], edi
mov eax, 0x63
mov dword [esp + 8], eax
mov dword [esp], 0x4586b0
call sub.msvcrt.dll_strncpy
mov byte [0x458713], 0
jmp 0x40c099
mov dword [esp], 0
mov ebx, 0x4570c0
mov dword [esp + 4], ebx
call fcn.00402bf0
mov dword [esp + 4], eax
mov ebx, eax
mov eax, dword [0x4570b0]
mov dword [esp], eax
mov eax, dword [0x4570a0]
call dword [eax + 0x34]
mov dword [esp], ebx
call fcn.0043b560
lea esi, [esi]
mov eax, dword [0x4570b0]
mov dword [esp], eax
mov eax, dword [0x4570a0]
call dword [eax + 0x28]
test eax, eax
jne 0x40c278
call fcn.00440450
test eax, eax
jns 0x40c200
mov dword [esp], str.ssh_init:_error_during_SSH_connection_setup_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, 0x2c
mov dword [esp + 8], edx
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
jmp 0x40c174
mov ebx, esi
jmp 0x40bedf
mov dword [esp + 8], eax
mov eax, 0x4570c0
mov dword [esp + 4], eax
mov dword [esp], 0x4586b0
call sub.msvcrt.dll_strncpy
mov byte [ebx + 0x15f0], 0
jmp 0x40c00e
mov ecx, dword [0x457060]
test ecx, ecx
je 0x40c2a3
mov eax, dword [ebp - 0x265c]
test eax, eax
jne 0x40c293
xor eax, eax
jmp 0x40c179
mov dword [esp + 4], eax
mov dword [esp], str.Connected_to__s_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0x265c]
test eax, eax
je 0x40c28c
mov dword [esp], eax
call fcn.00403f40
xor eax, eax
jmp 0x40c179