Function at 0x40d9c0
Capabilities:
Create pipe
Create process on windows
Create two anonymous pipes
Read file on windows
Read pipe
Terminate process

Disassembly:
sub esp, 0x82c
xor eax, eax
push ebx
mov ebx, dword [esp + 0x834]
push ebp
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], eax
mov dword [esp + 8], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x34], ebp
je 0x40ddc4
cmp byte [ebx], 0
je 0x40ddc4
mov eax, dword [esp + 0x844]
cmp eax, ebp
je 0x40da31
mov dword [eax], ebp
mov eax, dword [esp + 0x848]
cmp eax, ebp
je 0x40da3e
mov dword [eax], ebp
push edi
lea ecx, [esp + 0xa4]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.0040c9f0
mov edi, dword [sym.imp.KERNEL32.dll_CreatePipe]
add esp, 8
push 0x780
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x6c], 1
call edi
test eax, eax
jne 0x40da8b
pop edi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x82c
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 1
push ebp
lea eax, [esp + 0x28]
push eax
call esi
mov ecx, dword [esp + 0x28]
push eax
push ecx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 0x780
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x38]
push ecx
call edi
test eax, eax
jne 0x40daf2
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
pop esi
pop edi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x82c
ret
mov edx, dword [esp + 0x2c]
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x9c], edx
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0xa4], eax
lea eax, [esp + 0x68]
push eax
push 0
push 0
push 8
push 1
push 0
push 0
push ebx
push 0
mov dword [esp + 0x8c], 0x44
mov dword [esp + 0xb8], 0x100
mov dword [esp + 0xcc], ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov esi, eax
call edi
mov edx, dword [esp + 0x1c]
push edx
call edi
mov eax, dword [esp + 0x2c]
push eax
call edi
mov eax, dword [esp + 0x848]
test eax, eax
je 0x40db98
cmp byte [eax], 0
je 0x40db98
push 0x422c70
push eax
call fcn.004141fc
mov ebx, eax
add esp, 8
mov dword [esp + 0x28], ebx
jmp 0x40db9c
mov ebx, dword [esp + 0x28]
test esi, esi
je 0x40dd69
mov ecx, dword [esp + 0x48]
push ecx
call edi
mov esi, 0x102
mov dword [esp + 0x24], esi
mov edx, dword [esp + 0x38]
cmp edx, dword [esp + 0x844]
jae 0x40dd46
mov eax, dword [esp + 0x44]
push 0x19
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, esi
mov dword [esp + 0x24], eax
jne 0x40dbdf
add dword [esp + 0x38], 0x19
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push 0
push edx
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x40dd28
jmp 0x40dc10
mov eax, dword [esp + 0x20]
test eax, eax
jbe 0x40dd28
mov edx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
push 0x780
lea ecx, [esp + 0xc8]
push ecx
push edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test esi, esi
je 0x40dd28
mov ecx, dword [esp + 0x10]
test ecx, ecx
jbe 0x40dd20
test ebx, ebx
je 0x40dc7f
push ebx
push ecx
lea eax, [esp + 0xc4]
push 1
push eax
call fcn.004162cc
mov ecx, dword [esp + 0x44]
add esp, 0x10
add ecx, eax
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x84c]
test eax, eax
je 0x40dd20
mov ebx, dword [esp + 0x3c]
mov edi, dword [esp + 0x30]
lea edx, [ebx + ecx + 1]
cmp edx, edi
jbe 0x40dcc9
lea esi, [edi + 0x800]
push esi
push ebp
call fcn.00414a84
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40dcf4
xor eax, eax
add edi, ebp
mov ecx, 0x200
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], esi
mov edi, esi
test ebp, ebp
je 0x40dcf4
lea eax, [ebx + ecx]
cmp eax, edi
ja 0x40dcf4
mov edx, ecx
shr ecx, 2
lea edi, [ebx + ebp]
lea esi, [esp + 0xbc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, dword [esp + 0x10]
mov dword [esp + 0x3c], ebx
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0
push ecx
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x28]
mov esi, eax
test esi, esi
jne 0x40dc10
mov eax, dword [esp + 0x24]
mov esi, 0x102
cmp eax, esi
je 0x40dbb4
mov eax, dword [esp + 0x44]
push eax
call edi
mov esi, dword [esp + 0x54]
jmp 0x40dd6c
cmp dword [esp + 0x24], esi
jne 0x40dd5c
mov edx, dword [esp + 0x44]
push 0x5b4
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x44]
push eax
call edi
mov esi, dword [esp + 0x54]
jmp 0x40dd6c
or esi, 0xffffffff
mov ecx, dword [esp + 0x40]
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call edi
test ebx, ebx
je 0x40dd87
push ebx
call fcn.0041414f
add esp, 4
mov eax, dword [esp + 0x84c]
test eax, eax
je 0x40dd98
test ebp, ebp
je 0x40dd98
mov dword [eax], ebp
mov ecx, dword [esp + 0x850]
test ecx, ecx
je 0x40ddb7
test ebx, ebx
je 0x40ddad
mov edx, dword [esp + 0x34]
mov dword [ecx], edx
test eax, eax
je 0x40ddb7
mov eax, dword [esp + 0x3c]
mov dword [ecx], eax
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x82c
ret
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x82c
ret