Function at 0x4017f0
Capabilities:
Create process on windows
Delete file
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x79c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x798], eax
push ebx
push esi
mov esi, dword [sym.imp.MSVCR90.dll___iob_func]
push edi
push str.Running_Scripts_r
mov dword [esp + 0x14], 0
call esi
mov edi, dword [sym.imp.MSVCR90.dll_fprintf_s]
add eax, 0x40
push eax
call edi
add esp, 8
lea eax, [esp + 0x280]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebx, dword [sym.imp.MSVCR90.dll_strcpy_s]
lea ecx, [esp + 0x280]
push ecx
lea edx, [esp + 0x17c]
push 0x104
push edx
call ebx
push str.plink.exe
lea eax, [esp + 0x188]
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll_strcat_s]
lea ecx, [esp + 0x298]
push ecx
lea edx, [esp + 0x3a4]
push 0x104
push edx
call ebx
push str.cleanscript.txt
lea eax, [esp + 0x3b0]
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll_strcat_s]
lea ecx, [esp + 0x2b0]
push ecx
lea edx, [esp + 0xa4]
push 0x104
push edx
call ebx
push str.run.bat
lea eax, [esp + 0xb0]
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll_strcat_s]
add esp, 0x48
push str.___Storing_RSA_key_r
call esi
add eax, 0x40
push eax
call edi
push 0x4042d0
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.MSVCR90.dll_fopen_s]
add esp, 0x14
test eax, eax
je 0x40192a
push str.Exporting_run.bat____opening_failed_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
push 0x44f3a0
push 0x44f38c
push 0x44f378
lea eax, [esp + 0x184]
push eax
push str._echo_off_r_necho_y___s__l_root__pw__s__P__s__s_exit
lea ecx, [esp + 0x4a4]
push 0x30c
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf_s]
lea eax, [esp + 0x4ac]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401966
lea ecx, [esp + 0x490]
sub eax, edx
lea ebx, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x401980
mov edx, dword [esp + 0x24]
push edx
push eax
lea eax, [esp + 0x498]
sub ecx, ebx
push 1
push eax
mov ebx, ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, ebx
je 0x4019cf
push str.Exporting_run.bat____writing_failed_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.MSVCR90.dll_fflush]
add esp, 4
test eax, eax
je 0x401a08
push str.Exporting_run.bat____flushing_failed_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
test eax, eax
je 0x401a41
push str.Exporting_run.bat____closing_failed_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
xor eax, eax
push 0x44
push eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x30]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push 0x20
push 0
push 0
push 0
lea eax, [esp + 0x90]
push eax
push 0
mov dword [esp + 0x50], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401ac7
push str.Can_not_start_SSH_tool_1_r
call esi
add eax, 0x40
push eax
call edi
lea ecx, [esp + 0x78]
push ecx
call dword [sym.imp.MSVCR90.dll_remove]
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x14]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x401b1a
push str.Can_not_get_return_code_from_SSH_tool_1_r
call esi
add eax, 0x40
push eax
call edi
lea edx, [esp + 0x78]
push edx
call dword [sym.imp.MSVCR90.dll_remove]
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x10], 1
jne 0x401b53
push str.SSH_tool_1_failed_r
call esi
add eax, 0x40
push eax
call edi
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.MSVCR90.dll_remove]
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebx
mov edx, dword [esp + 0x18]
push edx
call ebx
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.MSVCR90.dll_remove]
add esp, 4
push 0x44f3a0
push str.___Cleaning_up_FastTrace_2__s_r
call esi
add eax, 0x40
push eax
call edi
xor eax, eax
push 0x44
push eax
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call sub.MSVCR90.dll_memset
lea edx, [esp + 0x3a0]
push edx
push 0x44f3a0
push 0x44f38c
push 0x44f378
lea eax, [esp + 0x1a0]
push eax
push str._s__l_root__pw__s__P__s__s__m__s
lea ecx, [esp + 0x4c0]
push 0x30c
push ecx
mov dword [esp + 0x60], 0x44
call dword [sym.imp.MSVCR90.dll_sprintf_s]
add esp, 0x38
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push 0x20
push 0
push 0
push 0
lea ecx, [esp + 0x4b0]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401c39
push str.Can_not_start_SSH_tool_2_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x14]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x401c81
push str.Can_not_get_return_code_from_SSH_tool_2_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x10], 1
jne 0x401caf
push str.SSH_tool_2_failed_r
call esi
add eax, 0x40
push eax
call edi
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x798]
xor ecx, esp
call fcn.00403178
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x14]
push edx
call ebx
mov eax, dword [esp + 0x18]
push eax
call ebx
push str.___Clean_up_done__r
call esi
add eax, 0x40
push eax
call edi
mov ecx, dword [esp + 0x7ac]
add esp, 8
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.00403178
mov esp, ebp
pop ebp
ret