Function at 0x402962
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create process suspended
Create two anonymous pipes
Execute shell command and capture output

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0
mov ebx, 0x8d4
call fcn.0040e6c0
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 3
je 0x4029a2
mov eax, 0
jmp 0x40318e
cmp dword [0x420c43], 0
je 0x4029c5
mov ebx, dword [0x420c47]
add ebx, 8
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebx]
jmp 0x40318e
mov ebx, dword [0x420c4b]
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0xc
mov ebx, dword [0x420c4b]
add ebx, 4
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0
mov ebx, dword [0x420c4b]
add ebx, 8
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0xffffffff
mov dword [ebp - 0xc], esp
push 0
push dword [0x420c4b]
push 0x420c57
push 0x420c53
call dword [sym.imp.KERNEL32.dll_CreatePipe]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x402a35
push 6
call fcn.0040e01e
add esp, 4
mov dword [0x420c4f], eax
cmp dword [0x420c4f], 0
jne 0x402a51
mov eax, 0
jmp 0x40318e
mov ebx, dword [0x420c5b]
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0xc
mov ebx, dword [0x420c5b]
add ebx, 4
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0
mov ebx, dword [0x420c5b]
add ebx, 8
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0xffffffff
mov dword [ebp - 0xc], esp
push 0
push dword [0x420c5b]
push 0x420c67
push 0x420c63
call dword [sym.imp.KERNEL32.dll_CreatePipe]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x402ac1
push 6
call fcn.0040e01e
add esp, 4
mov dword [0x420c5f], eax
mov dword [ebp - 0xc], esp
mov eax, dword [0x420c6b]
push eax
push 0x44
call fcn.0040e018
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
call dword [0x420cd3]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x402bb8
push 6
call fcn.0040e01e
add esp, 4
push eax
mov ebx, dword [ebp - 0x10]
push ebx
mov edi, dword [ebp - 0x14]
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
call fcn.0040e012
add esp, 4
pop eax
mov ebx, dword [0x420c6b]
add ebx, 0x2c
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebx], 0x101
mov ebx, dword [0x420c6b]
add ebx, 0x3c
mov dword [ebp - 0xc], ebx
mov eax, dword [0x420c53]
mov ebx, dword [ebp - 0xc]
mov dword [ebx], eax
mov ebx, dword [0x420c6b]
add ebx, 0x40
mov dword [ebp - 0xc], ebx
mov eax, dword [0x420c67]
mov ebx, dword [ebp - 0xc]
mov dword [ebx], eax
mov ebx, dword [0x420c6b]
add ebx, 0x44
mov dword [ebp - 0xc], ebx
mov eax, dword [0x420c67]
mov ebx, dword [ebp - 0xc]
mov dword [ebx], eax
mov ebx, dword [0x420c6b]
add ebx, 0x30
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov word [ebx], 0
mov dword [ebp - 0xc], 0
push 0
push dword [ebp - 0xc]
push 1
push 0x25
call fcn.004031ae
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x402d19
push ebx
call fcn.0040e012
add esp, 4
pop eax
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
jne 0x402d45
mov eax, str.cmd.exe
push eax
mov ebx, dword [ebp + 8]
mov ebx, dword [ebx]
test ebx, ebx
je 0x402d3f
push ebx
call fcn.0040e012
add esp, 4
pop eax
mov ebx, dword [ebp + 8]
mov dword [ebx], eax
cmp dword [ebp + 0x14], 0
mov eax, 0
sete al
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 1
jne 0x402f4b
mov dword [ebp - 0xc], esp
push dword [0x420c47]
mov eax, dword [0x420c6b]
push eax
push 0x44
call fcn.0040e018
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push dword [ebp - 4]
push 0
push 0
push 0xffffffff
push 0
push 0
mov ebx, dword [ebp + 8]
push dword [ebx]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x402e7c
push 6
call fcn.0040e01e
add esp, 4
push eax
mov ebx, dword [ebp - 0x10]
push ebx
mov edi, dword [ebp - 0x14]
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
call fcn.0040e012
add esp, 4
pop eax
mov dword [ebp - 8], eax
jmp 0x403135
mov dword [ebp - 0xc], esp
push dword [0x420c47]
mov eax, dword [0x420c6b]
push eax
push 0x44
call fcn.0040e018
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov ebx, dword [ebp + 0x10]
push dword [ebx]
push 0
push 0
push 0xffffffff
push 0
push 0
mov ebx, dword [ebp + 8]
push dword [ebx]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x40306b
push 6
call fcn.0040e01e
add esp, 4
push eax
mov ebx, dword [ebp - 0x10]
push ebx
mov edi, dword [ebp - 0x14]
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
call fcn.0040e012
add esp, 4
pop eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x403149
mov eax, 0
jmp 0x40318e
mov dword [0x420c43], 1
call fcn.0040347b
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
mov ebx, dword [0x420c6f]
test ebx, ebx
je 0x403172
push ebx
call fcn.0040e012
add esp, 4
pop eax
mov dword [0x420c6f], eax
mov ebx, dword [0x420c47]
add ebx, 8
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebx]
jmp 0x40318e
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40319f
push ebx
call fcn.0040e012
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x10