Function at 0x50fd24
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows
Read pipe
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff74
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004058fc
mov eax, dword [ebp - 8]
test eax, eax
je 0x50fd53
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0x50ff7c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 8]
call fcn.00405448
mov dword [ebp - 0x34], 0xc
mov dword [ebp - 0x2c], 0xffffffff
xor eax, eax
mov dword [ebp - 0x30], eax
push 0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_CreatePipe
test eax, eax
je 0x50ff5b
mov eax, 0x100001
call fcn.00402f28
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x78]
xor ecx, ecx
mov edx, 0x44
call fcn.00403bf8
mov dword [ebp - 0x78], 0x44
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x4c], 0x101
mov word [ebp - 0x48], 0
xor ebx, ebx
fld qword [ebp + 8]
fcomp dword [0x50ff90]
wait
fnstsw ax
sahf
jne 0x50fdf6
xor eax, eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], 0x7ff00000
jmp 0x50fe0a
call fcn.0040fa04
fld qword [ebp + 8]
fdiv dword [0x50ff94]
faddp st(1)
fstp qword [ebp + 8]
wait
xor eax, eax
push ebp
push 0x50ff54
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x78]
push eax
push 0
push 0
push 0x8000020
push 0xffffffffffffffff
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 4]
call fcn.0040590c
push eax
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
je 0x50fec6
mov byte [ebp - 0xd], 1
push 0x64
mov eax, dword [ebp - 0x88]
push eax
call sub.KERNEL32.DLL_WaitForSingleObject
mov esi, eax
mov eax, dword [0x57b5b0]
mov eax, dword [eax]
call fcn.0048ce08
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x100000
mov eax, dword [ebp - 0x1c]
add eax, ebx
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_PeekNamedPipe
test eax, eax
je 0x50fec6
cmp dword [ebp - 0x20], 0
jbe 0x50fead
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
add eax, ebx
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_ReadFile_1
add ebx, dword [ebp - 0x20]
cmp esi, 0x102
jne 0x50fec6
call fcn.0040fa04
fcomp qword [ebp + 8]
wait
fnstsw ax
sahf
jb 0x50fe4a
mov eax, dword [ebp - 0x1c]
mov byte [eax + ebx], 0
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_OemToCharA
lea edx, [ebp - 0x8c]
mov eax, dword [ebp - 0x1c]
call fcn.0040e21c
mov edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 8]
call fcn.0040549c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50ff5b
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x88]
push eax
call sub.KERNEL32.DLL_GetExitCodeProcess
push 0
mov eax, dword [ebp - 0x88]
push eax
call sub.KERNEL32.DLL_TerminateProcess
mov eax, dword [ebp - 0x1c]
call fcn.00402f5c
mov eax, dword [ebp - 0x88]
push eax
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0x84]
push eax
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0x18]
push eax
call sub.KERNEL32.DLL_CloseHandle_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50ff83
lea eax, [ebp - 0x8c]
call fcn.00405448
lea eax, [ebp - 4]
call fcn.00405448
ret