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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp - 0xc8]
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov dword [ebp - 0xe0], 0x444780
lea edi, [ebp + 8]
mov dword [ebp - 0xd0], 0x444704
cmovae edi, dword [ebp + 8]
lea ecx, [ebp - 0xe0]
push eax
mov dword [ebp - 0x78], 0x444710
call fcn.00414a60
mov eax, dword [ebp - 0xe0]
push 8
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe0], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0xe0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xe4], eax
mov dword [ebp - 0xc8], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00417301
add esp, 4
mov esi, eax
push 1
call fcn.0041642c
mov dword [esi + 4], eax
add esp, 4
lea eax, [ebp - 0xc4]
mov dword [ebp - 0x94], esi
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xa4]
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0xa0]
push 0x80
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x1a8]
push 0
push eax
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xc8], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
call fcn.00419150
add esp, 0xc
lea eax, [ebp - 0x228]
push 0x80
push 0
push eax
call fcn.00419150
add esp, 0xc
lea eax, [ebp - 0x228]
push eax
push 0x80
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4047e0
sub ecx, edx
lea eax, [ecx*2 + 2]
push eax
call fcn.0041ea52
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4049e1
mov ecx, eax
sub ecx, edi
nop dword [eax + eax]
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [edi + ecx - 1], al
test al, al
jne 0x404810
push 0x40
lea eax, [ebp - 0x124]
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 8], 0
push 0
push eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0xc
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x128], 0x44
call fcn.00419150
add esp, 0xc
mov dword [ebp - 0x18], 1
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x30], xmm0
push 0
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push 0
push 1
push dword [ebp - 8]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test esi, esi
je 0x4049d0
xor eax, eax
mov dword [ebp - 0xfc], 0x101
mov word [ebp - 0xf8], ax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xec], eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x228]
push eax
push 0
push 0
push 1
push 0
push 0
push dword [ebp - 0x14]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push dword [ebp - 0x10]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
test esi, esi
je 0x4049d0
mov esi, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
nop word [eax + eax]
push 0x64
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x404949
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push dword [ebp - 8]
call esi
cmp dword [ebp - 4], 0
je 0x4049b4
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push dword [ebp - 8]
call esi
test eax, eax
je 0x404920
nop
cmp dword [ebp - 4], 0
je 0x404920
push 0
lea eax, [ebp - 4]
push eax
push 0x7f
lea eax, [ebp - 0x1a8]
push eax
push dword [ebp - 8]
call edi
test eax, eax
je 0x404920
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x1a8]
lea ecx, [ebp - 0xd0]
mov byte [ebp + eax - 0x1a8], 0
call fcn.00415510
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push dword [ebp - 8]
call esi
test eax, eax
jne 0x404960
jmp 0x404920
push dword [ebp - 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x30]
call esi
push dword [ebp - 0xc]
call esi
push dword [ebp - 8]
call esi
jmp 0x4049d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x14]
call fcn.0041e7e4
add esp, 4
mov ecx, dword [ebp - 0x8c]
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
mov byte [ebx], 0
test cl, 2
jne 0x404a22
mov eax, dword [ebp - 0xa8]
mov edx, dword [eax]
test edx, edx
je 0x404a22
mov eax, dword [ebp - 0xb8]
cmp edx, dword [ebp - 0x90]
cmovb edx, dword [ebp - 0x90]
mov ecx, dword [eax]
sub edx, ecx
jmp 0x404a45
test cl, 4
jne 0x404a4e
mov eax, dword [ebp - 0xac]
mov edx, dword [eax]
test edx, edx
je 0x404a4e
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax]
sub edx, ecx
mov eax, dword [ebp - 0x9c]
add edx, dword [eax]
push edx
push ecx
mov ecx, ebx
call fcn.00414eb0
lea ecx, [ebp - 0xe0]
call fcn.00404aa0
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x404a89
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404a7f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404a92
push edx
push ecx
call fcn.00417582
add esp, 8
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0041ea01
int3