Function at 0x14006b880
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rsi, r9
mov r14, r8
mov r15d, edx
mov r12, rcx
mov rdi, qword [rbp + 0xd0]
mov dword [rdi], 2
lea eax, [rdx - 2]
xor ebx, ebx
cmp eax, 1
ja 0x14006bab8
mov qword [rsp + 0x50], rbx
mov r8d, edx
lea rdx, [rbp + 0x40]
call fcn.140066adc
nop
lea r8, [0x1400d995c]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.140026fe4
nop
lea r8, [0x1401231b0]
mov rdx, rax
lea rcx, [rbp]
call fcn.1400271dc
nop
lea r8, [0x1400d995c]
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.140026fe4
nop
mov r8, r14
mov rdx, rax
lea rcx, [rbp - 0x40]
call fcn.1400271dc
mov r14, rax
cmp qword [rsp + 0x50], rbx
je 0x14006b96d
lea rdx, str.Attempting_to_assign_an_already_valid_handle.
lea rcx, [rsp + 0x60]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rbp - 0x80]
call sub.msvcrt.dll__CxxThrowException
nop
cmp qword [rax + 0x18], 8
jb 0x14006b977
mov r14, qword [rax]
mov edx, r15d
mov rcx, r12
call fcn.140066aac
mov rcx, rax
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x102
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [rdi], eax
cmp qword [rbp - 0x28], 8
jb 0x14006b9c7
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov r14d, 7
mov qword [rbp - 0x28], r14
mov qword [rbp - 0x30], rbx
mov word [rbp - 0x40], bx
cmp qword [rbp - 8], 8
jb 0x14006b9ea
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 8], r14
mov qword [rbp - 0x10], rbx
mov word [rbp - 0x20], bx
cmp qword [rbp + 0x18], 8
jb 0x14006ba07
mov rcx, qword [rbp]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x18], r14
mov qword [rbp + 0x10], rbx
mov word [rbp], bx
cmp qword [rbp + 0x38], 8
jb 0x14006ba24
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x38], r14
mov qword [rbp + 0x30], rbx
mov word [rbp + 0x20], bx
cmp qword [rbp + 0x58], 8
jb 0x14006ba41
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
cmp dword [rdi], ebx
jne 0x14006baae
cmp qword [rsi + 0x18], 8
jb 0x14006ba4f
mov rsi, qword [rsi]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
jne 0x14006ba8a
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rsp + 0x60]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rbp - 0x80]
call sub.msvcrt.dll__CxxThrowException
nop
mov dword [rsp + 0x28], ebx
lea rax, [0x1400d2100]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rdi], eax
lea rcx, [rsp + 0x50]
call fcn.140005984
cmp dword [rdi], ebx
sete al
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1400b3bf0
add rsp, 0x170
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret