Function at 0x4f48f0
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
add esp, 0xffffff18
push ebx
xor ebx, ebx
mov dword [ebp - 0xe4], ebx
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0xe0], ebx
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xd8], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
call fcn.00405a50
xor eax, eax
push ebp
push 0x4f4d6d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
xor edx, edx
call fcn.00416aa0
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0xffffffff
lea eax, [ebp - 0x3c]
xor ecx, ecx
mov edx, 0xc
call fcn.00403628
mov dword [ebp - 0x3c], 0xc
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0xffffffff
push 0xf4240
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_CreatePipe
push 0
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.kernel32.dll_CreatePipe
lea eax, [ebp - 0xd4]
xor ecx, ecx
mov edx, 0x10
call fcn.00403628
mov byte [ebp - 0x21], 0
cmp dword [ebp + 0x1c], 0
jne 0x4f49f5
cmp dword [ebp + 0x18], 0
jne 0x4f49f5
cmp dword [ebp + 0x14], 0
jne 0x4f49f5
cmp dword [ebp + 0x10], 0
jne 0x4f49f5
cmp dword [ebp + 0xc], 0
jne 0x4f49ef
cmp dword [ebp + 8], 0
jb 0x4f49f5
jmp 0x4f49f1
jl 0x4f49f5
mov byte [ebp - 0x21], 1
mov eax, dword [0x574604]
cmp byte [eax], 0
je 0x4f4b07
lea eax, [ebp - 0xd8]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405844
mov eax, dword [ebp - 0xd8]
mov edx, 0x4f4d80
call fcn.004057c0
je 0x4f4a59
mov edx, dword [ebp - 8]
mov eax, 0x4f4d8c
call fcn.004059bc
test eax, eax
je 0x4f4a59
push 0x4f4d94
push dword [ebp - 8]
push 0x4f4d94
lea eax, [ebp - 8]
mov edx, 3
call fcn.00405778
lea eax, [ebp - 0xc4]
xor ecx, ecx
mov edx, 0x44
call fcn.00403628
mov dword [ebp - 0xc4], 0x44
mov dword [ebp - 0x98], 1
cmp byte [ebp - 0x21], 0
je 0x4f4a8f
mov dword [ebp - 0x98], 0x101
mov word [ebp - 0x94], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x84], eax
cmp dword [ebp + 0x14], 0
jne 0x4f4ac8
cmp dword [ebp + 0x10], 0
jne 0x4f4ac8
mov word [ebp - 0x94], 0
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov edx, 0x4f4d9c
call fcn.00405708
lea eax, [ebp - 0xd4]
push eax
lea eax, [ebp - 0xc4]
push eax
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 0x28]
call fcn.0040568c
push eax
push 0
call sub.kernel32.dll_CreateProcessW
jmp 0x4f4ba3
lea eax, [ebp - 0x80]
xor ecx, ecx
mov edx, 0x44
call fcn.00403628
mov dword [ebp - 0x80], 0x44
mov dword [ebp - 0x54], 1
cmp byte [ebp - 0x21], 0
je 0x4f4b31
mov dword [ebp - 0x54], 0x101
mov word [ebp - 0x50], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
cmp dword [ebp + 0x14], 0
jne 0x4f4b5b
cmp dword [ebp + 0x10], 0
jne 0x4f4b5b
mov word [ebp - 0x50], 0
lea eax, [ebp - 0xdc]
mov ecx, dword [ebp - 8]
mov edx, 0x4f4db0
call fcn.00405708
mov edx, dword [ebp - 0xdc]
lea eax, [ebp - 0x30]
call fcn.00404f2c
lea eax, [ebp - 0xd4]
push eax
lea eax, [ebp - 0x80]
push eax
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 0x30]
call fcn.00405168
push eax
push 0
call sub.kernel32.dll_CreateProcessA
cmp dword [ebp + 0x1c], 0
jne 0x4f4bbd
cmp dword [ebp + 0x18], 0
jne 0x4f4bbd
mov dword [ebp + 0x18], 0xffffffff
mov dword [ebp + 0x1c], 0
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x4f4bcc
call fcn.00403c14
push eax
mov eax, dword [ebp - 0xd4]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp byte [ebp - 0x21], 0
je 0x4f4cc6
cmp dword [ebp + 0xc], 0
jne 0x4f4c11
cmp dword [ebp + 8], 1
jne 0x4f4c11
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xd4]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov cl, 0xfc
call fcn.0041684c
jmp 0x4f4cc6
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 0x4f4cc6
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x20]
call fcn.004053f0
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
call fcn.004051c0
mov edx, 1
dec edx
test eax, eax
je 0x4f4c5c
cmp edx, dword [eax - 4]
jb 0x4f4c61
call fcn.00403c14
inc edx
lea eax, [eax + edx - 1]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0xe0]
mov edx, dword [ebp - 0x2c]
call fcn.0040567c
mov edx, dword [ebp - 0xe0]
mov eax, dword [ebp - 0xc]
call fcn.00416b1c
push 0
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0xe8]
mov edx, dword [ebp - 0xc]
call fcn.00416108
mov eax, dword [ebp - 0xe8]
mov ecx, 0x4f4d8c
mov edx, 0x4f4dd4
call fcn.004af81c
mov edx, dword [ebp - 0xe4]
mov eax, dword [ebp - 0xc]
call fcn.00416b1c
mov eax, dword [ebp - 0xd0]
test eax, eax
jns 0x4f4cd5
call fcn.00403c14
call fcn.004b1ce8
test al, al
je 0x4f4cea
mov eax, dword [ebp - 0xd0]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0xd4]
test eax, eax
jns 0x4f4cf9
call fcn.00403c14
call fcn.004b1ce8
test al, al
je 0x4f4d0e
mov eax, dword [ebp - 0xd4]
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 0x4f4d74
lea eax, [ebp - 0xe8]
mov edx, 5
call fcn.004054c8
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.00404cac
lea eax, [ebp - 0x28]
call fcn.004054b0
lea eax, [ebp - 8]
call fcn.004054b0
ret