Function at 0x14006a4b0
Capabilities:
Set registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x70
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov r12, rdx
mov rbp, rcx
cmp dword [rdx], 0
je 0x14006a7ed
xor r13d, r13d
mov qword [rsp + 0xc8], r13
lea rdx, [rsp + 0x50]
mov rcx, qword [rcx + 0x10]
call fcn.14000f700
nop
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x30], rax
mov rbx, qword [rsp + 0x50]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], 0xffffffff80000002
lea r9, str.hKey_x__lpszSubKey_s__phSubKey_x
lea r8, str.OpenSubKey
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081070
mov edi, r13d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
mov rdx, rbx
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14006a56b
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0xc8], rax
mov edi, 1
mov dword [rsp + 0x20], edi
lea r9, [0x1400fb428]
lea r8, str.OpenSubKey
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081270
test edi, edi
jne 0x14006a650
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], 0xffffffff80000002
lea r9, str.hKey_x__lpszSubKey_s__phSubKey_x
lea r8, str.MakeSubKey
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081070
mov edi, r13d
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14006a626
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xc8], rax
mov edi, 1
mov dword [rsp + 0x20], edi
lea r9, [0x1400fb428]
lea r8, str.MakeSubKey
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081270
test edi, edi
je 0x14006a7d1
test byte [r12], 1
je 0x14006a6f8
lea rdi, [r12 + 4]
mov rsi, qword [rsp + 0xc8]
mov dword [rsp + 0x40], 4
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 4
lea r14, str.InstallDefaultLang
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rsi
lea r9, str.hKey_x__lpszEntry_s__dwType_u__lpbyVal_x__nSize_u
lea r8, str.SetValueEx
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081070
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rdi
mov r9d, 4
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, r13d
test eax, eax
sete cl
mov dword [rsp + 0x20], ecx
lea r9, [0x1400fb428]
lea r8, str.SetValueEx
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081270
test byte [r12], 2
je 0x14006a7c2
xor eax, eax
mov word [rsp + 0xba], ax
movzx eax, word [r12 + 8]
mov word [rsp + 0xb8], ax
mov rdi, qword [rsp + 0xc8]
mov dword [rsp + 0x40], 4
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
lea rsi, str.InstalledRegion
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rdi
lea r9, str.hKey_x__lpszEntry_s__dwType_u__lpbyVal_x__nSize_u
lea r8, str.SetValueEx
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081070
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
sete r13b
mov dword [rsp + 0x20], r13d
lea r9, [0x1400fb428]
lea r8, str.SetValueEx
lea rdx, str.CRegistryIF
mov rcx, qword [rbp]
call fcn.140081270
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14006a7ed
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret