Function at 0x4f7f28
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, 0xffffff54
push ebx
xor ebx, ebx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0x98], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], 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 0x4f840c
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 - 0x40]
xor ecx, ecx
mov edx, 0xc
call fcn.0040346c
mov dword [ebp - 0x40], 0xc
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0xffffffff
push 0x1e84800
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_CreatePipe
push 0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.kernel32.dll_CreatePipe
lea eax, [ebp - 0x94]
xor ecx, ecx
mov edx, 0x10
call fcn.0040346c
mov byte [ebp - 0x21], 0
cmp dword [ebp + 0x1c], 0
jne 0x4f8026
cmp dword [ebp + 0x18], 0
jne 0x4f8026
cmp dword [ebp + 0x14], 0
jne 0x4f8026
cmp dword [ebp + 0x10], 0
jne 0x4f8026
mov byte [ebp - 0x21], 1
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 8]
call fcn.00409f90
lea eax, [ebp - 8]
call fcn.004052f4
lea edx, [ebp - 0x98]
mov eax, dword [ebp - 0x2c]
call fcn.00409f90
mov edx, dword [ebp - 0x98]
lea eax, [ebp - 0x2c]
call fcn.00405358
mov eax, dword [ebp - 0x2c]
xor edx, edx
call fcn.00405614
je 0x4f80c0
push 0
push 0
push 0
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x2c]
mov cl, 1
mov edx, 0x4f8420
call fcn.004acb58
mov eax, dword [ebp - 0x9c]
lea edx, [ebp - 0x28]
call fcn.00409f90
mov eax, dword [ebp - 0x28]
xor edx, edx
call fcn.00405614
je 0x4f8039
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.00405614
je 0x4f80b0
lea eax, [ebp - 8]
mov edx, 0x4f842c
call fcn.004054fc
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x28]
call fcn.004054fc
jmp 0x4f8039
lea eax, [ebp - 0xa0]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00405698
mov eax, dword [ebp - 0xa0]
mov edx, 0x4f8438
call fcn.00405614
je 0x4f8116
mov edx, dword [ebp - 8]
mov eax, 0x4f8444
call fcn.00405810
test eax, eax
je 0x4f8116
push 0x4f844c
push dword [ebp - 8]
push 0x4f844c
lea eax, [ebp - 8]
mov edx, 3
call fcn.004055cc
lea eax, [ebp - 0x84]
xor ecx, ecx
mov edx, 0x44
call fcn.0040346c
mov dword [ebp - 0x84], 0x44
mov dword [ebp - 0x58], 1
cmp byte [ebp - 0x21], 0
je 0x4f8146
mov dword [ebp - 0x58], 0x101
mov word [ebp - 0x54], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
cmp dword [ebp + 0x14], 0
jne 0x4f8170
cmp dword [ebp + 0x10], 0
jne 0x4f8170
mov word [ebp - 0x54], 0
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
and eax, 1
xor edx, edx
cmp edx, 0
jne 0x4f8186
cmp eax, 0
je 0x4f819a
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov edx, 0x4f8454
call fcn.0040555c
jmp 0x4f81aa
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov edx, 0x4f846c
call fcn.0040555c
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x84]
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
cmp dword [ebp + 0x1c], 0
jne 0x4f81ee
cmp dword [ebp + 0x18], 0
jne 0x4f81ee
mov dword [ebp + 0x18], 0xffffffff
mov dword [ebp + 0x1c], 0
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x4f81fd
call fcn.00403a58
push eax
mov eax, dword [ebp - 0x94]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp byte [ebp - 0x21], 0
je 0x4f8365
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
and eax, 2
xor edx, edx
cmp edx, 0
jne 0x4f822a
cmp eax, 0
je 0x4f824e
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x94]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov cl, 0xfc
call fcn.004165f0
jmp 0x4f8365
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 0x4f8365
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
and eax, 1
xor edx, edx
cmp edx, 0
jne 0x4f8283
cmp eax, 0
je 0x4f82cf
mov edx, dword [ebp - 0x20]
shr edx, 1
lea eax, [ebp - 0x30]
call fcn.00405860
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, 1
mov edx, dword [ebp - 0x30]
dec eax
test edx, edx
je 0x4f82ae
cmp eax, dword [edx - 4]
jb 0x4f82b3
call fcn.00403a58
inc eax
lea eax, [edx + eax*2 - 2]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x30]
call fcn.004168c0
jmp 0x4f832b
lea eax, [ebp - 0x34]
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 - 0x34]
call fcn.00405004
mov edx, 1
dec edx
test eax, eax
je 0x4f82fb
cmp edx, dword [eax - 4]
jb 0x4f8300
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 eax, [ebp - 0xa4]
mov edx, dword [ebp - 0x34]
call fcn.004054d0
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
push 0
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xac]
mov edx, dword [ebp - 0xc]
call fcn.00415eac
mov eax, dword [ebp - 0xac]
mov ecx, 0x4f8444
mov edx, 0x4f8480
call fcn.004ad270
mov edx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xc]
call fcn.004168c0
mov eax, dword [ebp - 0x90]
test eax, eax
jns 0x4f8374
call fcn.00403a58
call fcn.004b27c8
test al, al
je 0x4f8389
mov eax, dword [ebp - 0x90]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x94]
test eax, eax
jns 0x4f8398
call fcn.00403a58
call fcn.004b27c8
test al, al
je 0x4f83ad
mov eax, dword [ebp - 0x94]
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 0x4f8413
lea eax, [ebp - 0xac]
mov edx, 6
call fcn.0040530c
lea eax, [ebp - 0x34]
call fcn.00404acc
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.0040530c
lea eax, [ebp - 8]
call fcn.004052f4
ret