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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4630db
mov eax, dword fs:[0]
push eax
mov eax, 0x3ba0
call fcn.0045db90
mov eax, dword [0x4920c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, dl
mov dword [ebp - 0x3b14], ecx
push dword [ebp - 0x3b2c]
mov edx, dword [0x496ca4]
push ecx
mov ecx, dword [0x496ca0]
call fcn.004099d0
mov eax, dword [0x496ca0]
add esp, 8
mov dword [0x496ca4], eax
push 0
lea eax, [ebp - 0x3b38]
push eax
lea eax, [ebp - 0x3b24]
push eax
lea eax, [ebp - 0x3b1c]
push eax
mov dword [ebp - 0x3b28], 0
mov dword [ebp - 0x3b20], 0
mov dword [ebp - 0x3b1c], 0
mov dword [ebp - 0x3b24], 0
mov dword [ebp - 0x3b38], 0xc
mov dword [ebp - 0x3b30], 1
mov dword [ebp - 0x3b34], 0
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
test eax, eax
jne 0x439922
push dword [ebp - 0x3b1c]
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push dword [ebp - 0x3b24]
call esi
mov dword [ebp - 0x3b1c], 0
mov dword [ebp - 0x3b24], 0
jmp 0x43999d
mov edi, dword [sym.imp.KERNEL32.DLL_SetHandleInformation]
push 0
push 1
push dword [ebp - 0x3b1c]
call edi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
test eax, eax
je 0x439983
push 0
lea eax, [ebp - 0x3b38]
push eax
lea eax, [ebp - 0x3b20]
push eax
lea eax, [ebp - 0x3b28]
push eax
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
test eax, eax
jne 0x4399d3
push dword [ebp - 0x3b28]
call esi
push dword [ebp - 0x3b20]
call esi
mov dword [ebp - 0x3b28], 0
mov dword [ebp - 0x3b20], 0
mov eax, dword [ebp - 0x3b1c]
test eax, eax
je 0x439990
push eax
call esi
mov eax, dword [ebp - 0x3b24]
test eax, eax
je 0x43999d
push eax
call esi
mov eax, dword [ebp - 0x3b28]
test eax, eax
je 0x4399aa
push eax
call esi
mov eax, dword [ebp - 0x3b20]
test eax, eax
je 0x4399b7
push eax
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044fdac
mov esp, ebp
pop ebp
ret
push 0
push 1
push dword [ebp - 0x3b20]
call edi
test eax, eax
je 0x439983
push dword [ebp - 0x3b14]
lea eax, [ebp - 0x3fc]
push 0x190
push eax
call fcn.004513ee
add esp, 0xc
mov ecx, 0x10
lea eax, [ebp - 0x3b48]
mov byte [eax], 0
lea eax, [eax + 1]
dec ecx
jne 0x439a08
mov ecx, 0x44
lea eax, [ebp - 0x3b94]
lea esp, [esp]
mov byte [eax], 0
lea eax, [eax + 1]
dec ecx
jne 0x439a20
mov eax, dword [ebp - 0x3b24]
mov dword [ebp - 0x3b54], eax
mov dword [ebp - 0x3b58], eax
mov eax, dword [ebp - 0x3b28]
mov dword [ebp - 0x3b5c], eax
xor eax, eax
test byte [0x49313c], 1
mov esi, 0x8000000
cmovne esi, eax
mov dword [ebp - 0x3b94], 0x44
mov dword [ebp - 0x3b68], 0x101
mov word [ebp - 0x3b64], ax
mov dword [ebp - 0x3b2c], eax
test bl, bl
je 0x439a8f
mov eax, dword [0x49460c]
test eax, eax
je 0x439a8f
lea ecx, [ebp - 0x3b2c]
push ecx
call eax
lea eax, [ebp - 0x3b48]
push eax
lea eax, [ebp - 0x3b94]
push eax
push 0
push 0
push esi
push 1
push 0
push 0
lea eax, [ebp - 0x3fc]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
mov esi, eax
test bl, bl
je 0x439acf
mov ecx, dword [0x494608]
test ecx, ecx
je 0x439acf
push dword [ebp - 0x3b2c]
call ecx
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
test esi, esi
je 0x439d0d
xor eax, eax
xor ebx, ebx
push ebx
mov word [ebp - 0x2b0c], ax
mov dword [ebp - 0x3b18], eax
mov dword [ebp - 0x3b14], eax
mov dword [ebp - 0x3b10], eax
lea eax, [ebp - 0x3b10]
push eax
push ebx
push 0x1000
push ebx
push dword [ebp - 0x3b1c]
xor esi, esi
call dword [sym.imp.KERNEL32.DLL_PeekNamedPipe]
jmp 0x439b20
xor ecx, ecx
mov dword [ebp - 0x3b18], ecx
cmp dword [ebp - 0x3b10], ecx
jbe 0x439b56
push ecx
lea eax, [ebp - 0x3b18]
push eax
push 0x1000
lea eax, [ebp - 0x3b0c]
push eax
push dword [ebp - 0x3b1c]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp - 0x3b18]
xor edi, edi
test ecx, ecx
jle 0x439c3d
cmp byte [ebp + edi - 0x3b0c], 0xa
jne 0x439c1a
lea eax, [esi + esi]
cmp eax, 0x2710
jae 0x439d08
xor ecx, ecx
mov word [ebp + eax - 0x2b0c], cx
xor eax, eax
mov dword [ebp - 0x3b98], 7
mov dword [ebp - 0x3b9c], ecx
mov word [ebp - 0x3bac], ax
cmp word [ebp - 0x2b0c], ax
je 0x439bc0
lea eax, [ebp - 0x2b0c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x439bb1
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2b0c]
push eax
lea ecx, [ebp - 0x3bac]
call fcn.004023a0
lea eax, [ebp - 0x3bac]
push eax
mov ecx, 0x496ca0
mov dword [ebp - 4], 0
call fcn.00408fe0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x3b98], 8
jb 0x439c09
push dword [ebp - 0x3bac]
call fcn.00450920
add esp, 4
mov ecx, dword [ebp - 0x3b18]
xor eax, eax
mov word [ebp - 0x2b0c], ax
xor esi, esi
mov al, byte [ebp + edi - 0x3b0c]
cmp al, 0xd
je 0x439c34
cmp al, 0xa
je 0x439c34
cbw
mov word [ebp + esi*2 - 0x2b0c], ax
inc esi
inc edi
cmp edi, ecx
jl 0x439b60
lea eax, [ebp - 0x3b14]
push eax
push dword [ebp - 0x3b48]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
push 0
lea eax, [ebp - 0x3b10]
push eax
push 0
push 0x1000
push 0
push dword [ebp - 0x3b1c]
mov dword [ebp - 0x3b10], 0
call dword [sym.imp.KERNEL32.DLL_PeekNamedPipe]
cmp dword [ebp - 0x3b14], 0x103
jne 0x439c9e
cmp dword [ebp - 0x3b10], 0
jne 0x439c9e
push 0xfa
call dword [sym.imp.KERNEL32.DLL_Sleep]
add ebx, 0xfa
mov eax, dword [ebp + 8]
test eax, eax
jle 0x439cc8
cmp ebx, eax
jl 0x439cc8
mov edx, 1
mov ecx, str.Error:_Terminating_process
call fcn.0040da30
push 0
push dword [ebp - 0x3b48]
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
xor ebx, ebx
cmp dword [ebp - 0x3b14], 0x103
je 0x439b20
cmp dword [ebp - 0x3b10], 0
ja 0x439b20
mov eax, dword [ebp - 0x3b14]
push dword [ebp - 0x3b48]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [0x4945c8], eax
call ebx
push dword [ebp - 0x3b44]
call ebx
jmp 0x439d3e
call fcn.0045119a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
lea eax, [ebp - 0xdc]
push str.Process_failed_to_start__Code__d_
push eax
call fcn.004097a0
add esp, 0xc
lea eax, [ebp - 0xdc]
push 0
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [ebp - 0x3b1c]
test eax, eax
je 0x439d4b
push eax
call ebx
mov eax, dword [ebp - 0x3b24]
test eax, eax
je 0x439d58
push eax
call ebx
mov eax, dword [ebp - 0x3b28]
test eax, eax
je 0x439d65
push eax
call ebx
mov eax, dword [ebp - 0x3b20]
test eax, eax
je 0x4399b7
push eax
call ebx
jmp 0x4399b7