Function at 0x40e916
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
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c8
xor eax, eax
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
cmp dword [ebp + 8], eax
je 0x40ebc6
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [ebp - 0x24], eax
mov edi, 0x100000
push edi
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
xor ebx, ebx
lea eax, [ebp - 8]
inc ebx
push eax
mov dword [ebp - 0x28], 0xc
mov dword [ebp - 0x20], ebx
call esi
test eax, eax
je 0x40eb96
push edi
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
call esi
test eax, eax
je 0x40eb96
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
xor edi, edi
push edi
push ebx
push dword [ebp - 8]
call esi
test eax, eax
je 0x40eb98
push edi
push ebx
push dword [ebp - 0xc]
call esi
test eax, eax
je 0x40eb98
push 0x31
lea edi, [ebp - 0x34]
pop eax
call fcn.00417527
push 0x32
lea edi, [ebp - 0xc4]
pop eax
call fcn.00417527
mov ecx, dword [ebp + 8]
call fcn.0042cc16
mov ecx, edi
mov edx, eax
call fcn.0042cc16
lea ecx, [ebp - 0x34]
add edx, eax
call fcn.0042cc16
lea edi, [edx + eax + 1]
mov eax, edi
call fcn.0042c055
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x40ea0a
push dword [ebp - 0x14]
call ebx
push dword [ebp - 8]
call ebx
push dword [ebp - 0xc]
call ebx
push dword [ebp - 0x10]
call ebx
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0xc4]
push eax
push 0x4081ac
call fcn.0042cf02
add esp, 0x10
push 0x10
xor edi, edi
push edi
lea eax, [ebp - 0x44]
push eax
call fcn.0042c138
push 0x44
pop edx
push edx
push edi
lea eax, [ebp - 0x8c]
push eax
call fcn.0042c138
mov eax, dword [ebp - 0x10]
or dword [ebp - 0x60], 0x101
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x54], eax
xor eax, eax
push 0x2f
mov word [ebp - 0x5c], ax
lea esi, [ebp - 0x9c]
pop eax
mov dword [ebp - 0x8c], edx
call fcn.0041755d
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x8c]
push eax
push edi
push edi
push edi
push 1
push edi
push edi
mov eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40eab5
push dword [ebp - 0x14]
call ebx
push dword [ebp - 8]
call ebx
push dword [ebp - 0xc]
call ebx
push dword [ebp - 0x10]
call ebx
push dword [ebp - 0x1c]
call fcn.0042c085
jmp 0x40ebc6
mov esi, dword [ebp - 0x1c]
push edi
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
mov dword [ebp - 0x18], edi
call fcn.0042cc16
inc eax
push eax
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40eaee
push dword [ebp - 0x14]
call ebx
push dword [ebp - 8]
call ebx
push dword [ebp - 0xc]
call ebx
push dword [ebp - 0x10]
call ebx
push esi
jmp 0x40eaab
push esi
call fcn.0042c085
push dword [ebp - 0x40]
call ebx
push 0xffffffffffffffff
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x44]
neg eax
sbb esi, esi
inc esi
call ebx
push dword [ebp - 0xc]
call ebx
push dword [ebp - 0x10]
call ebx
and dword [ebp + 8], edi
jmp 0x40eb46
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40eb66
push dword [ebp + 8]
add eax, edi
call fcn.0042c021
push dword [ebp - 0x18]
lea ecx, [ebp - 0x1c4]
mov dword [ebp + 8], eax
push ecx
add eax, edi
push eax
call fcn.0042c0c1
add edi, dword [ebp - 0x18]
push 0
lea eax, [ebp - 0x18]
push eax
push 0x100
lea eax, [ebp - 0x1c4]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
je 0x40eb1d
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40eb74
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
jmp 0x40eb7c
push dword [ebp + 8]
call fcn.0042c085
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40eb85
mov dword [eax], edi
push dword [ebp - 0x14]
call ebx
push dword [ebp - 8]
call ebx
test esi, esi
setne al
jmp 0x40ebc8
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], edi
je 0x40eba8
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 8], edi
je 0x40ebb2
push dword [ebp - 8]
call esi
cmp dword [ebp - 0xc], edi
je 0x40ebbc
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x10], edi
je 0x40ebc6
push dword [ebp - 0x10]
call esi
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0xc