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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa8
mov rdi, rcx
lea rcx, [rsp + 0x70]
mov rbx, rdx
call fcn.14004be6c
lea rcx, [rsp + 0x68]
call fcn.14004be6c
movzx eax, word [rbx]
xor r15d, r15d
neg ax
mov rsi, 0xffffffff80000001
mov ebp, r15d
sbb r13, r13
lea rcx, [0x140000000]
and r13, rbx
cmp word [rdi], r15w
sete r14b
cmp r14b, r15b
jne 0x1400a6b58
lea ebx, [r15 + 5]
lea rcx, str.HKCU_
mov rdx, rdi
mov r8d, ebx
call fcn.140045fc8
cmp al, r15b
je 0x1400a6af0
add rdi, 0xa
jmp 0x1400a6b51
mov ebp, 0x13
lea rcx, str.HKEY_CURRENT_USER_
mov rdx, rdi
mov r8d, ebp
call fcn.140045fc8
cmp al, r15b
je 0x1400a6b12
add rdi, 0x24
jmp 0x1400a6b51
lea rcx, str.HKLM_
mov r8d, ebx
mov rdx, rdi
call fcn.140045fc8
cmp al, r15b
je 0x1400a6b2f
add rdi, 0xa
jmp 0x1400a6b4a
lea rcx, str.HKEY_LOCAL_MACHINE_
mov r8d, ebp
mov rdx, rdi
call fcn.140045fc8
cmp al, r15b
je 0x1400a6b51
add rdi, 0x26
mov rsi, 0xffffffff80000002
mov ebp, 2
jmp 0x1400a6b74
cmp ebp, 3
jae 0x1400a6ec7
movsxd rax, ebp
mov rsi, qword [rcx + rax*8 + 0xe1988]
mov rdi, qword [rcx + rax*8 + 0xe1970]
lea rax, [rsp + 0x80]
mov r9d, 0xf003f
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x80], r15
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x100], r15d
mov dword [rsp + 0xf0], r15d
mov dword [rsp + 0xf8], r15d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x80]
cmp rcx, r15
je 0x1400a6e86
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xf0]
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x100]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
xor edx, edx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov ebx, eax
cmp eax, r15d
jne 0x1400a6e94
mov edx, dword [rsp + 0xf0]
lea rcx, [rsp + 0x90]
lea edx, [rdx*4 + 8]
call fcn.14004bedc
mov edx, dword [rsp + 0xf8]
lea rcx, [rsp + 0x78]
lea edx, [rdx*4 + 8]
call fcn.14004bedc
cmp dword [rsp + 0x100], r15d
mov r12d, r15d
jle 0x1400a6e5c
mov eax, dword [rsp + 0xf0]
lea r9, [rsp + 0x60]
mov edx, r12d
shl eax, 2
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0xf8]
shl eax, 2
mov dword [rsp + 0x108], eax
mov rax, qword [rsp + 0x90]
mov word [rax], r15w
mov r8, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x80]
lea rax, [rsp + 0x108]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, r15d
jne 0x1400a6e4b
mov rdx, qword [rsp + 0x90]
cmp word [rdx], r15w
je 0x1400a6e4b
cmp r13, r15
je 0x1400a6d00
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, r15d
jne 0x1400a6e4b
mov ecx, dword [rsp + 0x108]
mov rax, qword [rsp + 0x78]
shr ecx, 1
mov word [rax + rcx*2], r15w
mov rdi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x78]
lea rcx, str.PATH
mov rdx, rdi
call fcn.140045ff4
cmp al, r15b
je 0x1400a6d76
mov rdx, qword [rsp + 0x78]
cmp word [rdx], r15w
je 0x1400a6d6a
mov rax, qword [rsp + 0x70]
cmp word [rax], r15w
je 0x1400a6d60
lea rdx, [0x1400e1964]
lea rcx, [rsp + 0x70]
call fcn.14004bfa8
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.14004bfa8
mov rbx, qword [rsp + 0x70]
lea rdi, [0x1400e1958]
lea r8, [rsp + 0x68]
lea rcx, [0x1400f1e30]
or r9d, 0xffffffff
mov rdx, rbx
mov byte [rsp + 0x20], r15b
call fcn.140054c4c
mov rdx, qword [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp r14b, r15b
je 0x1400a6e4b
lea rbx, str.Favorites
mov esi, 8
mov rcx, qword [rbx]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, r15d
jne 0x1400a6e3d
lea rdx, [0x1400e194c]
lea rcx, [rsp + 0x88]
call fcn.140058920
mov rdx, qword [rbx]
lea rcx, [rsp + 0x88]
call fcn.14004bfa8
lea rdx, [0x1400e0c40]
lea rcx, [rsp + 0x88]
call fcn.14004bfa8
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x88]
call fcn.14004bfa8
mov rdx, qword [rsp + 0x88]
lea rcx, [0x1400f1e30]
xor r9d, r9d
xor r8d, r8d
mov byte [rsp + 0x20], 1
call fcn.14006d958
lea rcx, [rsp + 0x88]
call fcn.140044f24
add rbx, 0x10
sub rsi, 1
jne 0x1400a6db6
inc r12d
cmp r12d, dword [rsp + 0x100]
jl 0x1400a6c64
lea rcx, [rsp + 0x78]
call fcn.140044f24
lea rcx, [rsp + 0x90]
call fcn.140044f24
mov rcx, qword [rsp + 0x80]
cmp rcx, r15
je 0x1400a6e86
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebp
lea rcx, [0x140000000]
jmp 0x1400a6b58
mov rcx, qword [rsp + 0x80]
cmp rcx, r15
je 0x1400a6ea7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x80], r15
call fcn.140044f24
lea rcx, [rsp + 0x70]
call fcn.140044f24
mov eax, ebx
jmp 0x1400a6f27
cmp r13, r15
je 0x1400a6f11
lea rcx, str.PATH
mov rdx, r13
call fcn.140045ff4
cmp al, r15b
je 0x1400a6f11
mov rdx, qword [rsp + 0x70]
lea r8, [rsp + 0x68]
lea rcx, [0x1400f1e30]
or r9d, 0xffffffff
mov byte [rsp + 0x20], r15b
call fcn.140054c4c
mov rdx, qword [rsp + 0x68]
lea rcx, [0x1400e1958]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rsp + 0x68]
call fcn.140044f24
lea rcx, [rsp + 0x70]
call fcn.140044f24
xor eax, eax
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret