Function at 0x519ed0
Capabilities:
Create pipe
Create process on windows
Create two anonymous pipes
Read file on windows
Read pipe

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff8d8
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404840
xor eax, eax
push ebp
push 0x51a195
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x52640c], 1
mov dword [ebp - 0x728], 0x94
lea eax, [ebp - 0x728]
push eax
call sub.kernel32.dll_GetVersionExA
cmp dword [ebp - 0x718], 2
jne 0x519f5a
mov dword [ebp - 0x90], 0xc
xor eax, eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], 0xffffffff
push 0
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.kernel32.dll_CreatePipe
jmp 0x519f6e
push 0x400
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.kernel32.dll_CreatePipe
xor eax, eax
push ebp
push 0x51a16b
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x74]
xor ecx, ecx
mov edx, 0x44
call fcn.00402f64
mov dword [ebp - 0x74], 0x44
mov word [ebp - 0x44], 0
mov dword [ebp - 0x48], 1
or dword [ebp - 0x48], 0x100
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x691]
mov edx, dword [ebp - 4]
call fcn.0040998c
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x74]
push eax
push 0
push 0
push 0x20
push 0xffffffffffffffff
push 0
push 0
lea eax, [ebp - 0x691]
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x51a144
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x51a11f
cmp byte [0x52640c], 0
je 0x51a11f
push 0x1f4
mov eax, dword [ebp - 0x84]
push eax
call sub.kernel32.dll_WaitForSingleObject
mov dword [ebp - 0x24], eax
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x400
lea eax, [ebp - 0x490]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_PeekNamedPipe
test eax, eax
je 0x51a105
cmp dword [ebp - 0x1c], 0
jbe 0x51a105
mov dl, 1
mov eax, dword [0x418568]
call fcn.0040352c
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x51a0fe
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x490]
xor ecx, ecx
mov edx, 0x400
call fcn.00402f64
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x490]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x14]
mov byte [ebp + eax - 0x490], 0
lea eax, [ebp - 0x30]
lea edx, [ebp - 0x490]
mov ecx, 0x400
call fcn.00404600
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
call fcn.00404658
mov eax, dword [0x526408]
mov eax, dword [eax + 0x2f8]
mov edx, dword [ebp - 0x2c]
call fcn.0045ffa8
mov eax, dword [0x523ee4]
mov eax, dword [eax]
call fcn.00480270
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x28]
call fcn.004043e4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51a105
mov eax, dword [ebp - 0x18]
call fcn.0040355c
ret
cmp dword [ebp - 0x24], 0x102
je 0x51a115
mov dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], 0
je 0x519ffc
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x84]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x84]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x80]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51a172
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle
mov byte [0x52640c], 0
ret