Function at 0x40f230
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create two anonymous pipes

Disassembly:
sub esp, 0x22c
mov eax, dword [0x45ce14]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
push ebp
mov ebp, dword [esp + 0x238]
mov ebx, ecx
push esi
push edi
call fcn.004107c0
mov eax, dword [ebx + 0x294]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x40f274
push eax
call edi
mov dword [ebx + 0x294], 0xffffffff
mov eax, dword [ebx + 0x298]
cmp eax, 0xffffffff
je 0x40f282
push eax
call edi
mov dword [ebx + 0x29c], 0
lea ecx, [ebx + 0x26c]
mov dword [ebx + 0x2a0], 0
mov eax, dword [ebx + 0x26c]
mov dword [ebx + 0x294], 0xffffffff
mov dword [ebx + 0x298], 0xffffffff
call dword [eax + 4]
mov eax, dword [ebx + 0x274]
lea ecx, [ebx + 0x274]
call dword [eax + 4]
mov eax, dword [ebx + 0x27c]
lea ecx, [ebx + 0x27c]
call dword [eax + 4]
mov eax, dword [ebx + 0x284]
lea ecx, [ebx + 0x284]
call dword [eax + 4]
mov eax, dword [ebx + 0x28c]
lea ecx, [ebx + 0x28c]
call dword [eax + 4]
mov dword [ebx + 0x260], 0
xor ecx, ecx
mov eax, dword [ebx + 0x4c]
mov word [eax], cx
mov dword [ebx + 0x40], ecx
mov dword [ebx + 0x268], 0x4000400
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, dword [ebx + 0x26c]
lea ecx, [ebx + 0x26c]
mov dword [esp + 0x10], eax
lea eax, [ebx + 0x2a4]
push 0
push eax
call dword [edx + 0x20]
mov edx, dword [ebx + 0x274]
lea ecx, [ebx + 0x274]
push eax
call dword [edx + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
push eax
call esi
test eax, eax
je 0x40f555
push 0
lea eax, [ebx + 0x2a4]
lea ecx, [ebx + 0x27c]
push eax
mov eax, dword [ecx]
call dword [eax + 0x20]
push eax
mov eax, dword [ebx + 0x28c]
lea ecx, [ebx + 0x28c]
call dword [eax + 0x20]
push eax
call esi
test eax, eax
je 0x40f555
mov eax, dword [ebx + 0x284]
lea ecx, [ebx + 0x284]
mov esi, dword [ebx + 0x290]
push 2
push 0
push 0
call dword [eax + 0x20]
push eax
mov eax, dword [esp + 0x20]
push eax
push esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x40f555
mov eax, dword [ebx + 0x28c]
lea ecx, [ebx + 0x28c]
call dword [eax + 4]
mov dword [ebx + 0x2b4], 0
lea edi, [ebx + 0x2b0]
mov dword [ebx + 0x2b8], 0
lea ecx, [ebx + 0x1c]
mov dword [ebx + 0x2bc], 0
xor eax, eax
mov dword [ebx + 0x2c0], 0
mov dword [ebx + 0x2c4], 0
mov dword [ebx + 0x2c8], 0
mov dword [ebx + 0x2cc], 0
mov dword [ebx + 0x2d0], 0
mov dword [ebx + 0x2d4], 0
mov dword [ebx + 0x2d8], 0
mov dword [ebx + 0x2e2], 0
mov word [ebx + 0x2e6], ax
mov eax, dword [ebx + 0x14]
shr eax, 9
and eax, 1
mov dword [edi], 0x44
mov word [ebx + 0x2e0], ax
mov eax, dword [ebx + 0x280]
mov dword [ebx + 0x2ec], eax
mov dword [ebx + 0x2f0], eax
mov eax, dword [ebx + 0x278]
mov dword [ebx + 0x2dc], 0x101
mov dword [ebx + 0x2e8], eax
call fcn.0040bc30
test al, al
je 0x40f542
lea ecx, [ebx + 0x24]
call fcn.0040bbb0
push eax
lea ecx, [ebx + 0x1c]
call fcn.0040bbb0
push eax
lea ecx, [ebx + 0x3c]
call fcn.00407b30
lea ecx, [ebx + 0x2c]
call fcn.0040bbb0
cmp word [eax], 0
je 0x40f4ed
lea ecx, [esp + 0x14]
call fcn.0040d070
push 0
lea ecx, [ebx + 0x2c]
call fcn.0040bbb0
push eax
lea ecx, [esp + 0x1c]
call fcn.00407d20
test al, al
je 0x40f4e4
mov eax, dword [esp + 0x24]
mov dword [ebx + 0x260], eax
lea ecx, [esp + 0x14]
call fcn.004031c0
mov eax, dword [ebx + 0x14]
shr eax, 0xa
test al, 1
je 0x40f500
mov ecx, ebx
call fcn.004105f0
jmp 0x40f52c
lea eax, [ebx + 0x294]
push eax
push edi
push dword [ebx + 0x260]
push 0
push dword [ebx + 0x268]
push 1
push 0
push 0
push dword [ebx + 0x4c]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne al
test al, al
jne 0x40f53e
push dword [ebx + 0x4c]
mov ecx, ebp
call fcn.00404b00
test al, al
je 0x40f555
mov al, 1
jmp 0x40f557
mov eax, dword [ebp]
mov ecx, ebp
push 0
push str.Invalid_application
mov eax, dword [eax + 4]
call eax
jmp 0x40f557
xor al, al
mov ecx, dword [esp + 0x238]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041e282
add esp, 0x22c
ret 4