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

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x40
mov r12, r8
lea rax, [r11 - 0x28]
mov rsi, r9
mov ebx, edx
mov qword [r11 - 0x30], rax
lea r9, [r11 - 0x24]
xor edi, edi
xor r8d, r8d
mov rdx, r12
and qword [r11 - 0x38], rdi
mov r14, rcx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14007ae6e
cmp eax, 2
jne 0x14007ae60
test rsi, rsi
je 0x14007adcf
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea edx, [rcx + rcx]
jmp 0x14007ae78
mov edx, 2
lea rcx, [0x14000d150]
call fcn.14007e7a0
mov rcx, rdi
call fcn.140076afc
test rsi, rsi
je 0x14007ae3f
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea eax, [rcx + rcx]
mov ecx, eax
mov dword [rsp + 0x30], eax
call fcn.140076a54
mov rdi, rax
test rax, rax
je 0x14007ae3f
mov edx, dword [rsp + 0x30]
mov r8, rsi
mov rcx, rax
call fcn.14002fd84
test eax, eax
jns 0x14007afb9
lea rcx, [0x14000d368]
mov edx, eax
call fcn.14007e7a0
mov rcx, rdi
call fcn.140076afc
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r13
pop r12
ret
mov edx, eax
lea rcx, [0x14000d1e0]
jmp 0x14007addb
cmp dword [rsp + 0x34], ebx
jne 0x14007ae3f
mov edx, dword [rsp + 0x30]
mov eax, 0x20
test edx, edx
cmove edx, eax
mov eax, edx
mov dword [rsp + 0x30], edx
and eax, 1
lea ebp, [rax + rdx + 2]
mov ecx, ebp
mov r13d, ebp
call fcn.140076a54
mov rdi, rax
test rax, rax
je 0x14007ade0
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x34]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov rdx, r12
mov rcx, r14
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [rbp - 1]
mov byte [rcx + rdi], 0
lea ecx, [rbp - 2]
mov byte [rcx + rdi], 0
test byte [rsp + 0x30], 1
je 0x14007aee4
lea ecx, [rbp - 3]
mov byte [rcx + rdi], 0
test eax, eax
je 0x14007af61
cmp eax, 2
jne 0x14007ae60
test rsi, rsi
je 0x14007af50
mov r8, rsi
mov rdx, r13
mov rcx, rdi
call fcn.14002fd84
test eax, eax
jns 0x14007af16
mov edx, eax
lea rcx, [0x14000d220]
jmp 0x14007addb
mov eax, dword [rsp + 0x30]
mov r9d, ebx
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, r12
mov rcx, r14
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x14007af61
lea rcx, [0x14000d2c0]
mov r8d, eax
mov rdx, r12
call fcn.14007e7a0
jmp 0x14007ade0
lea rcx, [0x14000d260]
call fcn.14007e7a0
jmp 0x14007ade0
cmp ebx, 2
jne 0x14007afb9
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebp, eax
test eax, eax
je 0x14007ade0
lea ecx, [rax + rax + 2]
mov dword [rsp + 0x30], ecx
call fcn.140076a54
mov rbx, rax
test rax, rax
je 0x14007ade0
mov r8d, ebp
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14007afc1
cmp eax, ebp
jg 0x14007afc1
mov rcx, rdi
call fcn.140076afc
mov rdi, rbx
mov rax, rdi
jmp 0x14007ae41
mov rcx, rbx
call fcn.140076afc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x14000d310]
mov edx, eax
jmp 0x14007addb