Function at 0x516e90
Capabilities:
Access peb ldr_data
Create pipe
Create process on windows
Create process suspended
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x2a4
test eax, eax
jne 0x517190
lea esi, [ebp - 0x278]
mov dword [esp + 8], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [0x850118]
sub esp, 0x10
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x125d
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
test edi, edi
je 0x517180
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
mov dword [esp], ebx
lea ebx, [ebp - 0x250]
mov dword [esp + 4], 0x5efc10
call fcn.0050e8b0
lea edx, [ebp - 0x24c]
xor eax, eax
mov ecx, 0x11
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x278]
mov dword [ebp - 0x250], 0x48
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp - 0x20c], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [0x850118]
sub esp, 0x10
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1264
mov eax, dword [edi + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp], esi
mov dword [esp + 4], 0x5efc10
call fcn.0050e8b0
lea eax, [ebp - 0x26c]
mov dword [ebp - 0x268], 0
lea edx, [ebp - 0x274]
mov dword [ebp - 0x26c], 0xc
mov dword [ebp - 0x264], 1
mov dword [esp + 8], eax
lea eax, [ebp - 0x270]
mov dword [esp], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CreatePipe]
sub esp, 0x10
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x126b
mov dword [esp], esi
mov dword [esp + 4], str.Failed_to_create_a_pipe._n
call fcn.0050e8b0
lea edx, [ebp - 0x274]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0x20002
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x20c]
mov dword [esp], eax
call dword [0x850114]
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x126f
mov eax, dword [edi + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp], esi
lea esi, [ebp - 0x260]
mov dword [esp + 4], 0x5efc10
call fcn.0050e8b0
mov eax, dword [ebp - 0x270]
lea edx, [ebp - 0x150]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x274]
mov dword [esp], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.__s__process_handlelist__p__p
call fcn.0050d7a0
lea edx, [ebp - 0x150]
mov dword [esp + 0x24], esi
mov dword [esp + 4], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80000
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessA]
sub esp, 0x28
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1274
mov eax, dword [edi + 0x34]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp], ebx
mov dword [esp + 4], 0x5efc10
call fcn.0050e8b0
mov eax, esi
call fcn.0050e290
mov eax, dword [ebp - 0x274]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x270]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebx, ebx
cmp edx, 0x7a
sete bl
jmp 0x516ef5
mov edi, ecx
lea eax, [ebp - 0x260]
mov esi, edx
mov ecx, dword [sym.imp.kernel32.dll_GetHandleInformation]
mov dword [ebp - 0x260], 0
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x284], ecx
call ecx
sub esp, 8
mov dword [ebp - 0x27c], eax
mov eax, 0x1249
call fcn.0050dc60
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x280], edx
mov dword [esp + 4], str.Failed_to_get_handle_info__error__ld._n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x27c]
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x124a
call fcn.0050dc60
mov eax, dword [ebp - 0x260]
mov dword [esp + 4], str.Unexpected_flags__lx._n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0050e8b0
lea eax, [ebp - 0x250]
mov dword [esp + 0xc], 0x100
mov dword [esp + 8], eax
mov eax, dword [sym.imp.kernel32.dll_GetFileInformationByHandleEx]
mov dword [esp + 4], 2
mov dword [esp], esi
mov dword [ebp - 0x288], eax
call eax
sub esp, 0x10
mov dword [ebp - 0x27c], eax
mov eax, 0x124c
call fcn.0050dc60
mov edx, dword [ebp - 0x280]
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.Failed_to_get_pipe_name__error__ld_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x27c]
mov dword [esp], ecx
call fcn.0050e8b0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x260], 0
sub esp, 4
mov dword [esp + 4], ecx
mov dword [esp], edi
mov ecx, dword [ebp - 0x284]
call ecx
mov edx, dword [ebp - 0x280]
sub esp, 8
test eax, eax
je 0x517350
mov eax, 0x1252
lea esi, [ebp - 0x150]
call fcn.0050dc60
mov dword [esp + 4], str.Parents_handle_shouldnt_have_been_inherited_n
mov ecx, dword [ebp - 0x260]
not ecx
mov eax, ecx
and eax, 1
mov dword [esp], eax
call fcn.0050e8b0
mov dword [esp], edi
mov dword [esp + 0xc], 0x100
mov dword [esp + 8], esi
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x288]
call eax
mov edi, eax
sub esp, 0x10
mov eax, 0x1254
call fcn.0050dc60
test edi, edi
je 0x517338
lea eax, [ebp - 0x250]
mov dword [esp + 4], esi
xor ebx, ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
test eax, eax
setne bl
mov dword [esp], ebx
mov dword [esp + 4], str.Parents_handle_shouldnt_have_been_inherited_n
call fcn.0050e8b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x1257
mov dword [ebp - 0x27c], edx
call fcn.0050dc60
mov edx, dword [ebp - 0x27c]
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.Unexpected_return_value__error__ld._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edx + 0x34], 6
sete al
mov dword [esp], eax
call fcn.0050e8b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret