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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x418]
sub rsp, 0x518
mov rax, qword [0x18018f008]
xor rax, rsp
mov qword [rbp + 0x400], rax
mov rax, qword [rbp + 0x480]
mov r14, r9
mov rbx, qword [rbp + 0x470]
mov rdi, r8
mov r15, qword [rbp + 0x478]
mov rsi, rcx
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], r8
mov dword [rsp + 0x54], edx
call fcn.18013b7a0
mov rdx, qword [rdi]
lea r8, [rbp + 0xf0]
mov rcx, rsi
call fcn.18013c860
mov dword [rsp + 0x50], eax
test eax, eax
jne 0x18013c30e
mov eax, 1
jmp 0x18013c7cf
lea rax, [rbp + 0x20]
mov qword [rsp + 0x558], r12
mov qword [rbp + 0x10], rax
mov edi, 1
mov qword [rsp + 0x510], r13
mov dword [rbp + 0x18], 0
mov dword [rbp + 0x1c], 0xc8
mov byte [rbp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor edx, edx
lea r8d, [rdi + 0x67]
lea rcx, [rbp - 0x60]
mov r13, rax
call sub.VCRUNTIME140.dll_memset
movdqa xmm0, xmmword [0x180173cd0]
mov r12, 0xffffffffffffffff
movdqa xmmword [rbp - 0x10], xmm0
mov rdx, r12
mov dword [rbp - 0x60], 0x68
mov dword [rbp - 0x24], 0x100
mov qword [rbp], r12
mov dword [rsp + 0x70], 0x18
mov qword [rsp + 0x78], 0
mov dword [rbp - 0x80], edi
test r14, r14
je 0x18013c3a1
cmp dword [r14], 3
jne 0x18013c3a1
mov rdx, qword [r14 + 8]
mov r14, r12
test rbx, rbx
je 0x18013c3b2
cmp dword [rbx], 3
jne 0x18013c3b2
mov r14, qword [rbx + 8]
test r15, r15
je 0x18013c3c1
cmp dword [r15], 3
jne 0x18013c3c1
mov r12, qword [r15 + 8]
cmp rdx, 0xffffffffffffffff
jne 0x18013c42e
xor r9d, r9d
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x18013c3ed
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r15d, r15d
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x18013c454
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov rcx, rsi
call sym.tcl86t.dll_hcl_PosixError
lea rcx, str.couldnt_duplicate_input_handle:__s
mov rdx, rax
call sym.tcl86t.dll_hcl_ObjPrintf
mov rdx, rax
mov rcx, rsi
call sym.tcl86t.dll_hcl_SetObjResult
xor r12d, r12d
jmp 0x18013c764
mov dword [rsp + 0x30], 2
lea r9, [rbp - 0x10]
xor r15d, r15d
mov dword [rsp + 0x28], edi
mov r8, r13
mov dword [rsp + 0x20], r15d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
jmp 0x18013c3f0
cmp r14, 0xffffffffffffffff
jne 0x18013c48f
mov qword [rsp + 0x30], r15
lea r9, [rsp + 0x70]
mov dword [rsp + 0x28], 0x80
lea rcx, str.NUL:
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp - 8], rax
jmp 0x18013c4b7
mov dword [rsp + 0x30], 2
lea r9, [rbp - 8]
mov dword [rsp + 0x28], edi
mov r8, r13
mov rdx, r14
mov dword [rsp + 0x20], r15d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rax, qword [rbp - 8]
cmp rax, 0xffffffffffffffff
jne 0x18013c4de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov rcx, rsi
call sym.tcl86t.dll_hcl_PosixError
lea rcx, str.couldnt_duplicate_output_handle:__s
jmp 0x18013c413
cmp r12, 0xffffffffffffffff
jne 0x18013c519
mov qword [rsp + 0x30], r15
lea r9, [rsp + 0x70]
mov dword [rsp + 0x28], 0x80
lea rcx, str.NUL:
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp], rax
jmp 0x18013c541
mov dword [rsp + 0x30], 2
lea r9, [rbp]
mov dword [rsp + 0x28], edi
mov r8, r13
mov rdx, r12
mov dword [rsp + 0x20], r15d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rax, qword [rbp]
cmp rax, 0xffffffffffffffff
jne 0x18013c568
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov rcx, rsi
call sym.tcl86t.dll_hcl_PosixError
lea rcx, str.couldnt_duplicate_error_handle:__s
jmp 0x18013c413
cmp dword [0x18018ffac], 2
jne 0x18013c653
call fcn.18013c800
mov r14d, dword [rsp + 0x50]
test eax, eax
je 0x18013c61e
mov ebx, r15d
mov r15, qword [rsp + 0x60]
lea r9, [rbp + 0x10]
mov edx, dword [rsp + 0x54]
lea rcx, [rbp + 0xf0]
mov r8, r15
call fcn.18013cf50
mov rdx, qword [rbp + 0x10]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x48], rax
xor r12d, r12d
lea rax, [rbp - 0x60]
xor r9d, r9d
mov qword [rsp + 0x40], rax
xor r8d, r8d
mov qword [rsp + 0x38], r12
xor ecx, ecx
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x18013c71b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov rcx, rsi
call sym.tcl86t.dll_hcl_PosixError
mov rdx, qword [r15]
lea rcx, str.couldnt_execute___s_:__s
mov r8, rax
call sym.tcl86t.dll_hcl_ObjPrintf
mov rdx, rax
mov rcx, rsi
call sym.tcl86t.dll_hcl_SetObjResult
jmp 0x18013c764
cmp r14d, edi
jne 0x18013c649
or dword [rbp - 0x24], edi
lea rdx, str.cmd.exe__c
mov ebx, reloc.WS2_32.dll_recv
mov word [rbp - 0x20], r15w
lea rcx, [rbp + 0x10]
lea r8d, [rbx - 6]
call sym.tcl86t.dll_hcl_DStringAppend
jmp 0x18013c58a
mov ebx, 8
jmp 0x18013c58a
call fcn.18013c800
mov r14d, dword [rsp + 0x50]
test eax, eax
mov ebx, 8
cmovne ebx, r15d
cmp r14d, edi
jne 0x18013c58a
call fcn.180106220
mov ecx, reloc.WS2_32.dll_getservbyname
mov rbx, rax
mov dword [rax], r15d
call sym.tcl86t.dll_hclpAlloc
mov rcx, rax
test rax, rax
je 0x18013c7ee
mov qword [rbx + 8], rax
mov rdx, rbx
movups xmm0, xmmword [str.DOS_application_process_not_supported_on_this_platform]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x180173340]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [0x180173350]
movups xmmword [rax + 0x20], xmm0
mov eax, dword [0x180173360]
mov dword [rcx + 0x30], eax
movzx eax, word [0x180173364]
mov word [rcx + 0x34], ax
mov rcx, rsi
mov rax, qword [rbx + 8]
mov byte [rax + 0x36], 0
mov dword [rbx + 0x10], getservbyname
mov qword [rbx + 0x18], r15
call sym.tcl86t.dll_hcl_SetObjResult
lea rax, str.DOS_APP
mov qword [rsp + 0x28], r15
lea r9, str.EXEC
mov qword [rsp + 0x20], rax
lea r8, str.OPERATION
mov rcx, rsi
lea rdx, [0x180160820]
call sym.tcl86t.dll_hcl_SetErrorCode
xor r12d, r12d
jmp 0x18013c764
cmp r14d, edi
jne 0x18013c72f
mov rcx, qword [rbp - 0x78]
mov edx, 0x32
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbp - 0x78]
mov edx, 0x1388
call qword [sym.imp.USER32.dll_WaitForInputIdle]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x78]
mov rax, qword [rsp + 0x68]
mov qword [rax], rcx
test rcx, rcx
je 0x18013c761
mov edx, dword [rbp - 0x68]
call sym.tcl86t.dll_hclWinAddProcess
mov edi, r12d
mov rcx, qword [rbp + 0x10]
lea rax, [rbp + 0x20]
cmp rcx, rax
je 0x18013c776
call sym.tcl86t.dll_hclpFree
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x20]
mov qword [rbp + 0x10], rax
mov dword [rbp + 0x18], r12d
mov dword [rbp + 0x1c], 0xc8
mov byte [rbp + 0x20], 0
cmp rcx, 0xffffffffffffffff
je 0x18013c79d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 8]
cmp rcx, 0xffffffffffffffff
je 0x18013c7ad
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp]
cmp rcx, 0xffffffffffffffff
je 0x18013c7bd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x558]
mov eax, edi
mov r13, qword [rsp + 0x510]
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.180146240
add rsp, 0x518
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov edx, reloc.WS2_32.dll_getservbyname
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3