Function at 0x140021b10
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x398
movaps xmmword [rsp + 0x380], xmm6
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov rax, qword [0x140114040]
xor rax, rsp
mov qword [rsp + 0x378], rax
xor r14d, r14d
lea rcx, [rsp + 0x1e0]
mov r8d, 0x190
xor edx, edx
call fcn.1400c42d0
cmp byte [rbx + 0x17], 0
mov rax, rbx
jns 0x140021b6a
mov rax, qword [rbx]
movzx ecx, word [rax + r14*2]
mov word [rsp + r14*2 + 0x1e0], cx
test cx, cx
je 0x140021c36
inc r14
cmp r14, 0xc8
jne 0x140021b6a
jmp 0x140021c2c
mov bpl, byte [rdi]
mov dil, byte [rdi + 0x20]
movzx eax, byte [rbx + 0x17]
test al, al
jns 0x140021ba8
mov rax, qword [rbx + 8]
mov rbx, qword [rbx]
lea rdx, [rsp + 0x1b8]
mov qword [rdx], rbx
mov qword [rdx + 8], rax
lea rbx, [rsp + 0x120]
mov rcx, rbx
call fcn.1400e0b30
mov rcx, rsi
mov rdx, rbx
mov r8d, edi
mov r9d, ebp
call fcn.1400ded00
lea rdi, [rsp + 0x150]
mov rdx, qword [rdi + 8]
mov rcx, rdi
call fcn.14001a180
mov rdi, qword [rdi - 0x18]
test rdi, rdi
je 0x140022499
mov rbx, qword [rsp + 0x140]
mov rcx, rdi
cmp rbx, rdi
jne 0x140021c24
jmp 0x1400224d0
mov rcx, qword [rbx - 0x18]
call fcn.140092084
add rbx, 0xffffffffffffffe8
cmp rbx, rdi
je 0x1400224c8
cmp byte [rbx - 1], 0
jns 0x140021c17
jmp 0x140021c0e
mov word [rsp + 0x36e], 0
lea rcx, [rsp + 0x1e0]
call fcn.1400562d0
cmp byte [rdi + 0x21], 0
jne 0x140021b92
mov qword [rsp + 0x80], 0xa
mov al, byte [0x14012560a]
test al, al
jne 0x1400225f2
movaps xmm6, xmmword [0x1400f3bf0]
lea r14, [rsp + 0x1a0]
movaps xmmword [r14], xmm6
lea rdx, str.LaunchProcess
lea r8, str....._baseprocesslaunch_win.cc
lea r15, [rsp + 0x120]
mov rcx, r15
mov r9d, 0x100
call fcn.140057f70
lea r8, [0x140125794]
mov rcx, r14
mov rdx, r15
call fcn.140023b50
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1d0], xmm0
movaps xmmword [r15], xmm0
movaps xmmword [r15 + 0x60], xmm0
movaps xmmword [r15 + 0x50], xmm0
movaps xmmword [r15 + 0x40], xmm0
movaps xmmword [r15 + 0x30], xmm0
movaps xmmword [r15 + 0x20], xmm0
movaps xmmword [r15 + 0x10], xmm0
mov qword [r15 + 0x70], 0
mov dword [r15 + 8], 0x70
xor r14d, r14d
cmp byte [rdi + 0x72], 0
mov ebp, 0
je 0x140021d10
call fcn.140017670
mov rax, qword [0x140125870]
xor ebp, ebp
cmp dword [rax], 0x10
setge bpl
mov rax, qword [rdi + 0x28]
xor r15d, r15d
cmp rax, qword [rdi + 0x30]
setne r12b
call fcn.140017670
mov rax, qword [0x140125870]
cmp dword [rax], 3
jl 0x140021d55
mov r15b, r12b
add ebp, r15d
je 0x140021d55
lea rcx, [rsp + 0x120]
mov edx, ebp
call fcn.140029490
mov r14d, 0x80000
test al, al
je 0x140022427
cmp byte [rdi + 0x72], 0
je 0x140021db4
call fcn.140017670
mov rax, qword [0x140125870]
cmp dword [rax], 0x10
jl 0x140021db4
or byte [rsp + 0x1db], 0x20
mov rcx, qword [rsp + 0x190]
test rcx, rcx
je 0x14002240c
xorps xmm0, xmm0
movups xmmword [rsp + 0x28], xmm0
mov qword [rsp + 0x20], 0x10
lea r9, [rsp + 0x1d0]
mov r8d, 0x20007
xor edx, edx
call qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
je 0x14002240c
mov eax, dword [rdi + 0x24]
cmp eax, 1
sete bpl
mov rcx, qword [rdi + 0x28]
cmp rcx, qword [rdi + 0x30]
je 0x140021ee2
cmp eax, 1
sete r15b
call fcn.140017670
mov rax, qword [0x140125870]
cmp dword [rax], 3
setl bpl
or bpl, r15b
mov rax, qword [rdi + 0x28]
cmp rax, qword [rdi + 0x30]
je 0x140021ee2
call fcn.140017670
mov rax, qword [0x140125870]
cmp dword [rax], 3
jl 0x140021ee2
mov r15, qword [rdi + 0x28]
mov r12, qword [rdi + 0x30]
mov rax, r12
sub rax, r15
mov ecx, 0xfffffff8
cmp rax, rcx
jbe 0x140021e43
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x140022441
jmp 0x14002263a
cmp r15, r12
je 0x140022625
mov r13, qword [sym.imp.KERNEL32.dll_SetHandleInformation]
lea rbp, [rsp + 0x118]
mov rcx, qword [r15]
mov edx, 1
mov r8d, 1
call r13
test eax, eax
je 0x140022583
add r15, 8
cmp r15, r12
jne 0x140021e5b
mov r9, qword [rdi + 0x28]
mov rax, qword [rdi + 0x30]
cmp rax, r9
je 0x140022625
mov rcx, qword [rsp + 0x190]
test rcx, rcx
je 0x140021ec3
sub eax, r9d
and eax, 0xfffffff8
xorps xmm0, xmm0
movups xmmword [rsp + 0x28], xmm0
mov qword [rsp + 0x20], rax
mov r8d, 0x20002
xor edx, edx
call qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
mov bpl, 1
test eax, eax
jne 0x140021ee2
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x140022441
jmp 0x140022659
cmp byte [rdi + 0x22], 0
je 0x140021ef0
or byte [rsp + 0x164], 0x80
cmp byte [rdi + 0x48], 0
je 0x140021f05
lea rax, [0x140105fac]
mov qword [rsp + 0x138], rax
mov eax, dword [rsp + 0x164]
mov ecx, eax
or ecx, 1
mov dword [rsp + 0x164], ecx
movzx ecx, byte [rdi + 0x20]
xor ecx, 1
mov word [rsp + 0x168], cx
mov rcx, qword [rdi + 0x58]
mov rdx, qword [rdi + 0x60]
mov r8, qword [rdi + 0x68]
test rcx, rcx
jne 0x140021f42
test rdx, rdx
jne 0x140021f42
test r8, r8
je 0x140021f8b
mov r9, qword [rdi + 0x28]
cmp r9, qword [rdi + 0x30]
jne 0x140021f67
test rcx, rcx
je 0x140022628
test rdx, rdx
je 0x14002262b
test r8, r8
je 0x14002262e
or eax, 0x101
mov dword [rsp + 0x164], eax
mov qword [rsp + 0x178], rcx
mov qword [rsp + 0x180], rdx
mov qword [rsp + 0x188], r8
cmp byte [rdi + 0x70], 0
lea r15d, [r14 + 0x1000000]
cmove r15d, r14d
xorps xmm0, xmm0
movaps xmmword [rsp + 0x100], xmm0
mov qword [rsp + 0x110], 0
movzx eax, byte [rdi + 0x1f]
test al, al
js 0x140021fd5
lea r12, [rdi + 8]
jmp 0x140021fdd
mov rdx, qword [rbx]
mov r8, qword [rbx + 8]
lea rcx, [rsp + 0xe0]
call fcn.140007240
jmp 0x14002201b
mov rax, qword [rdi + 0x10]
mov r12, qword [rdi + 8]
test rax, rax
cmove r12, rax
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0xf0], rax
movaps xmmword [rsp + 0xe0], xmm6
cmp byte [rbx + 0x17], 0
js 0x140021fbf
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0xf0], rax
movups xmm0, xmmword [rbx]
movaps xmmword [rsp + 0xe0], xmm0
lea r13, [rsp + 0x128]
mov rdx, qword [rdi + 0x40]
test rdx, rdx
je 0x140022079
lea rcx, [rsp + 0x80]
mov qword [rcx], 0
xor r8d, r8d
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x14002221e
or r15d, 0x400
mov rdx, qword [rsp + 0x80]
movzx eax, bpl
cmp byte [rsp + 0xf7], 0
js 0x14002223d
lea r8, [rsp + 0xe0]
jmp 0x140022245
xorps xmm0, xmm0
movaps xmmword [rsp + 0x80], xmm0
mov qword [rsp + 0x90], 0
mov al, byte [rdi + 0x90]
test al, al
jne 0x1400220c5
cmp qword [rdi + 0x88], 0
jne 0x1400220c5
xor eax, eax
movzx ecx, bpl
cmp byte [rsp + 0xf7], 0
js 0x140022166
lea rdx, [rsp + 0xe0]
jmp 0x14002216e
test al, al
je 0x14002211d
lea r8, [rdi + 0x78]
lea rdx, [0x1400fd860]
lea rbx, [rsp + 0x60]
mov rcx, rbx
call fcn.1400e2780
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x90], rax
movups xmm0, xmmword [rbx]
movaps xmmword [rsp + 0x80], xmm0
cmp byte [rsp + 0x97], 0
js 0x14002210c
lea rax, [rsp + 0x80]
jmp 0x140022114
mov rax, qword [rsp + 0x80]
or r15d, 0x400
jmp 0x1400220a6
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
je 0x1400221ff
mov rbx, rax
lea r8, [rdi + 0x78]
lea r14, [rsp + 0x60]
mov rcx, r14
mov rdx, rax
call fcn.1400e2780
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0x90], rax
movups xmm0, xmmword [r14]
movaps xmmword [rsp + 0x80], xmm0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400220f8
mov rdx, qword [rsp + 0xe0]
lea r8, [rsp + 0x100]
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], ecx
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1400221c5
cmp byte [rsp + 0x97], 0
jns 0x140022299
mov rcx, qword [rsp + 0x80]
call fcn.140092084
jmp 0x140022299
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
je 0x140022637
cmp byte [rsp + 0x97], 0
jns 0x1400223d8
mov rcx, qword [rsp + 0x80]
call fcn.140092084
jmp 0x1400223d8
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x1400223d8
jmp 0x14002265c
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x1400223d8
jmp 0x140022622
mov r8, qword [rsp + 0xe0]
mov rcx, qword [rdi + 0x40]
lea r9, [rsp + 0x100]
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], 0
xor edx, edx
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
mov rcx, qword [rsp + 0x80]
call sub.USERENV.dll_DestroyEnvironmentBlock
test ebx, ebx
je 0x1400223f1
xorps xmm0, xmm0
lea rcx, [rsp + 0xc0]
movaps xmmword [rcx], xmm0
mov qword [rcx + 0x10], 0
lea rdx, [rsp + 0x100]
call fcn.14001c9c0
mov rcx, qword [rdi + 0x50]
test rcx, rcx
je 0x1400222de
mov rbx, qword [rsp + 0xc0]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
je 0x1400224df
cmp byte [rdi + 0x71], 0
je 0x140022309
mov rcx, qword [rsp + 0xc0]
xor eax, eax
test rcx, rcx
je 0x140022301
call qword [sym.imp.KERNEL32.dll_GetProcessId]
test eax, eax
je 0x140022640
mov ecx, eax
call qword [sym.imp.USER32.dll_AllowSetForegroundWindow]
cmp byte [rdi], 0
je 0x140022392
lea rdi, [rsp + 0x80]
movaps xmmword [rdi + 0x30], xmm6
movaps xmmword [rdi + 0x20], xmm6
movaps xmmword [rdi + 0x10], xmm6
movaps xmmword [rdi], xmm6
lea rdx, str.LaunchProcess
lea r8, str....._baseprocesslaunch_win.cc
lea rbx, [rsp + 0x60]
mov rcx, rbx
mov r9d, 0x1ba
call fcn.140057f70
mov rcx, rdi
mov rdx, rbx
xor r8d, r8d
call fcn.140075ed0
mov rcx, qword [rsp + 0xc0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov qword [rsp + 0x1c8], 0xa
mov al, byte [0x14012560a]
test al, al
jne 0x14002255c
lea rcx, [rsp + 0x80]
call fcn.1400754b0
mov dword [rsp + 0xd0], 0
mov rdi, qword [rsp + 0xc0]
mov qword [rsp + 0xc0], 0
lea rax, [rdi + 1]
cmp rax, 2
jb 0x1400223c0
call fcn.1400687f0
mov rcx, rsi
mov rdx, rdi
call fcn.140028cf0
lea rcx, [rsp + 0xc0]
call fcn.140029560
cmp byte [rsp + 0xf7], 0
jns 0x140022441
mov rcx, qword [rsp + 0xe0]
call fcn.140092084
jmp 0x140022441
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x1400223d8
jmp 0x140022634
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x140022441
jmp 0x140022631
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
je 0x14002261f
mov rcx, qword [rsp + 0x190]
test rcx, rcx
je 0x140022454
call qword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
mov rcx, qword [rsp + 0x120]
mov qword [rsp + 0x120], 0
test rcx, rcx
je 0x140022472
call fcn.140092208
lea rcx, [rsp + 0x1a0]
call fcn.1400292a0
mov qword [rsp + 0x80], 0xa
mov al, byte [0x14012560a]
test al, al
jne 0x1400225c8
mov rcx, qword [rsp + 0x378]
xor rcx, rsp
call fcn.1400941a0
mov rax, rsi
movaps xmm6, xmmword [rsp + 0x380]
add rsp, 0x398
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x138]
mov qword [rsp + 0x140], rdi
call fcn.140092084
jmp 0x140022499
movaps xmmword [rsp + 0x80], xmm6
mov dword [rsp + 0xd0], 0
mov qword [rsp + 0xc0], 0
lea rax, [rbx + 1]
cmp rax, 2
jb 0x14002250d
call fcn.1400687f0
lea rdi, [rsp + 0x80]
mov rcx, rdi
mov rdx, rbx
call fcn.140028cf0
mov rcx, rdi
mov edx, 1
mov r8b, 1
call fcn.1400dec20
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
je 0x14002263d
lea rcx, [rsp + 0x80]
call fcn.140023890
jmp 0x1400223cb
movzx ecx, al
lea r8, [rsp + 0x60]
mov qword [r8], 0
lea rdx, [rsp + 0x1c8]
mov r9d, 2
call fcn.140057f90
jmp 0x140022385
lea rcx, [rsp + 0x80]
lea rdx, str.LaunchProcess
lea r8, str....._baseprocesslaunch_win.cc
mov r9d, 0x142
call fcn.140057f70
mov rcx, rbp
lea rdx, [0x140104bf7]
lea r8, [rsp + 0x80]
call fcn.1400e0c70
mov rcx, rbp
call fcn.1400e0dc0
jmp 0x140021e74
movzx ecx, al
lea r8, [rsp + 0x120]
mov qword [r8], 0
lea rdx, [rsp + 0x80]
mov r9d, 2
call fcn.140057f90
jmp 0x140022499
movzx ecx, al
lea rax, str.LaunchProcess
lea r8, [rsp + 0x120]
mov qword [r8], rax
lea rdx, [rsp + 0x80]
mov r9d, 1
call fcn.1400594d0
jmp 0x140021c67
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov eax, 0
cmp ecx, 6
jne 0x140022301
int3
int3
int3