Function at 0x1000ca70
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
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x10015ceb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x16c
mov eax, dword [esp + 0x17c]
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push eax
mov dword [esp + 0x34], ebp
call fcn.10009f80
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x28], ecx
xor eax, eax
mov dword [esp + 0x2c], ecx
mov ecx, 0x10
lea edi, [esp + 0x38]
mov dword [esp + 0x34], edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x18], eax
mov ecx, 0x40
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x79]
mov dword [esp + 0x20], eax
mov byte [esp + 0x78], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [esp + 0x24]
lea ebx, [ebp + 0x1c]
push edx
lea edi, [ebp + 0x10]
lea esi, [ebp + 0x18]
push ecx
push ebx
push edi
mov dword [esp + 0x194], edx
mov dword [ebp], 0x1001662c
mov dword [esp + 0x24], edx
mov dword [edi], edx
mov dword [ebp + 0x14], edx
mov dword [esi], edx
mov dword [ebx], edx
mov dword [esp + 0x34], 0xc
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x1000cb48
mov edi, dword [edi]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x1000cb36
push edi
call esi
mov ebx, dword [ebx]
test ebx, ebx
je 0x1000ccad
push ebx
call esi
jmp 0x1000ccad
lea edx, [esp + 0x24]
push 0
lea edi, [ebp + 0x14]
push edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x1000cb7f
mov edi, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x1000cb6d
push edi
call ebx
mov esi, dword [esi]
test esi, esi
je 0x1000ccad
push esi
call ebx
jmp 0x1000ccad
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], eax
push ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [ebx]
mov edx, dword [esi]
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], eax
lea eax, [esp + 0x78]
push 0x104
push eax
mov dword [esp + 0x3c], 0x44
mov word [esp + 0x6c], 0
mov dword [esp + 0x68], 0x101
mov dword [esp + 0x74], edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.cmd.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x78]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x38]
lea edx, [esp + 0x7c]
push ecx
push 0
push 0
push 0x20
push 1
push 0
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1000cc52
mov eax, dword [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [ebp + 0x14]
push ecx
call esi
mov edx, dword [ebp + 0x18]
push edx
call esi
mov eax, dword [ebx]
push eax
call esi
jmp 0x1000ccad
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x13]
mov dword [ebp + 0x20], ecx
push 1
push eax
mov ecx, ebp
mov dword [ebp + 0x24], edx
mov byte [esp + 0x1b], 0x80
call fcn.1000a000
mov ecx, ebp
call fcn.1000a070
push 0
push 0
push 0
push ebp
push 0x1000cdf0
push 0
push 0
call fcn.1000ea90
push 0
push 0
push 0
push ebp
push 0x1000ceb0
push 0
push 0
mov dword [ebp + 0x28], eax
call fcn.1000ea90
add esp, 0x38
mov dword [ebp + 0x2c], eax
mov ecx, dword [esp + 0x17c]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x178
ret 4