Function at 0x140021990
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
vmovaps xmmword [rsp + 0x380], xmm6
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov rax, qword [0x140113040]
xor rax, rsp
mov qword [rsp + 0x378], rax
xor r14d, r14d
lea rcx, [rsp + 0x1e0]
mov r8d, 0x190
xor edx, edx
call fcn.1400c3300
cmp byte [rbx + 0x17], 0
mov rax, rbx
jns 0x1400219eb
mov rax, qword [rbx]
movzx ecx, word [rax + r14*2]
mov word [rsp + r14*2 + 0x1e0], cx
test cx, cx
je 0x140021ab7
inc r14
cmp r14, 0xc8
jne 0x1400219eb
jmp 0x140021aad
mov bpl, byte [rdi]
mov dil, byte [rdi + 0x20]
movzx eax, byte [rbx + 0x17]
test al, al
jns 0x140021a29
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.1400dfd40
mov rcx, rsi
mov rdx, rbx
mov r8d, edi
mov r9d, ebp
call fcn.1400ddf00
lea rdi, [rsp + 0x150]
mov rdx, qword [rdi + 8]
mov rcx, rdi
call fcn.14001a0b0
mov rdi, qword [rdi - 0x18]
test rdi, rdi
je 0x14002232d
mov rbx, qword [rsp + 0x140]
mov rcx, rdi
cmp rbx, rdi
jne 0x140021aa5
jmp 0x140022365
mov rcx, qword [rbx - 0x18]
call fcn.1400910b4
add rbx, 0xffffffffffffffe8
cmp rbx, rdi
je 0x14002235d
cmp byte [rbx - 1], 0
jns 0x140021a98
jmp 0x140021a8f
mov word [rsp + 0x36e], 0
lea rcx, [rsp + 0x1e0]
call fcn.1400552a0
cmp byte [rdi + 0x21], 0
jne 0x140021a13
mov qword [rsp + 0x80], 0xa
mov al, byte [0x14012460a]
test al, al
jne 0x140022488
vbroadcastss xmm6, dword [0x1400f27f0]
lea r14, [rsp + 0x1a0]
vmovaps 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.140056ee0
lea r8, [0x140124794]
mov rcx, r14
mov rdx, r15
call fcn.140023a10
vxorps xmm0, xmm0, xmm0
vmovaps xmmword [rsp + 0x1d0], xmm0
vxorps xmm0, xmm0, xmm0
vmovups ymmword [r15], ymm0
vmovups ymmword [r15 + 0x58], ymm0
vmovups ymmword [r15 + 0x40], ymm0
vmovups ymmword [r15 + 0x20], ymm0
mov dword [r15 + 8], 0x70
xor r14d, r14d
cmp byte [rdi + 0x72], 0
mov ebp, 0
je 0x140021b8a
vzeroupper
call fcn.140017580
mov rax, qword [0x140124870]
xor ebp, ebp
cmp dword [rax], 0x10
setge bpl
mov rax, qword [rdi + 0x28]
xor r15d, r15d
cmp rax, qword [rdi + 0x30]
setne r12b
vzeroupper
call fcn.140017580
mov rax, qword [0x140124870]
cmp dword [rax], 3
jl 0x140021bd2
mov r15b, r12b
add ebp, r15d
je 0x140021bd2
lea rcx, [rsp + 0x120]
mov edx, ebp
call fcn.140029380
mov r14d, 0x80000
test al, al
je 0x1400222bb
cmp byte [rdi + 0x72], 0
je 0x140021c33
call fcn.140017580
mov rax, qword [0x140124870]
cmp dword [rax], 0x10
jl 0x140021c33
or byte [rsp + 0x1db], 0x20
mov rcx, qword [rsp + 0x190]
test rcx, rcx
je 0x1400222a0
vxorps xmm0, xmm0, xmm0
vmovups 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 0x1400222a0
mov eax, dword [rdi + 0x24]
cmp eax, 1
sete bpl
mov rcx, qword [rdi + 0x28]
cmp rcx, qword [rdi + 0x30]
je 0x140021d63
cmp eax, 1
sete r15b
call fcn.140017580
mov rax, qword [0x140124870]
cmp dword [rax], 3
setl bpl
or bpl, r15b
mov rax, qword [rdi + 0x28]
cmp rax, qword [rdi + 0x30]
je 0x140021d63
call fcn.140017580
mov rax, qword [0x140124870]
cmp dword [rax], 3
jl 0x140021d63
mov r15, qword [rdi + 0x28]
mov r12, qword [rdi + 0x30]
mov rax, r12
sub rax, r15
mov ecx, 0xfffffff8
cmp rax, rcx
jbe 0x140021cc2
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x1400222d5
jmp 0x1400224d0
cmp r15, r12
je 0x1400224bb
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 0x140022419
add r15, 8
cmp r15, r12
jne 0x140021cda
mov r9, qword [rdi + 0x28]
mov rax, qword [rdi + 0x30]
cmp rax, r9
je 0x1400224bb
mov rcx, qword [rsp + 0x190]
test rcx, rcx
je 0x140021d44
sub eax, r9d
and eax, 0xfffffff8
vxorps xmm0, xmm0, xmm0
vmovups 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 0x140021d63
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x1400222d5
jmp 0x1400224ef
cmp byte [rdi + 0x22], 0
je 0x140021d71
or byte [rsp + 0x164], 0x80
cmp byte [rdi + 0x48], 0
je 0x140021d86
lea rax, [0x140104b6c]
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 0x140021dc3
test rdx, rdx
jne 0x140021dc3
test r8, r8
je 0x140021e0c
mov r9, qword [rdi + 0x28]
cmp r9, qword [rdi + 0x30]
jne 0x140021de8
test rcx, rcx
je 0x1400224be
test rdx, rdx
je 0x1400224c1
test r8, r8
je 0x1400224c4
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
vxorps xmm0, xmm0, xmm0
vmovaps xmmword [rsp + 0x100], xmm0
mov qword [rsp + 0x110], 0
movzx eax, byte [rdi + 0x1f]
test al, al
js 0x140021e58
lea r12, [rdi + 8]
jmp 0x140021e60
mov rdx, qword [rbx]
mov r8, qword [rbx + 8]
lea rcx, [rsp + 0xe0]
call fcn.1400071a0
jmp 0x140021ea1
mov rax, qword [rdi + 0x10]
mov r12, qword [rdi + 8]
test rax, rax
cmove r12, rax
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0xf0], rax
vmovaps xmmword [rsp + 0xe0], xmm6
cmp byte [rbx + 0x17], 0
js 0x140021e42
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0xf0], rax
vmovups xmm0, xmmword [rbx]
vmovaps xmmword [rsp + 0xe0], xmm0
lea r13, [rsp + 0x128]
mov rdx, qword [rdi + 0x40]
test rdx, rdx
je 0x140021eff
lea rcx, [rsp + 0x80]
mov qword [rcx], 0
xor r8d, r8d
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x1400220aa
or r15d, 0x400
mov rdx, qword [rsp + 0x80]
movzx eax, bpl
cmp byte [rsp + 0xf7], 0
js 0x1400220c9
lea r8, [rsp + 0xe0]
jmp 0x1400220d1
vxorps xmm0, xmm0, xmm0
vmovaps xmmword [rsp + 0x80], xmm0
mov qword [rsp + 0x90], 0
mov al, byte [rdi + 0x90]
test al, al
jne 0x140021f4d
cmp qword [rdi + 0x88], 0
jne 0x140021f4d
xor eax, eax
movzx ecx, bpl
cmp byte [rsp + 0xf7], 0
js 0x140021ff2
lea rdx, [rsp + 0xe0]
jmp 0x140021ffa
test al, al
je 0x140021fa7
lea r8, [rdi + 0x78]
lea rdx, [0x1400fc460]
lea rbx, [rsp + 0x60]
mov rcx, rbx
call fcn.1400e19e0
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x90], rax
vmovups xmm0, xmmword [rbx]
vmovaps xmmword [rsp + 0x80], xmm0
cmp byte [rsp + 0x97], 0
js 0x140021f96
lea rax, [rsp + 0x80]
jmp 0x140021f9e
mov rax, qword [rsp + 0x80]
or r15d, 0x400
jmp 0x140021f2e
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
je 0x14002208b
mov rbx, rax
lea r8, [rdi + 0x78]
lea r14, [rsp + 0x60]
mov rcx, r14
mov rdx, rax
call fcn.1400e19e0
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0x90], rax
vmovups xmm0, xmmword [r14]
vmovaps xmmword [rsp + 0x80], xmm0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140021f82
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 0x140022051
cmp byte [rsp + 0x97], 0
jns 0x140022125
mov rcx, qword [rsp + 0x80]
call fcn.1400910b4
jmp 0x140022125
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
je 0x1400224cd
cmp byte [rsp + 0x97], 0
jns 0x14002226c
mov rcx, qword [rsp + 0x80]
call fcn.1400910b4
jmp 0x14002226c
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x14002226c
jmp 0x1400224f2
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x14002226c
jmp 0x1400224b8
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 0x140022285
vxorps xmm0, xmm0, xmm0
lea rcx, [rsp + 0xc0]
vmovaps xmmword [rcx], xmm0
mov qword [rcx + 0x10], 0
lea rdx, [rsp + 0x100]
call fcn.14001c910
mov rcx, qword [rdi + 0x50]
test rcx, rcx
je 0x14002216c
mov rbx, qword [rsp + 0xc0]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
je 0x140022374
cmp byte [rdi + 0x71], 0
je 0x140022197
mov rcx, qword [rsp + 0xc0]
xor eax, eax
test rcx, rcx
je 0x14002218f
call qword [sym.imp.KERNEL32.dll_GetProcessId]
test eax, eax
je 0x1400224d6
mov ecx, eax
call qword [sym.imp.USER32.dll_AllowSetForegroundWindow]
cmp byte [rdi], 0
je 0x140022226
vbroadcastss ymm0, dword [0x1400f27f0]
lea rdi, [rsp + 0x80]
vmovups ymmword [rdi + 0x20], ymm0
vmovups ymmword [rdi], ymm0
lea rdx, str.LaunchProcess
lea r8, str....._baseprocesslaunch_win.cc
lea rbx, [rsp + 0x60]
mov rcx, rbx
mov r9d, 0x1ba
vzeroupper
call fcn.140056ee0
mov rcx, rdi
mov rdx, rbx
xor r8d, r8d
call fcn.140074800
mov rcx, qword [rsp + 0xc0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov qword [rsp + 0x1c8], 0xa
mov al, byte [0x14012460a]
test al, al
jne 0x1400223f2
lea rcx, [rsp + 0x80]
call fcn.1400756a0
mov dword [rsp + 0xd0], 0
mov rdi, qword [rsp + 0xc0]
mov qword [rsp + 0xc0], 0
lea rax, [rdi + 1]
cmp rax, 2
jb 0x140022254
call fcn.140067800
mov rcx, rsi
mov rdx, rdi
call fcn.140028bd0
lea rcx, [rsp + 0xc0]
call fcn.140029450
cmp byte [rsp + 0xf7], 0
jns 0x1400222d5
mov rcx, qword [rsp + 0xe0]
call fcn.1400910b4
jmp 0x1400222d5
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x14002226c
jmp 0x1400224ca
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
jne 0x1400222d5
jmp 0x1400224c7
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
je 0x1400224b5
mov rcx, qword [rsp + 0x190]
test rcx, rcx
je 0x1400222e8
call qword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
mov rcx, qword [rsp + 0x120]
mov qword [rsp + 0x120], 0
test rcx, rcx
je 0x140022306
call fcn.140091238
lea rcx, [rsp + 0x1a0]
call fcn.140029190
mov qword [rsp + 0x80], 0xa
mov al, byte [0x14012460a]
test al, al
jne 0x14002245e
mov rcx, qword [rsp + 0x378]
xor rcx, rsp
call fcn.1400931d0
mov rax, rsi
vmovaps 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.1400910b4
jmp 0x14002232d
vmovaps xmmword [rsp + 0x80], xmm6
mov dword [rsp + 0xd0], 0
mov qword [rsp + 0xc0], 0
lea rax, [rbx + 1]
cmp rax, 2
jb 0x1400223a3
call fcn.140067800
lea rdi, [rsp + 0x80]
mov rcx, rdi
mov rdx, rbx
call fcn.140028bd0
mov rcx, rdi
mov edx, 1
mov r8b, 1
call fcn.1400dde20
mov qword [rsi], 0
mov byte [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test rax, rax
je 0x1400224d3
lea rcx, [rsp + 0x80]
call fcn.140023750
jmp 0x14002225f
movzx ecx, al
lea r8, [rsp + 0x60]
mov qword [r8], 0
lea rdx, [rsp + 0x1c8]
mov r9d, 2
call fcn.140056f00
jmp 0x140022219
lea rcx, [rsp + 0x80]
lea rdx, str.LaunchProcess
lea r8, str....._baseprocesslaunch_win.cc
mov r9d, 0x142
call fcn.140056ee0
mov rcx, rbp
lea rdx, [0x1401037b7]
lea r8, [rsp + 0x80]
call fcn.1400dfe90
mov rcx, rbp
call fcn.1400dffe0
jmp 0x140021cf3
movzx ecx, al
lea r8, [rsp + 0x120]
mov qword [r8], 0
lea rdx, [rsp + 0x80]
mov r9d, 2
call fcn.140056f00
jmp 0x14002232d
movzx ecx, al
lea rax, str.LaunchProcess
lea r8, [rsp + 0x120]
mov qword [r8], rax
lea rdx, [rsp + 0x80]
mov r9d, 1
call fcn.140058440
jmp 0x140021ae8
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 0x14002218f
int3
int3
int3