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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x17
push 0
push 0
dec ecx
jne 0x4f848d
xchg dword [ebp - 4], ecx
push ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
call fcn.004058a4
xor eax, eax
push ebp
push 0x4f8954
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
xor edx, edx
call fcn.00416844
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0xffffffff
lea eax, [ebp - 0x38]
xor ecx, ecx
mov edx, 0xc
call fcn.0040346c
mov dword [ebp - 0x38], 0xc
xor eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0xffffffff
push 0x1e84800
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_CreatePipe
push 0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.kernel32.dll_CreatePipe
lea eax, [ebp - 0x8c]
xor ecx, ecx
mov edx, 0x10
call fcn.0040346c
mov byte [ebp - 0x21], 0
cmp dword [ebp + 0x1c], 0
jne 0x4f855a
cmp dword [ebp + 0x18], 0
jne 0x4f855a
cmp dword [ebp + 0x14], 0
jne 0x4f855a
cmp dword [ebp + 0x10], 0
jne 0x4f855a
mov byte [ebp - 0x21], 1
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
and eax, 2
xor edx, edx
cmp edx, 0
jne 0x4f8606
cmp eax, 0
jne 0x4f8606
mov edx, dword [ebp - 8]
mov eax, 0x4f8968
call fcn.00405810
test eax, eax
jle 0x4f8606
push 0
lea eax, [ebp - 0x90]
push eax
mov ecx, 0x4f8970
mov edx, 0x4f898c
mov eax, dword [ebp - 8]
call fcn.004ad270
mov edx, dword [ebp - 0x90]
lea eax, [ebp - 8]
call fcn.00405358
push 0
lea eax, [ebp - 0x94]
push eax
mov ecx, 0x4f898c
mov edx, 0x4f8968
mov eax, dword [ebp - 8]
call fcn.004ad270
mov edx, dword [ebp - 0x94]
lea eax, [ebp - 8]
call fcn.00405358
push 0
lea eax, [ebp - 0x98]
push eax
mov ecx, 0x4f898c
mov edx, 0x4f8970
mov eax, dword [ebp - 8]
call fcn.004ad270
mov edx, dword [ebp - 0x98]
lea eax, [ebp - 8]
call fcn.00405358
lea eax, [ebp - 0x7c]
xor ecx, ecx
mov edx, 0x44
call fcn.0040346c
mov dword [ebp - 0x7c], 0x44
mov dword [ebp - 0x50], 1
cmp byte [ebp - 0x21], 0
je 0x4f8630
mov dword [ebp - 0x50], 0x101
mov word [ebp - 0x4c], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
cmp dword [ebp + 0x14], 0
jne 0x4f8654
cmp dword [ebp + 0x10], 0
jne 0x4f8654
mov word [ebp - 0x4c], 0
cmp dword [ebp + 0x14], 0
jne 0x4f8666
cmp dword [ebp + 0x10], 2
jne 0x4f8666
mov word [ebp - 0x4c], 2
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
and eax, 1
xor edx, edx
cmp edx, 0
jne 0x4f867c
cmp eax, 0
sete al
and al, byte [ebp - 0x21]
je 0x4f8696
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov edx, 0x4f8998
call fcn.0040555c
jmp 0x4f86a6
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov edx, 0x4f8a14
call fcn.0040555c
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 0x28]
call fcn.004054e0
push eax
push 0
call sub.kernel32.dll_CreateProcessW
push 0xffffffffffffffff
mov eax, dword [ebp - 0x8c]
push eax
call sub.user32.dll_WaitForInputIdle
cmp dword [ebp + 0x1c], 0
jne 0x4f871e
cmp dword [ebp + 0x18], 0
jne 0x4f871e
jmp 0x4f8709
mov eax, dword [ebp - 4]
cmp dword [eax + 0x222c], 0
jg 0x4f871e
push 0xa
call sub.kernel32.dll_Sleep_1
mov edx, 0xa
mov eax, dword [ebp - 4]
call fcn.005463e4
push 0x14
mov eax, dword [ebp - 0x8c]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x4f86e9
cmp byte [ebp - 0x21], 0
je 0x4f8897
push 0
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_PeekNamedPipe
cmp dword [ebp - 0x20], 0
jbe 0x4f8897
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x20]
call fcn.00405234
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
call fcn.00405004
mov edx, 1
dec edx
test eax, eax
je 0x4f8773
cmp edx, dword [eax - 4]
jb 0x4f8778
call fcn.00403a58
inc edx
lea eax, [eax + edx - 1]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_ReadFile
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
call fcn.00406ed4
lea eax, [ebp - 0x9c]
mov edx, dword [ebp - 0x2c]
call fcn.004054d0
mov edx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x28]
call fcn.00405614
jne 0x4f87ce
lea eax, [ebp - 0xa0]
mov edx, dword [ebp - 0x2c]
call fcn.004054d0
mov edx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
jmp 0x4f8826
lea edx, [ebp - 0xa4]
mov eax, dword [ebp - 0x28]
call fcn.00406e18
mov eax, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x2c]
call fcn.00404ef8
jne 0x4f880a
lea edx, [ebp - 0xa8]
mov eax, dword [ebp - 0x2c]
call fcn.00406ed4
mov edx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
jmp 0x4f8826
lea eax, [ebp - 0xac]
mov edx, dword [ebp - 0x2c]
call fcn.004054d0
mov edx, dword [ebp - 0xac]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
push 0
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xb4]
mov edx, dword [ebp - 0xc]
call fcn.00415eac
mov eax, dword [ebp - 0xb4]
mov ecx, 0x4f8a30
mov edx, 0x4f8a38
call fcn.004ad270
mov edx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
push 0
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0xbc]
mov edx, dword [ebp - 0xc]
call fcn.00415eac
mov eax, dword [ebp - 0xbc]
xor ecx, ecx
mov edx, 0x4f8a40
call fcn.004ad270
mov edx, dword [ebp - 0xb8]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
mov eax, dword [ebp - 0x88]
test eax, eax
jns 0x4f88a6
call fcn.00403a58
call fcn.004b27c8
test al, al
je 0x4f88bb
mov eax, dword [ebp - 0x88]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x8c]
test eax, eax
jns 0x4f88ca
call fcn.00403a58
call fcn.004b27c8
test al, al
je 0x4f88df
mov eax, dword [ebp - 0x8c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f895b
lea eax, [ebp - 0xbc]
mov edx, 6
call fcn.0040530c
lea eax, [ebp - 0xa4]
call fcn.00404acc
lea eax, [ebp - 0xa0]
mov edx, 5
call fcn.0040530c
lea eax, [ebp - 0x2c]
call fcn.00404acc
lea eax, [ebp - 0x28]
call fcn.004052f4
lea eax, [ebp - 8]
call fcn.004052f4
ret