Function at 0x14006e5dc
Capabilities:
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov qword [r11 + 8], rcx
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rax, rcx
mov r14, r8
lea rcx, [rbp + 0x50]
mov rdi, r9
mov qword [r11 - 0x40], rcx
lea r9, [rbp - 0x10]
mov esi, edx
xor r13d, r13d
mov rcx, rax
mov qword [r11 - 0x48], r13
xor r8d, r8d
mov rdx, r14
mov ebx, r13d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
or r15, 0xffffffffffffffff
test eax, eax
je 0x14006e67e
cmp eax, 2
jne 0x14006e673
test rdi, rdi
je 0x14006e65d
mov rax, r15
inc rax
cmp word [rdi + rax*2], r13w
jne 0x14006e64a
lea ecx, [rax*2 + 2]
jmp 0x14006e68a
mov edx, 2
lea rcx, str.RegQueryValueEx___failed__ec_d___and_no_default_value_was_specified
call fcn.140070eb4
jmp 0x14006e819
mov edx, eax
lea rcx, str.RegQueryValueEx___failed__ec_d
jmp 0x14006e669
cmp dword [rbp - 0x10], esi
jne 0x14006e872
mov ecx, dword [rbp + 0x50]
test ecx, ecx
mov eax, 0x20
cmove ecx, eax
mov eax, ecx
mov dword [rbp + 0x50], ecx
and eax, 1
add eax, ecx
mov dword [rbp - 0xc], eax
lea r13d, [rax + 2]
mov ecx, r13d
mov r12d, r13d
call fcn.14006a264
mov rbx, rax
test rax, rax
je 0x14006e816
mov rcx, qword [rbp + 0x30]
lea rax, [rbp + 0x50]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x10]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
lea ecx, [r13 - 1]
mov byte [rcx + rbx], 0
mov ecx, dword [rbp - 0xc]
mov byte [rcx + rbx], 0
test byte [rbp + 0x50], 1
je 0x14006e706
lea ecx, [r13 - 3]
xor r13d, r13d
mov byte [rcx + rbx], r13b
jmp 0x14006e709
xor r13d, r13d
test eax, eax
je 0x14006e78c
cmp eax, 2
jne 0x14006e673
test rdi, rdi
je 0x14006e77b
mov r8, rdi
mov rdx, r12
mov rcx, rbx
call fcn.140016298
test eax, eax
jns 0x14006e73b
mov edx, eax
lea rcx, str.StringCbCopy_failed__hr:_0x_x
jmp 0x14006e669
mov eax, dword [rbp + 0x50]
mov r9d, esi
mov rcx, qword [rbp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, r14
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
test eax, eax
je 0x14006e78c
mov r8d, eax
lea rcx, str.RegSetValueEx___failed__s___ec_d
mov rdx, r14
call fcn.140070eb4
jmp 0x14006e819
lea rcx, str.Cant_create_DefaultValue_since_its_NULL
call fcn.140070eb4
jmp 0x14006e819
cmp esi, 2
jne 0x14006e7ec
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
mov r14d, eax
test eax, eax
je 0x14006e819
lea ecx, [rax*2 + 2]
mov dword [rbp + 0x50], ecx
call fcn.14006a264
mov rsi, rax
test rax, rax
je 0x14006e819
mov r8d, r14d
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
test eax, eax
je 0x14006e7f4
cmp eax, r14d
jg 0x14006e7f4
mov rcx, rbx
call fcn.14006a328
mov rbx, rsi
mov rax, rbx
jmp 0x14006e874
mov rcx, rsi
call fcn.14006a328
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ExpandEnvironmentStrings___failed__ec_d
jmp 0x14006e669
xor r13d, r13d
mov rcx, rbx
call fcn.14006a328
test rdi, rdi
je 0x14006e872
inc r15
cmp word [rdi + r15*2], r13w
jne 0x14006e826
lea eax, [r15*2 + 2]
mov ecx, eax
mov dword [rbp + 0x50], eax
call fcn.14006a264
mov rbx, rax
test rax, rax
je 0x14006e872
mov edx, dword [rbp + 0x50]
mov r8, rdi
mov rcx, rax
call fcn.140016298
test eax, eax
jns 0x14006e7ec
mov edx, eax
lea rcx, str.StringCbCopy_failed__hr__0x_x
call fcn.140070eb4
mov rcx, rbx
call fcn.14006a328
xor eax, eax
lea r11, [rsp + 0x40]
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