Function at 0x40b401
Capabilities:
Create pipe
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov edi, 0x20
and dword [ebp - 0x58], 0
and dword [ebp - 0x7c], 0
and dword [ebp - 0x80], 0
and dword [ebp - 0x5c], 0
and dword [ebp - 0x84], 0
and dword [ebp - 0x60], 0
and dword [ebp - 0x68], 0
and dword [ebp - 0x64], 0
mov dword [ebp - 0x54], 0xc
and dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 1
push 0x44
lea eax, [ebp - 0x44]
push eax
call fcn.0041788c
mov dword [ebp - 0x44], 0x44
mov dword [ebp - 0x18], 1
test si, 2
je 0x40b47a
mov word [ebp - 0x14], 0
mov edi, 0x28
jmp 0x40b480
mov word [ebp - 0x14], 1
test si, 0x40
je 0x40b4ac
mov eax, dword [ebp + 0x18]
or eax, eax
je 0x40b4ac
cmp dword [eax + 0xc], 0
je 0x40b4ac
or word [ebp - 0x18], 0x100
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
and edi, 0xfffffff7
mov dword [ebp - 0x64], 1
jmp 0x40b4f1
test si, 4
je 0x40b4f1
test si, 0x10
je 0x40b4f1
push 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x58]
push eax
call sub.KERNEL32.dll_CreatePipe
or eax, eax
je 0x40b4f1
or word [ebp - 0x18], 0x100
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0040b3c0
pop ecx
and edi, 0xfffffff7
mov dword [ebp - 0x64], 1
test si, 4
je 0x40b57e
test si, 8
je 0x40b53a
push 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x80]
push eax
call sub.KERNEL32.dll_CreatePipe
or eax, eax
je 0x40b53a
or word [ebp - 0x18], 0x100
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x80]
push eax
call fcn.0040b3c0
pop ecx
and edi, 0xfffffff7
mov dword [ebp - 0x64], 1
test si, 0x20
je 0x40b57e
push 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x84]
push eax
call sub.KERNEL32.dll_CreatePipe
or eax, eax
je 0x40b57e
or word [ebp - 0x18], 0x100
mov eax, dword [ebp - 0x60]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x84]
push eax
call fcn.0040b3c0
pop ecx
and edi, 0xfffffff7
mov dword [ebp - 0x64], 1
test word [ebp - 0x18], 0x100
je 0x40b5b6
cmp dword [ebp - 0xc], 0
jne 0x40b596
push 0xfffffffffffffff6
call sub.KERNEL32.dll_GetStdHandle
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], 0
jne 0x40b5a6
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
jne 0x40b5b6
push 0xfffffffffffffff4
call sub.KERNEL32.dll_GetStdHandle
mov dword [ebp - 4], eax
or ebx, ebx
jne 0x40b5c0
lea ebx, [0x42ff19]
cmp dword [ebp + 0xc], 0
jne 0x40b5cf
lea eax, [0x42ff19]
mov dword [ebp + 0xc], eax
push ebx
call sub.MSVCRT.dll_strlen
mov dword [ebp - 0xc8], eax
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strlen
add esp, 8
mov edx, dword [ebp - 0xc8]
lea edx, [edx + eax + 4]
push edx
push 0
push dword [0x432840]
call sub.KERNEL32.dll_HeapAlloc
mov dword [ebp - 0x48], eax
cmp byte [ebx], 0x22
je 0x40b62c
push 0x42ff17
push eax
call sub.MSVCRT.dll_strcpy
push ebx
push dword [ebp - 0x48]
call sub.MSVCRT.dll_strcat
push 0x42ff17
push dword [ebp - 0x48]
call sub.MSVCRT.dll_strcat
add esp, 0x18
jmp 0x40b638
push ebx
push dword [ebp - 0x48]
call sub.MSVCRT.dll_strcpy
add esp, 8
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
je 0x40b65b
push 0x42ff15
push dword [ebp - 0x48]
call sub.MSVCRT.dll_strcat
push dword [ebp + 0xc]
push dword [ebp - 0x48]
call sub.MSVCRT.dll_strcat
add esp, 0x10
mov eax, dword [ebp + 0x10]
or eax, eax
je 0x40b66b
cmp byte [eax], 0
jne 0x40b66b
and dword [ebp + 0x10], 0
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp + 0x10]
push 0
push edi
push dword [ebp - 0x64]
push 0
push 0
push dword [ebp - 0x48]
push 0
call sub.KERNEL32.dll_CreateProcessA
or eax, eax
je 0x40b747
cmp dword [ebp - 0x5c], 0
je 0x40b6a0
push dword [ebp - 0x5c]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x58], 0
je 0x40b6ae
push dword [ebp - 0x58]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x60], 0
je 0x40b6bc
push dword [ebp - 0x60]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 0x74]
call sub.KERNEL32.dll_CloseHandle
test si, 1
je 0x40b6d5
push 0xffffffffffffffff
push dword [ebp - 0x78]
call sub.KERNEL32.dll_WaitForSingleObject
test si, 4
je 0x40b733
push 0x433244
call sub.KERNEL32.dll_EnterCriticalSection
push 0x28
push 0x42ff00
call fcn.004172c0
add esp, 8
mov dword [ebp - 0xc4], eax
push 0x433244
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [ebp - 0xc4]
mov edx, dword [ebp - 0x78]
mov dword [eax], edx
mov edx, dword [ebp - 0x70]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x80]
mov dword [eax + 0xc], edx
mov edx, dword [ebp - 0x7c]
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x84]
mov dword [eax + 0x10], edx
mov dword [ebp - 0x68], eax
jmp 0x40b8b3
push dword [ebp - 0x78]
call sub.KERNEL32.dll_CloseHandle
mov dword [ebp - 0x68], 1
jmp 0x40b8b3
cmp dword [ebp - 0x5c], 0
je 0x40b755
push dword [ebp - 0x5c]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x80], 0
je 0x40b763
push dword [ebp - 0x80]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x7c], 0
je 0x40b771
push dword [ebp - 0x7c]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x58], 0
je 0x40b77f
push dword [ebp - 0x58]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x60], 0
je 0x40b78d
push dword [ebp - 0x60]
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x84], 0
je 0x40b7a1
push dword [ebp - 0x84]
call sub.KERNEL32.dll_CloseHandle
test si, 0x78
jne 0x40b8b3
cmp dword [ebp + 0x10], 0
jne 0x40b7e8
push ebx
call sub.MSVCRT.dll_strlen
pop ecx
lea edi, [eax + ebx - 1]
jmp 0x40b7c0
dec edi
cmp edi, ebx
jbe 0x40b7c9
cmp byte [edi], 0x5c
jne 0x40b7bf
cmp edi, ebx
jbe 0x40b7e8
push ebx
push dword [ebp - 0x48]
call sub.MSVCRT.dll_strcpy
add esp, 8
mov eax, edi
sub eax, ebx
mov edx, dword [ebp - 0x48]
mov byte [eax + edx + 1], 0
mov dword [ebp + 0x10], edx
mov dword [ebp - 0xc0], 0x3c
mov dword [ebp - 0xbc], 0x40
movzx eax, word [ebp - 0x14]
mov dword [ebp - 0xa4], eax
lea eax, str.Open
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xb0], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xc0]
push eax
call sub.SHELL32.DLL_ShellExecuteExA
or eax, eax
je 0x40b8b3
test si, 1
je 0x40b84e
push 0xffffffffffffffff
push dword [ebp - 0x88]
call sub.KERNEL32.dll_WaitForSingleObject
test si, 4
je 0x40b8a1
push 0x433244
call sub.KERNEL32.dll_EnterCriticalSection
push 0x28
push 0x42ff00
call fcn.004172c0
add esp, 8
mov dword [ebp - 0xc4], eax
push 0x433244
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [ebp - 0xc4]
mov edx, dword [ebp - 0x88]
mov dword [eax], edx
or dword [eax + 4], 0xffffffff
and dword [eax + 0xc], 0
and dword [eax + 8], 0
and dword [eax + 0x10], 0
mov dword [ebp - 0x68], eax
jmp 0x40b8b3
push dword [ebp - 0x88]
call sub.KERNEL32.dll_CloseHandle
mov dword [ebp - 0x68], 1
push dword [ebp - 0x48]
push 0
push dword [0x432840]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp - 0x68]
pop edi
pop esi
pop ebx
leave
ret 0x14