Function at 0x404cbf
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0xc4
push ebx
push esi
push edi
xor ebx, ebx
push 0x44
pop esi
push esi
xor edi, edi
lea eax, [ebp - 0x24]
push ebx
inc edi
push eax
mov dword [ebp + 0x60], 0x20
mov dword [ebp + 0x58], ebx
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x44], ebx
mov dword [ebp + 0x5c], ebx
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0x54], ebx
mov dword [ebp + 0x40], ebx
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x30], 0xc
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x38], edi
call sub.MSVCRT.dll_memset
mov cl, byte [ebp + 0x78]
add esp, 0xc
mov dword [ebp - 0x24], esi
mov dword [ebp + 8], edi
test cl, 2
je 0x404d28
xor eax, eax
mov dword [ebp + 0x60], 0x28
jmp 0x404d2a
mov eax, edi
mov word [ebp + 0xc], ax
mov esi, 0x100
test cl, 0x40
je 0x404d55
mov eax, dword [ebp + 0x7c]
cmp eax, ebx
je 0x404d55
mov eax, dword [eax + 0xc]
cmp eax, ebx
je 0x404d55
mov dword [ebp + 8], 0x101
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x4c], edi
jmp 0x404d8e
test cl, 4
je 0x404d92
test cl, 0x10
je 0x404d92
push ebx
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp + 0x50]
push eax
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x404d92
mov eax, dword [ebp + 0x58]
or dword [ebp + 8], esi
lea edi, [ebp + 0x50]
mov dword [ebp + 0x14], eax
call fcn.00404c88
mov dword [ebp + 0x4c], 1
and dword [ebp + 0x60], 0xfffffff7
mov eax, dword [ebp + 0x78]
and eax, 4
mov dword [ebp + 0x3c], eax
je 0x404e0f
test byte [ebp + 0x78], 8
je 0x404dd6
push ebx
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp + 0x5c]
push eax
lea eax, [ebp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x404dd6
mov eax, dword [ebp + 0x5c]
or dword [ebp + 8], esi
lea edi, [ebp + 0x44]
mov dword [ebp + 0x18], eax
call fcn.00404c88
and dword [ebp + 0x60], 0xfffffff7
mov dword [ebp + 0x4c], 1
test byte [ebp + 0x78], 0x20
je 0x404e0f
push ebx
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x404e0f
mov eax, dword [ebp + 0x54]
or dword [ebp + 8], esi
lea edi, [ebp + 0x48]
mov dword [ebp + 0x1c], eax
call fcn.00404c88
and dword [ebp + 0x60], 0xfffffff7
mov dword [ebp + 0x4c], 1
test dword [ebp + 8], esi
je 0x404e3e
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp dword [ebp + 0x14], ebx
jne 0x404e26
push 0xfffffffffffffff6
call esi
mov dword [ebp + 0x14], eax
cmp dword [ebp + 0x18], ebx
jne 0x404e32
push 0xfffffffffffffff5
call esi
mov dword [ebp + 0x18], eax
cmp dword [ebp + 0x1c], ebx
jne 0x404e3e
push 0xfffffffffffffff4
call esi
mov dword [ebp + 0x1c], eax
mov edi, dword [ebp + 0x6c]
mov eax, 0x41001c
cmp edi, ebx
jne 0x404e4f
mov dword [ebp + 0x6c], eax
mov edi, eax
cmp dword [ebp + 0x70], ebx
jne 0x404e57
mov dword [ebp + 0x70], eax
push edi
call sub.MSVCRT.dll_wcslen
push dword [ebp + 0x70]
mov esi, eax
call sub.MSVCRT.dll_wcslen
pop ecx
pop ecx
add esi, eax
lea eax, [esi + esi + 8]
push eax
push ebx
push dword [0x4157cc]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp word [edi], 0x22
mov dword [ebp + 0x7c], eax
je 0x404ea9
mov esi, 0x410020
push esi
push eax
call sub.MSVCRT.dll_wcscpy
push edi
push dword [ebp + 0x7c]
call sub.MSVCRT.dll_wcscat
push esi
push dword [ebp + 0x7c]
call sub.MSVCRT.dll_wcscat
add esp, 0x18
jmp 0x404eb2
push edi
push eax
call sub.MSVCRT.dll_wcscpy
pop ecx
pop ecx
mov esi, dword [ebp + 0x70]
cmp word [esi], bx
je 0x404ed3
push section..rdata
push dword [ebp + 0x7c]
call sub.MSVCRT.dll_wcscat
push esi
push dword [ebp + 0x7c]
call sub.MSVCRT.dll_wcscat
add esp, 0x10
mov eax, dword [ebp + 0x74]
cmp eax, ebx
je 0x404ee2
cmp word [eax], bx
jne 0x404ee2
mov dword [ebp + 0x74], ebx
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x74]
push ebx
push dword [ebp + 0x60]
push dword [ebp + 0x4c]
push ebx
push ebx
push dword [ebp + 0x7c]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x404f96
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x5c], ebx
je 0x404f18
push dword [ebp + 0x5c]
call esi
cmp dword [ebp + 0x58], ebx
je 0x404f22
push dword [ebp + 0x58]
call esi
cmp dword [ebp + 0x54], ebx
je 0x404f2c
push dword [ebp + 0x54]
call esi
push dword [ebp + 0x24]
call esi
test byte [ebp + 0x78], 1
je 0x404f42
push 0xffffffffffffffff
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp + 0x3c], ebx
je 0x404f8c
mov edi, 0x415f80
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20
push 0x41585c
call fcn.0040df00
pop ecx
pop ecx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0x20]
mov dword [esi], eax
mov eax, dword [ebp + 0x28]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x44]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x50]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x48]
mov dword [esi + 0x10], eax
jmp 0x4050bc
push dword [ebp + 0x20]
call esi
jmp 0x4050cc
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x5c], ebx
je 0x404fa6
push dword [ebp + 0x5c]
call edi
cmp dword [ebp + 0x44], ebx
je 0x404fb0
push dword [ebp + 0x44]
call edi
cmp dword [ebp + 0x50], ebx
je 0x404fba
push dword [ebp + 0x50]
call edi
cmp dword [ebp + 0x58], ebx
je 0x404fc4
push dword [ebp + 0x58]
call edi
cmp dword [ebp + 0x54], ebx
je 0x404fce
push dword [ebp + 0x54]
call edi
cmp dword [ebp + 0x48], ebx
je 0x404fd8
push dword [ebp + 0x48]
call edi
test byte [ebp + 0x78], 0x78
jne 0x4050d3
cmp dword [ebp + 0x74], ebx
jne 0x40502c
mov esi, dword [ebp + 0x6c]
push esi
call sub.MSVCRT.dll_wcslen
lea esi, [esi + eax*2 - 2]
pop ecx
cmp esi, dword [ebp + 0x6c]
jbe 0x40502c
cmp word [esi], 0x5c
je 0x405008
sub esi, 2
cmp esi, dword [ebp + 0x6c]
ja 0x404ffa
cmp esi, dword [ebp + 0x6c]
jbe 0x40502c
push dword [ebp + 0x6c]
push dword [ebp + 0x7c]
call sub.MSVCRT.dll_wcscpy
sub esi, dword [ebp + 0x6c]
mov eax, dword [ebp + 0x7c]
pop ecx
sar esi, 1
pop ecx
xor ecx, ecx
mov word [eax + esi*2 + 2], cx
mov dword [ebp + 0x74], eax
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x60]
push ebx
push eax
call sub.MSVCRT.dll_memset
movzx eax, word [ebp + 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x74]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x6c]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x70]
mov dword [ebp - 0x4c], eax
add esp, 0xc
lea eax, [ebp - 0x60]
push eax
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], 0x540
mov dword [ebp - 0x54], ebx
call dword [sym.imp.SHELL32.DLL_ShellExecuteExW]
test eax, eax
je 0x4050d3
test byte [ebp + 0x78], 1
je 0x405082
push 0xffffffffffffffff
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp + 0x3c], ebx
je 0x4050c7
mov edi, 0x415f80
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20
push 0x41585c
call fcn.0040df00
pop ecx
pop ecx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x28]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
mov dword [esi + 0xc], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x10], ebx
mov eax, dword [ebp + 0x78]
mov dword [esi + 0x14], eax
mov dword [ebp + 0x40], esi
jmp 0x4050d3
push dword [ebp - 0x28]
call edi
mov dword [ebp + 0x40], 1
push dword [ebp + 0x7c]
push ebx
push dword [0x4157cc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp + 0x40]
pop edi
pop esi
pop ebx
add ebp, 0x64
leave
ret 0x14