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

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x188
xor edi, edi
mov dword [rax - 0x140], 0x18
mov ebp, 0x20
mov qword [rax - 0x138], rdi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x10], rdi
mov qword [rax + 8], rdi
mov r12, rcx
lea eax, [rbp - 0x1f]
mov r14, r8
mov rbx, rdx
lea esi, [rbp + 0x48]
lea rcx, [rsp + 0xa0]
mov r8, rsi
xor edx, edx
mov r13d, r9d
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x50], rdi
mov r15d, edi
mov dword [rsp + 0x98], eax
call sub.msvcrt.dll_memset
mov dword [rsp + 0xa0], esi
lea esi, [rbp - 0x1f]
mov dword [rsp + 0xdc], esi
test r13b, 2
je 0x140004fd7
mov word [rsp + 0xe0], di
lea ebp, [rdi + 0x28]
jmp 0x140004fdf
mov word [rsp + 0xe0], si
test r13b, 0x40
je 0x140005010
mov rax, qword [rsp + 0x1f0]
cmp rax, rdi
je 0x140005010
mov rcx, qword [rax + 0x18]
cmp rcx, rdi
je 0x140005010
mov dword [rsp + 0xdc], 0x101
mov qword [rsp + 0xf0], rcx
jmp 0x140005061
test r13b, 4
je 0x140005067
test r13b, 0x10
je 0x140005067
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x1e0]
lea rcx, [rsp + 0x58]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreatePipe]
cmp eax, edi
je 0x140005067
mov rax, qword [rsp + 0x58]
bts dword [rsp + 0xdc], 8
lea rcx, [rsp + 0x1e0]
mov qword [rsp + 0xf0], rax
call fcn.140004ed8
mov r15d, esi
and ebp, 0xfffffff7
mov eax, r13d
and eax, 4
mov dword [rsp + 0x1e8], eax
je 0x14000511c
test r13b, 8
je 0x1400050d1
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x1d0]
lea rcx, [rsp + 0x1d8]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreatePipe]
cmp eax, edi
je 0x1400050d1
mov rax, qword [rsp + 0x1d0]
bts dword [rsp + 0xdc], 8
lea rcx, [rsp + 0x1d8]
mov qword [rsp + 0xf8], rax
call fcn.140004ed8
and ebp, 0xfffffff7
mov r15d, esi
test r13b, 0x20
je 0x14000511c
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreatePipe]
cmp eax, edi
je 0x14000511c
mov rax, qword [rsp + 0x50]
bts dword [rsp + 0xdc], 8
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x100], rax
call fcn.140004ed8
and ebp, 0xfffffff7
mov r15d, esi
bt dword [rsp + 0xdc], 8
jae 0x14000517e
cmp qword [rsp + 0xf0], rdi
jne 0x140005144
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0xf0], rax
cmp qword [rsp + 0xf8], rdi
jne 0x140005161
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0xf8], rax
cmp qword [rsp + 0x100], rdi
jne 0x14000517e
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0x100], rax
cmp r12, rdi
lea rax, [0x14000c874]
mov rsi, rax
cmovne rsi, r12
mov r12, rax
cmp rbx, rdi
cmovne r12, rbx
mov rcx, rsi
mov qword [rsp + 0x68], r12
call sub.msvcrt.dll_strlen
mov rcx, r12
mov rbx, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [0x14000e5b8]
lea r8, [rbx + rax + 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp byte [rsi], 0x22
mov r12, rax
mov rcx, rax
je 0x1400051f8
lea rdx, [0x14000c8c0]
call sub.msvcrt.dll_strcpy
mov rdx, rsi
mov rcx, r12
call sub.msvcrt.dll_strcat
lea rdx, [0x14000c8c0]
mov rcx, r12
call sub.msvcrt.dll_strcat
jmp 0x140005200
mov rdx, rsi
call sub.msvcrt.dll_strcpy
mov rbx, qword [rsp + 0x68]
cmp byte [rbx], dil
je 0x140005224
lea rdx, [0x14000c8bc]
mov rcx, r12
call sub.msvcrt.dll_strcat
mov rdx, rbx
mov rcx, r12
call sub.msvcrt.dll_strcat
cmp r14, rdi
je 0x140005234
mov al, byte [r14]
neg al
sbb rcx, rcx
and r14, rcx
lea rax, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xa0]
mov rdx, r12
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], rdi
xor ecx, ecx
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
mov rcx, qword [rsp + 0x1d0]
cmp eax, edi
je 0x140005342
cmp rcx, rdi
je 0x14000528a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
cmp rcx, rdi
je 0x14000529a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
cmp rcx, rdi
je 0x1400052aa
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13b, 1
je 0x1400052c9
mov rcx, qword [rsp + 0x70]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rsp + 0x1e8], edi
je 0x140005338
lea rcx, [0x14000eb90]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [0x14000e780]
mov edx, 0x50
call fcn.1400097c8
lea rcx, [0x14000eb90]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r11, qword [rsp + 0x70]
mov qword [rdi], r11
mov eax, dword [rsp + 0x80]
mov dword [rdi + 8], eax
mov rax, qword [rsp + 0x1d8]
mov qword [rdi + 0x18], rax
mov rax, qword [rsp + 0x1e0]
mov qword [rdi + 0x10], rax
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x20], rax
jmp 0x1400054e7
mov rcx, qword [rsp + 0x70]
jmp 0x1400054dc
cmp rcx, rdi
je 0x14000534d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1d8]
cmp rcx, rdi
je 0x140005360
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1e0]
cmp rcx, rdi
je 0x140005373
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
cmp rcx, rdi
je 0x140005383
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
cmp rcx, rdi
je 0x140005393
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
cmp rcx, rdi
je 0x1400053a3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13b, 0x78
jne 0x1400054e7
cmp r14, rdi
jne 0x1400053ec
mov rcx, rsi
call sub.msvcrt.dll_strlen
lea rbx, [rax + rsi - 1]
cmp rbx, rsi
jbe 0x1400053ec
cmp byte [rbx], 0x5c
je 0x1400053d1
dec rbx
cmp rbx, rsi
ja 0x1400053c4
cmp rbx, rsi
jbe 0x1400053ec
mov rdx, rsi
mov rcx, r12
call sub.msvcrt.dll_strcpy
sub rbx, rsi
mov r14, r12
mov byte [rbx + r12 + 1], dil
mov ebx, 0x70
lea rcx, [rsp + 0x110]
xor edx, edx
mov r8, rbx
call sub.msvcrt.dll_memset
movzx eax, word [rsp + 0xe0]
lea rcx, [rsp + 0x110]
mov dword [rsp + 0x140], eax
lea rax, [0x14000c874]
mov dword [rsp + 0x110], ebx
mov qword [rsp + 0x120], rax
mov rax, qword [rsp + 0x68]
mov dword [rsp + 0x114], 0x40
mov qword [rsp + 0x138], r14
mov qword [rsp + 0x128], rsi
mov qword [rsp + 0x130], rax
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
cmp eax, edi
je 0x1400054e7
test r13b, 1
je 0x14000547d
mov rcx, qword [rsp + 0x178]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rsp + 0x1e8], edi
je 0x1400054d4
lea rcx, [0x14000eb90]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [0x14000e780]
mov edx, 0x50
call fcn.1400097c8
lea rcx, [0x14000eb90]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r11, qword [rsp + 0x178]
or dword [rbx + 8], 0xffffffff
mov qword [rbx + 0x18], rdi
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x20], rdi
mov qword [rbx], r11
mov rdi, rbx
jmp 0x1400054e7
mov rcx, qword [rsp + 0x178]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 1
mov rcx, qword [0x14000e5b8]
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, rdi
add rsp, 0x188
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret