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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a514
mov eax, dword fs:[0]
push eax
mov eax, 0x1088
call fcn.0040f260
mov eax, dword [0x4424f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x1c]
xor ebx, ebx
mov dword [ebp - 0x102c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1020], eax
mov dword [ebp - 0x1014], ebx
mov dword [ebp - 0x1028], ebx
mov dword [ebp - 0x1050], 0xc
mov dword [ebp - 0x104c], ebx
mov dword [ebp - 0x1048], 1
cmp eax, ebx
je 0x40177a
push ebx
lea ecx, [ebp - 0x1050]
push ecx
lea edx, [ebp - 0x1028]
push edx
lea eax, [ebp - 0x1014]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x401a1d
push 0x40
lea ecx, [ebp - 0x1090]
push ebx
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea edx, [ebp - 0x1094]
push edx
mov dword [ebp - 0x1094], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, dword [ebp + 0x18]
lea ecx, [ebp - 0x103c]
push ecx
lea edx, [ebp - 0x1094]
push edx
push edi
neg eax
push ebx
sbb eax, eax
push ebx
and eax, 0xfffffffb
push 1
add eax, 5
push ebx
mov word [ebp - 0x1064], ax
mov eax, dword [ebp - 0x1028]
push ebx
mov dword [ebp - 0x1054], eax
mov dword [ebp - 0x1058], eax
xor eax, eax
push esi
push ebx
mov dword [ebp - 0x1068], 0x101
mov dword [ebp - 0x103c], ebx
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1040], eax
mov eax, dword [ebp - 0x1028]
push eax
call esi
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x401a0e
cmp dword [ebp - 0x1040], ebx
je 0x401a0e
cmp edi, 0xffffffff
je 0x401886
mov ecx, dword [ebp - 0x103c]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x401866
mov edx, dword [ebp - 0x102c]
mov eax, dword [ebp - 0x103c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x401874
mov ecx, dword [ebp - 0x103c]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edx, dword [ebp - 0x1038]
push edx
call esi
mov eax, dword [ebp - 0x103c]
push eax
call esi
cmp dword [ebp - 0x1020], ebx
je 0x4019d4
push 0xfff
lea ecx, [ebp - 0x100f]
push ebx
push ecx
mov byte [ebp - 0x1010], bl
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1024]
mov dword [ebp - 0x101c], ebx
call dword [0x42f90c]
lea ecx, [ebp - 0x1018]
mov dword [ebp - 4], ebx
call dword [0x42f90c]
mov ecx, dword [ebp - 0x1014]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea edx, [ebp - 0x101c]
push edx
push 0xfff
lea eax, [ebp - 0x1010]
push eax
push ecx
mov byte [ebp - 4], 1
call esi
test eax, eax
je 0x401972
lea esp, [esp]
mov edx, dword [ebp - 0x101c]
push edx
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x1044]
push ecx
call fcn.00401180
add esp, 0xc
push eax
lea ecx, [ebp - 0x1024]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x1044]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea edx, [ebp - 0x1024]
push edx
lea ecx, [ebp - 0x1018]
call dword [0x42f86c]
mov edx, dword [ebp - 0x1014]
push ebx
lea eax, [ebp - 0x101c]
push eax
push 0xfff
lea ecx, [ebp - 0x1010]
push ecx
push edx
call esi
test eax, eax
jne 0x401900
lea ecx, [ebp - 0x1018]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetLength]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.mfc100u.dll_new__
mov esi, dword [ebp - 0x1020]
add esp, 4
lea ecx, [ebp - 0x1018]
mov dword [esi], eax
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x1018]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1024]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1014]
push ecx
call esi
cmp edi, 0xffffffff
jne 0x401a17
cmp dword [ebp - 0x1020], ebx
jne 0x4019f8
mov edx, dword [ebp - 0x103c]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x102c]
mov ecx, dword [ebp - 0x103c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x401a17
mov edx, dword [ebp - 0x1014]
push edx
call esi
mov eax, dword [ebp - 0x1040]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f12c
mov esp, ebp
pop ebp
ret