Function at 0x40c080
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Print debug messages
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5174c6
mov eax, dword fs:[0]
push eax
sub esp, 0x8e8
mov eax, dword [0x577690]
xor eax, esp
mov dword [esp + 0x8e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x577690]
xor eax, esp
push eax
lea eax, [esp + 0x8fc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x90c]
xor ebx, ebx
push ebx
mov esi, ecx
push 0x5616e2
mov ecx, ebp
call fcn.00403d20
push esi
lea edi, [esp + 0x74]
call fcn.0040b620
add esp, 4
push eax
mov edi, 0x5684d0
lea esi, [esp + 0xdc]
mov dword [esp + 0x908], ebx
call fcn.00405f80
add esp, 4
mov esi, 0x10
mov byte [esp + 0x904], 2
cmp dword [esp + 0x88], esi
jb 0x40c11f
mov eax, dword [esp + 0x74]
push eax
call fcn.004f9a4f
add esp, 4
push 0x7ff
lea ecx, [esp + 0xf9]
push ebx
push ecx
mov dword [esp + 0x94], 0xf
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
mov byte [esp + 0x100], bl
call fcn.004fc930
add esp, 0xc
xor eax, eax
push 0x44
lea edx, [esp + 0x90]
push ebx
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
call fcn.004fc930
add esp, 0xc
push ebx
xor eax, eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x34]
mov word [esp + 0xc4], ax
push edx
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x48], 1
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x9c], 0x44
mov dword [esp + 0xc8], 0x101
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x40c1ff
push str.cmd:_CreatePipe_failed__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esp + 0xf0], esi
jb 0x40c1f8
mov ecx, dword [esp + 0xdc]
push ecx
call fcn.004f9a4f
add esp, 4
xor eax, eax
jmp 0x40c460
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ebx
push 1
push edx
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
je 0x40c26b
mov eax, dword [esp + 0xdc]
cmp dword [esp + 0xf0], esi
jae 0x40c23a
lea eax, [esp + 0xdc]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x90]
push edx
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40c28b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.cmd:_CreateProcess_failed__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [esp + 0xf0], esi
jb 0x40c1f8
mov eax, dword [esp + 0xdc]
push eax
call fcn.004f9a4f
add esp, 4
xor eax, eax
jmp 0x40c460
mov edx, dword [esp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea ecx, [esp + 0x24]
push ecx
push edx
call esi
mov edi, 0x103
cmp dword [esp + 0x24], edi
jne 0x40c2c2
jmp 0x40c2b0
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x24]
push eax
push ecx
call esi
cmp dword [esp + 0x24], edi
je 0x40c2b0
mov edx, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test eax, eax
jne 0x40c2e0
push str.cmd:_CloseHandle_writeHandle__failed__n
call edi
mov edx, dword [esp + 0x28]
push ebx
lea eax, [esp + 0x50]
push eax
push 0x800
lea ecx, [esp + 0x100]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c322
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.cmd:_ReadFile_failed__n
call edi
lea ecx, [esp + 0xd8]
call fcn.00402180
xor eax, eax
jmp 0x40c460
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x4c]
push ecx
mov byte [esp + eax + 0xf8], bl
call esi
test eax, eax
jne 0x40c33f
push str.cmd:_CloseHandle_readHandle__failed__n
call edi
mov edx, dword [esp + 0x40]
push edx
call esi
mov eax, dword [esp + 0x3c]
push eax
call esi
lea eax, [esp + 0xf4]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40c357
sub eax, ecx
push eax
lea ecx, [esp + 0xf8]
push ecx
mov eax, ebp
call fcn.004124a0
lea ebx, [esp + 0x60]
mov edi, ebp
mov byte [esp + 0x1b], 0xa
call fcn.004126f0
mov edx, dword [eax]
mov eax, dword [eax + 4]
lea ebx, [esp + 0x50]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
call fcn.004126f0
lea ebx, [esp + 0x58]
mov esi, eax
call fcn.00403480
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x2b]
push eax
lea ebx, [esp + 0x7c]
call fcn.004138e0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
add esp, 0x14
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
call fcn.004125d0
lea ebx, [esp + 0x68]
mov byte [esp + 0x1b], 0xd
call fcn.004126f0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
lea ebx, [esp + 0x58]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
call fcn.004126f0
lea ebx, [esp + 0x50]
mov esi, eax
call fcn.00403480
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x2b]
push eax
lea ebx, [esp + 0x74]
call fcn.004138e0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
add esp, 0x14
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
call fcn.004125d0
push ebp
call fcn.0040baa0
add esp, 4
lea ecx, [esp + 0xd8]
call fcn.00402180
mov eax, 1
mov ecx, dword [esp + 0x8fc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x8e0]
xor ecx, esp
call fcn.004f8e7f
add esp, 0x8f4
ret