Function at 0x140021ae0
Capabilities:
Create process on windows

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
sub rsp, 0x280
mov qword [rsp + 0xc8], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rsi, r9
movzx r12d, r8b
mov rbp, rdx
mov rdi, rcx
xor r13d, r13d
mov dword [rsp + 0x2a0], r13d
cmp byte [rcx + 0x17], r13b
jne 0x140022217
mov byte [rcx + 0x17], 1
mov dword [rax - 0x1c8], 0x68
xor edx, edx
lea r8d, [r13 + 0x60]
lea rcx, [rax - 0x1c0]
call fcn.140075c60
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0x90], r13
test rsi, rsi
je 0x140021d3d
cmp byte [rdi + 0x16], r13b
je 0x140021d3d
mov edx, 1
mov r8d, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x140021c20
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rax, [0x1400b59c8]
mov qword [rsp + 0x140], rax
mov byte [rsp + 0x148], r13b
mov byte [rsp + 0x248], r13b
or r9d, 0xffffffff
lea r8, str.Set_childComms_inheritable
mov edx, 0x100
lea rcx, [rsp + 0x148]
call fcn.14001e6f0
lea r11, [0x1400b5a30]
mov qword [rsp + 0x140], r11
mov byte [rsp + 0x248], r13b
or r9d, 0xffffffff
lea r8, str.System
lea edx, [r13 + 0x20]
lea rcx, [rsp + 0x248]
call fcn.14001e6f0
mov edx, ebx
lea rcx, [rsp + 0x140]
call fcn.140020200
lea rdx, [0x1400e07e8]
lea rcx, [rsp + 0x140]
call fcn.140073110
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], r13d
lea r9, [rsp + 0x90]
mov r8, rbx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x140021cfe
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rax, [0x1400b59c8]
mov qword [rsp + 0x140], rax
mov byte [rsp + 0x148], 0
mov byte [rsp + 0x248], 0
or r9d, 0xffffffff
lea r8, str.Duplicate_childComms
mov edx, 0x100
lea rcx, [rsp + 0x148]
call fcn.14001e6f0
lea r11, [0x1400b5a30]
mov qword [rsp + 0x140], r11
mov byte [rsp + 0x248], 0
or r9d, 0xffffffff
lea r8, str.System
lea edx, [r9 + 0x21]
lea rcx, [rsp + 0x248]
call fcn.14001e6f0
mov edx, ebx
lea rcx, [rsp + 0x140]
call fcn.140020200
lea rdx, [0x1400e07e8]
lea rcx, [rsp + 0x140]
call fcn.140073110
int3
mov qword [rsp + 0x120], rsi
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x128], rax
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rsp + 0x130], rax
mov eax, dword [rsp + 0x10c]
bts eax, 8
mov dword [rsp + 0x10c], eax
jmp 0x140021d44
mov eax, dword [rsp + 0x10c]
movzx ecx, word [rdi + 0x14]
cmp cx, 0xa
je 0x140021d60
mov word [rsp + 0x110], cx
or eax, 1
mov dword [rsp + 0x10c], eax
mov rdx, qword [rdi]
test rdx, rdx
je 0x1400221ed
cmp qword [rdi + 8], 0
je 0x1400221ed
mov qword [rsp + 0x98], r13
mov dword [rsp + 0xa0], r13d
lea rcx, [rsp + 0x98]
call fcn.140017660
mov r8, qword [rdi + 8]
lea rdx, [0x1400b6864]
lea rcx, [rsp + 0x98]
call fcn.140023e30
mov ebx, 0x8000000
mov eax, 0x10
test r12b, r12b
cmovne ebx, eax
cmp rbp, 0xffffffffffffffff
je 0x140021ff0
mov qword [rsp + 0x2a0], r13
mov eax, dword [0x1400e5f38]
test al, 1
jne 0x140021e11
or eax, 1
mov dword [0x1400e5f38], eax
xor r9d, r9d
lea r8, str.CreateEnvironmentBlock
lea rdx, str.userenv
lea rcx, [0x1400e5f28]
call fcn.14004b920
lea rcx, [0x1400b4430]
call fcn.140075530
nop
mov eax, dword [0x1400e5f38]
test al, 2
jne 0x140021e48
or eax, 2
mov dword [0x1400e5f38], eax
xor r9d, r9d
lea r8, str.DestroyEnvironmentBlock
lea rdx, str.userenv
lea rcx, [0x1400e5f18]
call fcn.14004b920
lea rcx, [0x1400b4420]
call fcn.140075530
nop
mov rax, qword [0x1400e5f28]
test rax, rax
je 0x140021e8e
cmp qword [0x1400e5f18], 0
je 0x140021e8e
xor r8d, r8d
mov rdx, rbp
lea rcx, [rsp + 0x2a0]
call rax
test eax, eax
jne 0x140021e8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CreateEnvironmentBlock
lea rcx, [0x1400e5f40]
call fcn.140021100
cmp qword [rsp + 0x2a0], 0
je 0x140021e9d
bts ebx, 0xa
mov dword [rsp + 0x78], r13d
mov qword [rsp + 0x80], r13
mov byte [rsp + 0x88], 0
mov dword [rsp + 0x20], r13d
or r9d, 0xffffffff
mov r8d, 0xfde9
mov rdx, qword [rsp + 0x98]
lea rcx, [rsp + 0x78]
call fcn.140049000
nop
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], r13
mov byte [rsp + 0x70], 0
mov dword [rsp + 0x20], r13d
or r9d, 0xffffffff
mov r8d, 0xfde9
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
call fcn.140049000
nop
movzx ecx, byte [rdi + 0x16]
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r13
mov rax, qword [rsp + 0x2a0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x68]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebp, eax
cmp byte [rsp + 0x70], 0
je 0x140021f7d
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140021f82
movsxd rdx, dword [rsp + 0x60]
add rdx, rdx
call fcn.14001e970
mov rcx, qword [rsp + 0x68]
jmp 0x140021f82
mov rcx, qword [rsp + 0x68]
call fcn.140073030
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], r13
cmp byte [rsp + 0x88], 0
je 0x140021fbf
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x140021fc7
movsxd rdx, dword [rsp + 0x78]
add rdx, rdx
call fcn.14001e970
mov rcx, qword [rsp + 0x80]
jmp 0x140021fc7
mov rcx, qword [rsp + 0x80]
call fcn.140073030
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x2a0]
test rcx, rcx
je 0x14002211a
call qword [0x1400e5f18]
jmp 0x14002211a
mov dword [rsp + 0x78], r13d
mov qword [rsp + 0x80], r13
mov byte [rsp + 0x88], 0
mov dword [rsp + 0x20], r13d
or r9d, 0xffffffff
mov r8d, 0xfde9
mov rdx, qword [rsp + 0x98]
lea rcx, [rsp + 0x78]
call fcn.140049000
nop
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], r13
mov byte [rsp + 0x70], 0
mov dword [rsp + 0x20], r13d
or r9d, 0xffffffff
mov r8d, 0xfde9
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
call fcn.140049000
nop
movzx eax, byte [rdi + 0x16]
lea rcx, [rsp + 0xa8]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0xd0]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebp, eax
cmp byte [rsp + 0x70], 0
je 0x1400220c3
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400220c8
movsxd rdx, dword [rsp + 0x60]
add rdx, rdx
call fcn.14001e970
mov rcx, qword [rsp + 0x68]
jmp 0x1400220c8
mov rcx, qword [rsp + 0x68]
call fcn.140073030
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], r13
cmp byte [rsp + 0x88], 0
je 0x140022105
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x14002210d
movsxd rdx, dword [rsp + 0x78]
add rdx, rdx
call fcn.14001e970
mov rcx, qword [rsp + 0x80]
jmp 0x14002210d
mov rcx, qword [rsp + 0x80]
call fcn.140073030
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebp, ebp
jne 0x140022165
mov r8, qword [rsp + 0x98]
lea rdx, str.Unable_to_launch_process___s_
lea rcx, [0x1400e5f40]
call fcn.140021100
mov r8d, ebx
lea rdx, str.Unable_to_launch_process
lea rcx, [rsp + 0x140]
call fcn.14001b7b0
lea rdx, [0x1400e08b0]
lea rcx, [rsp + 0x140]
call fcn.140073110
int3
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0xa8]
xor r9d, r9d
or r8d, 0xffffffff
xor edx, edx
lea rcx, [rdi + 0x18]
call fcn.14004c150
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x14002219c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x18], rbp
cmp dword [rdi + 0x10], 2
jne 0x1400221b4
mov edx, 2
mov rcx, rdi
call fcn.140021420
nop
mov rcx, qword [rsp + 0x98]
call fcn.140073030
nop
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x1400221d5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x90], r13
test rsi, rsi
je 0x140022241
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140022241
mov r9d, 0x5e
lea r8, str.....lib1oswinLaunchProcess.cxx
lea rdx, str.exePath__otherArgs
lea rcx, [rsp + 0x140]
call fcn.140022960
mov rcx, rax
call fcn.140022860
nop
mov r9d, 0x43
lea r8, str.....lib1oswinLaunchProcess.cxx
lea rdx, str._used
lea rcx, [rsp + 0x140]
call fcn.140022960
mov rcx, rax
call fcn.140022860
int3
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret