Function at 0x14000fc88
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 r13, r8
lea rcx, [rbp - 0x10]
mov rdi, r9
mov qword [r11 - 0x40], rcx
lea r9, [rbp - 0xc]
mov r14d, edx
xor esi, esi
mov rcx, rax
mov qword [r11 - 0x48], rsi
xor r8d, r8d
mov rdx, r13
mov ebx, esi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
or r12, 0xffffffffffffffff
test eax, eax
je 0x14000fd73
cmp eax, 2
jne 0x14000fd68
test rdi, rdi
je 0x14000fd20
cmp r14d, 7
jne 0x14000fd0b
mov rcx, rdi
call fcn.14001278c
mov rcx, rax
add ecx, ecx
jmp 0x14000fd80
mov rax, r12
inc rax
cmp word [rdi + rax*2], si
jne 0x14000fd0e
lea ecx, [rax*2 + 2]
jmp 0x14000fd80
mov edx, 2
lea rcx, str.RegQueryValueEx___failed__ec_d___and_no_default_value_was_specified
call fcn.1400129d0
mov rcx, rbx
call fcn.140010a58
mov rsi, qword [rbp + 0x50]
xor eax, eax
test rsi, rsi
je 0x14000fd46
mov dword [rsi], eax
test rdi, rdi
je 0x14000ff9b
cmp r14d, 7
jne 0x14000ff2e
mov rcx, rdi
call fcn.14001278c
add eax, eax
jmp 0x14000ff40
mov edx, eax
lea rcx, str.RegQueryValueEx___failed__ec_d
jmp 0x14000fd2c
cmp dword [rbp - 0xc], r14d
jne 0x14000ff9b
mov ecx, dword [rbp - 0x10]
test ecx, ecx
mov eax, 0x20
cmove ecx, eax
mov eax, ecx
mov dword [rbp - 0x10], ecx
and eax, 1
lea esi, [rcx + 2]
add esi, eax
mov ecx, esi
mov r15d, esi
call fcn.140010904
mov rbx, rax
test rax, rax
je 0x14000fd31
mov rcx, qword [rbp + 0x30]
lea rax, [rbp - 0x10]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0xc]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rdx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
lea ecx, [rsi - 1]
xor r8d, r8d
mov byte [rcx + rbx], r8b
lea ecx, [rsi - 2]
mov byte [rcx + rbx], r8b
test byte [rbp - 0x10], 1
je 0x14000fdef
lea ecx, [rsi - 3]
mov byte [rcx + rbx], r8b
test eax, eax
je 0x14000fe93
cmp eax, 2
jne 0x14000fd68
test rdi, rdi
je 0x14000fe82
cmp r14d, 7
jne 0x14000fe62
mov rcx, rdi
call fcn.14001278c
mov rdx, rdi
mov rcx, rbx
lea r8, [rax + rax]
call sub.msvcrt.dll_memcpy
mov eax, dword [rbp - 0x10]
mov r9d, r14d
mov rcx, qword [rbp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, r13
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
test eax, eax
je 0x14000fe93
mov r8d, eax
lea rcx, str.RegSetValueEx___failed__s___ec_d
mov rdx, r13
call fcn.1400129d0
jmp 0x14000fd31
mov r8, rdi
mov rdx, r15
mov rcx, rbx
call fcn.14000fb1c
test eax, eax
jns 0x14000fe22
mov edx, eax
lea rcx, str.StringCbCopy_failed__hr:_0x_x
jmp 0x14000fd2c
lea rcx, str.Cant_create_DefaultValue_since_its_NULL
call fcn.1400129d0
jmp 0x14000fd31
cmp r14d, 2
jne 0x14000fefc
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
mov r15d, eax
test eax, eax
je 0x14000fd31
lea ecx, [rax*2 + 2]
mov dword [rbp - 0x10], ecx
call fcn.140010904
mov rsi, rax
test rax, rax
je 0x14000fd31
mov r8d, r15d
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
test eax, eax
je 0x14000ff0c
cmp eax, r15d
jg 0x14000ff0c
mov rcx, rbx
call fcn.140010a58
mov rbx, rsi
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14000ff71
mov eax, dword [rbp - 0x10]
mov dword [rcx], eax
jmp 0x14000ff71
mov rcx, rsi
call fcn.140010a58
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ExpandEnvironmentStrings___failed__ec_d
jmp 0x14000fd2c
inc r12
cmp word [rdi + r12*2], ax
jne 0x14000ff2e
lea eax, [r12*2 + 2]
mov ecx, eax
mov dword [rbp - 0x10], eax
call fcn.140010904
mov rbx, rax
test rax, rax
je 0x14000ff9b
mov rcx, rax
cmp r14d, 7
jne 0x14000ff76
mov r8d, dword [rbp - 0x10]
mov rdx, rdi
call sub.msvcrt.dll_memcpy
test rsi, rsi
je 0x14000ff71
mov eax, dword [rbp - 0x10]
mov dword [rsi], eax
mov rax, rbx
jmp 0x14000ff9d
mov edx, dword [rbp - 0x10]
mov r8, rdi
call fcn.14000fb1c
test eax, eax
jns 0x14000ff67
mov edx, eax
lea rcx, str.StringCbCopy_failed__hr__0x_x
call fcn.1400129d0
mov rcx, rbx
call fcn.140010a58
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