Function at 0x14000a5b0
Capabilities:
Query environment variable
Set registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0xbc8]
sub rsp, 0xcb0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14003f2f0]
xor rax, rsp
mov qword [rbp + 0xba0], rax
mov rbx, rcx
xor r14d, r14d
mov esi, r14d
mov qword [rsp + 0x70], r14
mov dword [rsp + 0x78], r14d
mov qword [rbp - 0x80], r14
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x70]
call fcn.1400166f0
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp + 0x190]
call fcn.1400166f0
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp + 0x790]
call fcn.1400166f0
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp + 0x590]
call fcn.1400166f0
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp + 0x390]
call fcn.1400166f0
mov rcx, rbx
call fcn.140005b10
test eax, eax
je 0x14000ab0f
mov dword [rsp + 0x30], r14d
lea rdi, [0x140042700]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], pe_nt_image_headers64
lea r9, [rbp - 0x70]
lea r8, [0x14002ce18]
lea rdx, str.HKEY
mov rcx, rbx
call fcn.14000db60
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], pe_nt_image_headers64
lea r9, [rbp + 0x190]
lea r8, [0x14002ce18]
lea rdx, str.SubKey
mov rcx, rbx
call fcn.14000db60
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], pe_nt_image_headers64
lea r9, [rbp + 0x590]
lea r8, [0x14002ce18]
lea rdx, str.ValueName
mov rcx, rbx
call fcn.14000db60
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], pe_nt_image_headers64
lea r9, [rbp + 0x390]
lea r8, [0x14002ce18]
lea rdx, str.Data
mov rcx, rbx
call fcn.14000db60
lea rax, [rbp + 0x390]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x590]
lea r8, [rbp + 0x190]
lea rdx, [rbp - 0x70]
lea rcx, str._nCreating_Registry_Entry__s_s___s_s
call fcn.14000adf0
lea rcx, [rbp - 0x70]
or rdi, 0xffffffffffffffff
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x14000a764
test rax, rax
jne 0x14000a784
lea rcx, str._nHKey_not_specified
call fcn.140017d0c
jmp 0x14000ab0f
lea rcx, [rbp + 0x190]
mov rax, rdi
nop
inc rax
cmp word [rcx + rax*2], 0
jne 0x14000a790
test rax, rax
jne 0x14000a7b0
lea rcx, str._nSubKey_not_specified
call fcn.140017d0c
jmp 0x14000ab0f
lea rcx, [rbp + 0x590]
mov rax, rdi
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x14000a7c0
test rax, rax
jne 0x14000a7e0
lea rcx, str._nValueName_not_specified
call fcn.140017d0c
jmp 0x14000ab0f
lea rcx, [rbp + 0x390]
mov rax, rdi
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x14000a7f0
test rax, rax
jne 0x14000a810
lea rcx, str._nData_not_specified
call fcn.140017d0c
jmp 0x14000ab0f
lea rdx, str.HKEY_CLASSES_ROOT
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a830
mov rcx, 0xffffffff80000000
jmp 0x14000a8df
lea rdx, str.HKEY_CURRENT_CONFIG
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a850
mov rcx, 0xffffffff80000005
jmp 0x14000a8df
lea rdx, str.HKEY_CURRENT_USER
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a86d
mov rcx, 0xffffffff80000001
jmp 0x14000a8df
lea rdx, str.HKEY_LOCAL_MACHINE
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a88a
mov rcx, 0xffffffff80000002
jmp 0x14000a8df
lea rdx, str.HKEY_USERS
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a8a7
mov rcx, 0xffffffff80000003
jmp 0x14000a8df
lea rdx, str.HKEY_PERFORMANCE_DATA
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a8c4
mov rcx, 0xffffffff80000004
jmp 0x14000a8df
lea rdx, str.HKEY_DYN_DATA
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000a934
mov rcx, 0xffffffff80000006
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x2001f
xor r9d, r9d
mov qword [rsp + 0x58], r14
mov dword [rsp + 0x20], r14d
xor r8d, r8d
lea rdx, [rbp + 0x190]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jne 0x14000aa3f
mov ebx, r14d
mov rsi, qword [rsp + 0x58]
jmp 0x14000aa3f
lea rdx, str.HKEY_DEFAULT_USER
lea rcx, [rbp - 0x70]
call fcn.140017124
test eax, eax
jne 0x14000aaf5
mov r8d, 0x104
lea rdx, [rbp + 0x990]
lea rcx, str.DEFAULT_USER
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rcx, [rbp + 0x990]
sub rcx, 2
lea rcx, [rcx + 2]
cmp word [rcx], 0
jne 0x14000a971
mov rax, qword [str.NTUSER.DAT]
mov qword [rcx], rax
mov rax, qword [0x140030940]
mov qword [rcx + 8], rax
mov rax, qword [0x140030948]
mov qword [rcx + 0x10], rax
call fcn.14000d240
cmp eax, 1
jne 0x14000aa3b
lea r8, [rbp + 0x990]
lea rdx, str.DefaultUser
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
mov dword [rsp + 0x50], eax
test eax, eax
jne 0x14000aa3b
lea r8, [rbp + 0x190]
lea rdx, str.DefaultUser_s
lea rcx, [rbp + 0x790]
call fcn.140018028
mov qword [rsp + 0x60], r14
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x790]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jne 0x14000aa3f
mov ebx, r14d
mov rsi, qword [rsp + 0x60]
jmp 0x14000aa3f
mov ebx, dword [rsp + 0x50]
test ebx, ebx
jne 0x14000aa8c
lea rax, [rbp + 0x390]
nop word [rax + rax]
inc rdi
cmp word [rax + rdi*2], 0
jne 0x14000aa50
inc edi
lea eax, [rdi + rdi]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x390]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, [rbp + 0x590]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
jmp 0x14000aaad
lea r8, [rbp - 0x70]
lea rdx, [rbp + 0x190]
lea rcx, str._nError_Creating_Subkey_Entry__s_under__s
call fcn.14000adf0
mov dword [0x1400434f8], 1
test ebx, ebx
je 0x14000aac7
lea rcx, str._nError_Creating_Registry_Entry_at_CRegKey::SetValue
call fcn.14000adf0
mov dword [0x1400434f8], 1
test rsi, rsi
je 0x14000aad8
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, r14
cmp dword [rsp + 0x50], 0
jne 0x14000ab0f
lea rdx, str.DefaultUser
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
jmp 0x14000ab0f
lea rdx, [rbp - 0x70]
lea rcx, str._nError_Creating_Registry_Entry__s_is_invalid_hkey
call fcn.14000adf0
mov dword [0x1400434f8], 1
test rsi, rsi
je 0x14000ab1d
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0xba0]
xor rcx, rsp
call fcn.1400161c0
lea r11, [rsp + 0xcb0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret