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

Disassembly:
push 0xffffffffffffffff
push 0x514d1d
mov eax, dword fs:[0]
push eax
mov eax, 0x27ac
call fcn.004e5f20
mov eax, dword [0x549950]
xor eax, esp
mov dword [esp + 0x27a8], eax
push ebx
push esi
mov eax, dword [0x549950]
xor eax, esp
push eax
lea eax, [esp + 0x27b8]
mov dword fs:[0], eax
push 0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x4be71f
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x44], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, dword [esp + 0x1c]
xor ecx, ecx
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x84], eax
mov dword [esp + 0x80], eax
lea eax, [esp + 0x44]
push eax
push ecx
push ecx
push ecx
push 1
push ecx
push ecx
push 0x54b370
push ecx
mov word [esp + 0x98], cx
mov dword [esp + 0x94], 0x101
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], 0
mov byte [esp + 0x88], 0
mov dword [esp + 0x27c0], 0
test eax, eax
je 0x4be904
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x2711
lea edx, [esp + 0xa4]
push 0
push edx
call fcn.004e57c0
mov edx, dword [esp + 0x24]
add esp, 0xc
push 0
lea eax, [esp + 0x40]
push eax
push 0x2710
lea ecx, [esp + 0xac]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4be726
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call esi
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
cmp dword [esp + 0x9c], 0x10
jb 0x4be71f
mov ecx, dword [esp + 0x88]
push ecx
call fcn.004c0153
add esp, 4
xor eax, eax
jmp 0x4be945
lea edx, [esp + 0xa0]
push edx
lea ecx, [esp + 0x14]
call fcn.00407020
mov byte [esp + 0x27c0], 1
call fcn.004c01dc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4be759
push 0x80004005
call fcn.00401ff0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov bl, 2
mov byte [esp + 0x27c0], bl
mov eax, dword [0x550c50]
test eax, eax
je 0x4be813
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], 0
jl 0x4be813
push eax
push ecx
call fcn.004dfd90
add esp, 8
test eax, eax
je 0x4be813
mov edx, dword [esp + 0x10]
sub eax, edx
sar eax, 1
mov ecx, eax
cmp ecx, 0xffffffff
je 0x4be813
mov eax, dword [edx - 0xc]
mov edx, dword [0x550c50]
sub eax, dword [edx - 0xc]
sub eax, ecx
push eax
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
call fcn.00402780
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x27c4], 3
call fcn.00403060
lea ecx, [esp + 0xc]
mov byte [esp + 0x27c0], bl
call fcn.00403040
mov ecx, dword [0x550c58]
mov eax, dword [ecx - 0xc]
push eax
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402800
push eax
mov ecx, edi
mov byte [esp + 0x27c4], 4
call fcn.00403060
jmp 0x4be890
mov ecx, dword [0x550c54]
lea esi, [esp + 0x10]
call fcn.00402690
cmp eax, 0xffffffff
je 0x4be8a0
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx - 0xc]
mov edx, dword [0x550c54]
sub ecx, dword [edx - 0xc]
sub ecx, eax
push ecx
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00402780
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x27c4], 5
call fcn.00403060
lea ecx, [esp + 0xc]
mov byte [esp + 0x27c0], bl
call fcn.00403040
mov ecx, dword [0x550c58]
mov eax, dword [ecx - 0xc]
push eax
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402800
push eax
mov ecx, edi
mov byte [esp + 0x27c4], 6
call fcn.00402540
lea ecx, [esp + 0xc]
mov byte [esp + 0x27c0], bl
call fcn.00403040
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x4be8b4
push 0x550c58
mov ecx, edi
call fcn.00403060
mov byte [esp + 0x27c0], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be8dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x27c0], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be904
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x24]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
cmp dword [esp + 0x9c], 0x10
jb 0x4be940
mov edx, dword [esp + 0x88]
push edx
call fcn.004c0153
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x27b8]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x27a8]
xor ecx, esp
call fcn.004df2ac
add esp, 0x27b8
ret