Function at 0x50195822
Capabilities:
Create pipe
Create process on windows
Read file on windows
Read pipe
Terminate process

Disassembly:
push ebp
mov eax, 0x2f64
lea ebp, [esp - 0x68]
call fcn.50260700
push ebx
push esi
xor ebx, ebx
push edi
lea eax, [ebp + 0x64]
push eax
push dword [ebp + 0x74]
mov esi, ecx
mov dword [ebp + 0x60], ebx
mov dword [ebp + 0x54], ebx
mov dword [ebp + 0x58], ebx
mov dword [ebp + 0x5c], ebx
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x64], ebx
mov byte [ebp - 0x18], bl
call fcn.5003efd3
cmp eax, ebx
mov dword [ebp + 0x74], eax
jl 0x50195a40
xor eax, eax
push 0x11
pop ecx
lea edi, [ebp - 0x14]
rep stosd dword es:[edi], eax
lea edi, [ebp + 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp + 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, 0xfa0
push edi
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp + 0x60]
push eax
mov dword [ebp + 0x40], 0xc
mov dword [ebp + 0x48], 1
call dword [sym.imp.kernel32.dll_CreatePipe]
test eax, eax
jne 0x501958b6
mov dword [ebp + 0x74], 0x8007000e
jmp 0x50195a40
mov eax, dword [ebp + 0x54]
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x2c], eax
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x78]
mov dword [ebp + 0x18], 0x100
push ebx
push 8
push 1
push ebx
push ebx
push dword [ebp + 0x64]
mov dword [ebp + 0x24], ebx
push dword [ebp + 0x70]
call dword [sym.imp.vsansi.dll_CreateProcessW]
test eax, eax
jne 0x501958fd
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp + 0x74], 0x80004005
jmp 0x50195a40
mov eax, dword [ebp + 0x30]
mov dword [ebp + 0x78], eax
mov eax, dword [esi + 0x20]
cmp eax, ebx
je 0x50195914
mov ecx, dword [eax]
lea edx, [ebp + 0x50]
push edx
push eax
call dword [ecx + 0xc]
cmp dword [ebp + 0x50], ebx
je 0x50195923
push ebx
push dword [ebp + 0x78]
call dword [sym.imp.kernel32.dll_TerminateProcess]
lea eax, [ebp + 0x5c]
push eax
push dword [ebp + 0x78]
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
test eax, eax
je 0x50195947
cmp dword [ebp + 0x5c], 0x103
jne 0x50195947
push 0x32
call dword [sym.imp.kernel32.dll_Sleep]
jmp 0x5019594e
mov dword [ebp + 0x4c], 1
push ebx
lea eax, [ebp + 0x70]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x60]
mov dword [ebp + 0x70], ebx
call dword [sym.imp.kernel32.dll_PeekNamedPipe]
cmp dword [ebp + 0x70], ebx
je 0x501959dd
push ebx
lea eax, [ebp + 0x58]
push eax
push edi
lea eax, [ebp - 0xfb8]
push eax
push dword [ebp + 0x60]
call dword [sym.imp.kernel32.dll_ReadFile]
cmp dword [esi + 0x24], ebx
mov eax, dword [ebp + 0x58]
mov byte [ebp + eax - 0xfb8], bl
jne 0x50195991
cmp dword [esi + 0x38], ebx
je 0x501959dd
push 0xfa1
lea eax, [ebp - 0x2efc]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0xfb8]
push eax
push ebx
push ebx
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x501959c2
mov ecx, dword [eax]
lea edx, [ebp - 0x2efc]
push edx
push eax
call dword [ecx + 0xc]
cmp dword [esi + 0x38], ebx
jne 0x501959cc
cmp dword [esi + 0x3c], ebx
je 0x501959dd
push 0xffffffffffffffff
lea eax, [ebp - 0x2efc]
push eax
lea ecx, [esi + 0x40]
call fcn.5024de29
cmp dword [ebp + 0x4c], ebx
je 0x50195903
cmp dword [esi + 0x3c], ebx
je 0x50195a34
lea ecx, [esi + 0x40]
call fcn.5024dab0
mov edi, dword [sym.imp.MSVCR70.dll_wcstok]
push 0x500084d0
mov dword [ebp + 0x78], eax
push eax
jmp 0x50195a16
mov ecx, dword [esi]
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push esi
call dword [ecx + 0x14]
push 0x500084d0
push ebx
call edi
cmp eax, ebx
pop ecx
pop ecx
jne 0x50195a04
push dword [ebp + 0x78]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [esi + 0x24]
cmp esi, ebx
je 0x50195a34
mov eax, dword [esi]
push esi
call dword [eax + 0x1c]
mov eax, dword [ebp + 0x7c]
cmp eax, ebx
je 0x50195a40
mov ecx, dword [ebp + 0x5c]
mov dword [eax], ecx
cmp dword [ebp + 0x64], ebx
je 0x50195a55
push dword [ebp + 0x64]
push ebx
push dword [0x50297d50]
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp + 0x74]
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret 0x10