Function at 0x4045e5
Capabilities:
Create pipe
Create process on windows
Get common file path
Read file on windows
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x176c]
mov eax, 0x17ec
call fcn.00413c90
mov eax, dword [0x43bc80]
xor eax, ebp
mov dword [ebp + 0x1768], eax
mov eax, dword [ebp + 0x1774]
push ebx
push esi
push 0xc
pop esi
push esi
mov dword [ebp - 0x14], eax
xor ebx, ebx
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.004154b0
add esp, 0xc
push ebx
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x20]
push eax
xor esi, esi
lea eax, [ebp - 0x10]
inc esi
push eax
mov dword [ebp - 0x34], esi
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x40465c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreatePipe_error___d_
call fcn.0040ea46
pop ecx
pop ecx
xor eax, eax
jmp 0x404834
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x404679
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetHandleInformation_error___d_
jmp 0x40464e
push edi
push 0x10
lea eax, [ebp - 0x30]
push ebx
push eax
call fcn.004154b0
push 0x44
pop esi
push esi
lea eax, [ebp - 0x80]
push ebx
push eax
call fcn.004154b0
mov eax, dword [ebp - 0x20]
or dword [ebp - 0x54], 0x100
push 0x2ee0
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], ebx
call fcn.00412d69
add esp, 0x1c
mov esi, 0x1770
mov edi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push dword [ebp - 0x14]
push str._system32cmd.exe__C_for___I_in____s___do__echo___sI
push edi
call fcn.00413f2b
pop ecx
lea eax, [edi + eax*2]
push eax
call fcn.004144b9
push edi
push str.executing__s
call fcn.0040ea46
add esp, 0x14
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push 0x8000000
push 1
push ebx
push ebx
push edi
push ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40472c
push str.could_not_execute_cmd.exe
call fcn.0040ea46
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x10]
jmp 0x404827
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0xc], ebx
push esi
lea eax, [ebp - 8]
jmp 0x404763
cmp dword [ebp - 0x1c], ebx
je 0x404771
mov eax, dword [ebp - 0xc]
cmp eax, esi
jae 0x404771
add eax, dword [ebp - 0x1c]
push ebx
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, esi
sub ecx, eax
mov dword [ebp - 0xc], eax
push ecx
lea eax, [ebp + eax - 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404743
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push str.finished_reading_from_cmd.exe__d___S_
call fcn.0040ea46
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x14]
push str.Exit_Code__d
call fcn.0040ea46
cmp dword [ebp - 0x14], 0x103
pop ecx
pop ecx
jne 0x4047cd
push str.Terminating_process
call fcn.0040ea46
pop ecx
push 1
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x40481f
cmp dword [ebp - 0x14], ebx
jne 0x40481f
cmp dword [ebp - 0xc], 5
jbe 0x40481f
xor eax, eax
cmp dword [ebp - 0xc], ebx
jbe 0x40481f
mov cl, byte [ebp + eax - 8]
cmp cl, 0xa
je 0x4047f5
cmp cl, 0xd
je 0x4047f5
inc eax
cmp eax, dword [ebp - 0xc]
jb 0x4047df
jmp 0x40481f
mov byte [ebp + eax - 8], bl
inc eax
push eax
call fcn.00412d69
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x18]
call fcn.00413b80
push dword [ebp - 0x18]
push str.Using__S
call fcn.0040ea46
add esp, 0x14
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x2c]
call esi
push edi
call fcn.00413a45
mov eax, dword [ebp - 0x18]
pop ecx
pop edi
mov ecx, dword [ebp + 0x1768]
pop esi
xor ecx, ebp
pop ebx
call fcn.00413c78
add ebp, 0x176c
leave
ret