Function at 0x402200
Capabilities:
Create pipe
Create process on windows
Read file on windows
Read pipe
Resolve function by parsing pe exports

Disassembly:
add esp, 0xfffffb8c
mov eax, dword [0x4129e8]
xor eax, esp
mov dword [esp + 0x470], eax
push ebp
push esi
mov esi, dword [esp + 0x480]
push esi
push esi
call fcn.004018e0
sub esp, 0xfffffff8
xor ecx, ecx
xor ebp, ebp
mov dword [esp + 0x20], ecx
push ebp
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], ecx
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x30], 1
mov dword [esp + 0x28], 0xc
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x402276
xor al, al
pop esi
pop ebp
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.004038f9
sub esp, 0xfffffb8c
ret
push 0x40
lea eax, [esp + 0x3c]
push ebp
push eax
mov dword [esp + 0x40], ebp
call fcn.00403910
sub esp, 0xfffffff4
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [esp + 0x14]
push 0x400
mov dword [esp + 0x78], eax
lea edx, [esp + 0x7c]
mov dword [esp + 0x74], eax
xor eax, eax
push ebp
push edx
mov dword [esp + 0x6c], 0x101
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
call fcn.00403910
mov edx, dword [0x40f2b8]
mov eax, dword [str.cmd.exe__c]
mov ecx, dword [0x40f2b4]
mov dword [esp + 0x84], eax
mov eax, esi
mov dword [esp + 0x88], ecx
sub esp, 0xfffffff4
mov dword [esp + 0x80], edx
mov ecx, eax
mov dl, byte [eax]
sub eax, 0xffffffff
test dl, dl
jne 0x4022f8
sub eax, ecx
push ebx
push edi
lea edi, [esp + 0x80]
add edi, 0xffffffff
nop
mov cl, byte [edi + 1]
add edi, 1
or cl, cl
jne 0x402310
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x8b]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402332
sub eax, edx
je 0x402437
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push ecx
push ebp
push ebp
push ebp
push 1
push ebp
push ebp
lea edx, [esp + 0xa0]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0x100000
call fcn.00403e92
push 0x100000
push ebp
mov ebx, eax
push ebx
call fcn.00403910
add esp, 0x10
push 0xbb8
mov dword [esp + 0x14], 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x10], ebp
je 0x402404
cmp ebp, 0xff800
jae 0x402404
mov edi, 0x100000
sub edi, ebp
mov ecx, dword [esp + 0x18]
push 0
lea esi, [ebx + ebp]
push 0
lea eax, [esp + 0x18]
push eax
push edi
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov eax, dword [esp + 0x10]
or eax, eax
je 0x402404
push 1
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x18]
push 0
lea edx, [esp + 0x14]
push edx
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4023f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
add ebp, dword [esp + 0x14]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x10], 0
jne 0x402397
push ebx
push ebx
call fcn.00401870
mov eax, ebx
lea edx, [eax + 1]
add esp, 8
mov cl, byte [eax]
sub eax, 0xffffffff
or cl, cl
jne 0x402413
push 1
sub eax, edx
add eax, 0xa
push 0x413d34
push eax
push ebx
call fcn.004019c0
movzx esi, al
sub esp, 0xfffffff0
jmp 0x40243d
mov ebx, dword [esp + 0x14]
xor esi, esi
push ebx
call fcn.00404267
mov ecx, dword [esp + 0x484]
sub esp, 0xfffffffc
or esi, esi
pop edi
pop ebx
setne al
pop esi
pop ebp
xor ecx, esp
call fcn.004038f9
sub esp, 0xfffffb8c
ret