Function at 0x401526
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows
Read pipe
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2084
call fcn.0046cab0
mov dword [ebp - 0x2058], 0x2000
mov eax, dword [ebp - 0x2058]
push eax
push 0
lea ecx, [ebp - 0x204c]
push ecx
call fcn.0046ca50
add esp, 0xc
mov dword [ebp - 0x2054], 0
mov dword [ebp - 0x4c], 0x64
push 0x44
push 0
lea edx, [ebp - 0x48]
push edx
call fcn.0046ca50
add esp, 0xc
push 0x10
push 0
lea eax, [ebp - 0x2078]
push eax
call fcn.0046ca50
add esp, 0xc
push 0xc
push 0
lea ecx, [ebp - 0x2068]
push ecx
call fcn.0046ca50
add esp, 0xc
mov dword [ebp - 0x2068], 0xc
mov dword [ebp - 0x2060], 1
mov dword [ebp - 0x2064], 0
push 0
lea edx, [ebp - 0x2068]
push edx
lea eax, [ebp - 0x207c]
push eax
lea ecx, [ebp - 0x2080]
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [ebp - 0x205c], eax
cmp dword [ebp - 0x205c], 0
jne 0x4015f1
mov eax, dword [ebp - 0x205c]
jmp 0x4017c4
mov dword [ebp - 0x48], 0x44
mov dword [ebp - 0x1c], 0x101
mov word [ebp - 0x18], 0
mov edx, dword [ebp - 0x207c]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x207c]
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x2078]
push ecx
lea edx, [ebp - 0x48]
push edx
push 0
push 0
push 0
push 1
push 0
push 0
mov eax, dword [ebp + 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0x205c], eax
cmp dword [ebp - 0x205c], 0
jne 0x401654
mov eax, dword [ebp - 0x205c]
jmp 0x4017c4
mov dword [ebp - 0x2050], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x2084], 0
lea ecx, [ebp - 0x2050]
push ecx
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x2084]
push eax
push 1
lea ecx, [ebp - 0x204c]
push ecx
mov edx, dword [ebp - 0x2080]
push edx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov dword [ebp - 0x205c], eax
cmp dword [ebp - 0x205c], 0
jne 0x4016ab
jmp 0x401772
cmp dword [ebp - 0x2084], 0
je 0x401718
push 0
lea eax, [ebp - 0x2084]
push eax
mov ecx, dword [ebp - 0x2058]
sub ecx, 1
push ecx
lea edx, [ebp - 0x204c]
push edx
mov eax, dword [ebp - 0x2080]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x205c], eax
cmp dword [ebp - 0x205c], 0
jne 0x4016f9
push str.ReadFile_failed.
call fcn.00401521
add esp, 4
jmp 0x401772
mov ecx, dword [ebp - 0x2084]
mov byte [ebp + ecx - 0x204c], 0
lea edx, [ebp - 0x204c]
push edx
mov ecx, dword [ebp + 0xc]
call fcn.00406070
jmp 0x40176d
push 0
mov eax, dword [ebp - 0x2078]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40172d
jmp 0x401772
cmp dword [ebp - 0x2054], 0
je 0x401763
push 0
mov ecx, dword [ebp - 0x2078]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [ebp - 0x205c], eax
cmp dword [ebp - 0x205c], 0
jne 0x401761
push str.Error_terminating_process.
call fcn.00401521
add esp, 4
jmp 0x401772
mov edx, dword [ebp - 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401665
mov eax, dword [ebp - 0x2074]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x205c], eax
mov ecx, dword [ebp - 0x2078]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x205c], eax
mov edx, dword [ebp - 0x2080]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x205c], eax
mov eax, dword [ebp - 0x207c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x205c], eax
mov eax, dword [ebp - 0x205c]
mov esp, ebp
pop ebp
ret