Function at 0x4045a3
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.0040f5e0
mov eax, dword [0x431920]
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.00410e00
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 0x40461a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreatePipe_error___d_
call fcn.0040c1e2
pop ecx
pop ecx
xor eax, eax
jmp 0x4047f2
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x404637
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetHandleInformation_error___d_
jmp 0x40460c
push edi
push 0x10
lea eax, [ebp - 0x30]
push ebx
push eax
call fcn.00410e00
push 0x44
pop esi
push esi
lea eax, [ebp - 0x80]
push ebx
push eax
call fcn.00410e00
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.0040ef5c
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.0040f87b
pop ecx
lea eax, [edi + eax*2]
push eax
call fcn.0040fe09
push edi
push str.executing__s
call fcn.0040c1e2
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 0x4046ea
push str.could_not_execute_cmd.exe
call fcn.0040c1e2
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x10]
jmp 0x4047e5
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 0x404721
cmp dword [ebp - 0x1c], ebx
je 0x40472f
mov eax, dword [ebp - 0xc]
cmp eax, esi
jae 0x40472f
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 0x404701
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push str.finished_reading_from_cmd.exe__d___S_
call fcn.0040c1e2
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.0040c1e2
cmp dword [ebp - 0x14], 0x103
pop ecx
pop ecx
jne 0x40478b
push str.Terminating_process
call fcn.0040c1e2
pop ecx
push 1
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x4047dd
cmp dword [ebp - 0x14], ebx
jne 0x4047dd
cmp dword [ebp - 0xc], 5
jbe 0x4047dd
xor eax, eax
cmp dword [ebp - 0xc], ebx
jbe 0x4047dd
mov cl, byte [ebp + eax - 8]
cmp cl, 0xa
je 0x4047b3
cmp cl, 0xd
je 0x4047b3
inc eax
cmp eax, dword [ebp - 0xc]
jb 0x40479d
jmp 0x4047dd
mov byte [ebp + eax - 8], bl
inc eax
push eax
call fcn.0040ef5c
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x18]
call fcn.0040f4d0
push dword [ebp - 0x18]
push str.Using__S
call fcn.0040c1e2
add esp, 0x14
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x2c]
call esi
push edi
call fcn.0040f388
mov eax, dword [ebp - 0x18]
pop ecx
pop edi
mov ecx, dword [ebp + 0x1768]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040f5c8
add ebp, 0x176c
leave
ret