Function at 0x14012c028
Capabilities:
Set environment variable

Disassembly:
test rcx, rcx
je 0x14012c36f
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov bl, dl
mov rdi, rcx
xor r12d, r12d
cmp dword [rcx + 8], r12d
je 0x14012c0b9
cmp dword [rcx], 1
je 0x14012c0b9
mov ecx, dword [rcx + 4]
test ecx, ecx
je 0x14012c086
sub ecx, 1
je 0x14012c07f
cmp ecx, 1
jne 0x14012c0b9
mov eax, 0x21c
jmp 0x14012c09e
mov eax, 0x424
jmp 0x14012c09e
call fcn.140123504
neg al
sbb rcx, rcx
and ecx, 0x208
mov eax, 0x21c
add rax, rcx
lea rdx, [rax + rdi]
test rdx, rdx
je 0x14012c0b9
cmp word [rdx], r12w
je 0x14012c0b9
lea rcx, str.ComSpec
call fcn.14012bf44
cmp dword [rdi + 0xc], r12d
je 0x14012c34f
test bl, bl
jne 0x14012c34f
lea r14, [rdi + 0x62c]
cmp word [r14], r12w
je 0x14012c34f
lea r15, [rdi + 0x834]
cmp word [r15], r12w
je 0x14012c34f
lea rdx, str.PATH
lea rcx, [rbp - 9]
call fcn.140127fd4
nop
lea rcx, [rbp - 9]
call fcn.140120ef0
test al, al
jne 0x14012c11f
or r8, 0xffffffffffffffff
lea rdx, [0x14015a140]
lea rcx, [rbp - 9]
call fcn.140121718
lea rcx, [rbp - 9]
call fcn.140121404
xor edx, edx
lea rcx, [rbp - 9]
call fcn.140121ccc
mov rdx, rax
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
lea rcx, [rbp + 0x17]
call fcn.140120be0
nop
lea rcx, [rbp + 7]
call fcn.140120d54
nop
lea rcx, [rbp + 0x17]
call fcn.140120ef0
test al, al
je 0x14012c332
mov edx, 0x104
lea rcx, [rbp + 7]
call fcn.140121228
test rax, rax
je 0x14012c332
mov r13b, r12b
lea rcx, [rbp + 0x17]
call fcn.140121404
mov rbx, rax
lea rcx, [rbp + 0x17]
call fcn.140058574
mov rcx, rax
mov edx, ebx
call qword [sym.imp.USER32.dll_CharUpperBuffW]
mov esi, r12d
test esi, esi
je 0x14012c1d8
cmp esi, 1
jne 0x14012c2fe
test byte [rdi + 0xc], 2
je 0x14012c2fe
mov r12, r15
jmp 0x14012c1f9
test byte [rdi + 0xc], 1
je 0x14012c2fe
mov rdx, r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x14012c2fe
mov r12, r14
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
mov dword [rbp + 0x67], eax
or r8, 0xffffffffffffffff
mov rdx, r12
lea rcx, [rbp + 7]
call fcn.140121718
lea rcx, [rbp + 7]
call fcn.140058574
mov rcx, rax
mov edx, ebx
call qword [sym.imp.USER32.dll_CharUpperBuffW]
lea rcx, [rbp + 7]
call fcn.140058574
mov rbx, rax
lea rcx, [rbp + 0x17]
call fcn.140058574
mov rcx, rax
mov rdx, rbx
call fcn.14013be00
xor edx, edx
test rax, rax
je 0x14012c290
movsxd rcx, dword [rbp + 0x67]
mov qword [rbp + 0x67], rcx
lea rbx, [rax + rcx*2]
cmp word [rbx], 0x3b
je 0x14012c2fb
cmp word [rbx], dx
je 0x14012c2fb
lea rcx, [rbp + 7]
call fcn.140058574
mov rdx, rax
mov rcx, rbx
call fcn.14013be00
xor edx, edx
test rax, rax
mov rcx, qword [rbp + 0x67]
jne 0x14012c25a
lea rcx, [rbp - 9]
call fcn.140058574
mov r9, rax
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rax
lea r8, [0x14019164c]
mov rdx, r12
lea rcx, [rbp + 0x27]
call fcn.140120be0
nop
lea rcx, [rbp + 0x27]
call fcn.140120ef0
xor r12d, r12d
test al, al
je 0x14012c30a
lea rdx, [rbp + 0x27]
lea rcx, [rbp - 9]
call fcn.140120e10
mov r13b, 1
lea rcx, [rbp + 0x27]
call fcn.140120ddc
jmp 0x14012c2fe
xor r12d, r12d
inc esi
cmp esi, 1
jg 0x14012c313
jmp 0x14012c1bc
lea rcx, [rbp + 0x27]
call fcn.140120ddc
test r13b, r13b
je 0x14012c332
lea rcx, [rbp - 9]
call fcn.140058574
mov rdx, rax
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
lea rcx, [rbp + 7]
call fcn.140120ddc
nop
lea rcx, [rbp + 0x17]
call fcn.140120ddc
nop
lea rcx, [rbp - 9]
call fcn.140120ddc
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret