Function at 0x14006f420
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x140119ad0]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rsi, r9
mov rbx, r8
mov r14d, edx
mov r15, rcx
mov rdi, qword [rbp + 0xe0]
mov dword [rdi], 2
lea eax, [rdx - 2]
xor r13d, r13d
cmp eax, 1
ja 0x14006f67f
mov qword [rsp + 0x50], r13
mov r8d, edx
lea rdx, [rbp + 0x40]
call fcn.14006a3ac
nop
lea r8d, [r13 + 1]
lea rdx, [0x1400d73f8]
mov rcx, rax
call fcn.1400062a8
mov qword [rbp + 0x38], 7
mov qword [rbp + 0x30], r13
mov word [rbp + 0x20], r13w
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.140006524
nop
or r12, 0xffffffffffffffff
mov r9, r12
xor r8d, r8d
lea rdx, [0x140119d80]
lea rcx, [rbp + 0x20]
call fcn.140006400
mov qword [rbp + 0x18], 7
mov qword [rbp + 0x10], r13
mov word [rbp], r13w
mov rdx, rax
lea rcx, [rbp]
call fcn.140006524
nop
lea r8d, [r13 + 1]
lea rdx, [0x1400d73f8]
lea rcx, [rbp]
call fcn.1400062a8
mov qword [rbp - 8], 7
mov qword [rbp - 0x10], r13
mov word [rbp - 0x20], r13w
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.140006524
nop
mov r9, r12
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140006400
lea r12d, [r13 + 7]
mov qword [rbp - 0x28], r12
mov qword [rbp - 0x30], r13
mov word [rbp - 0x40], r13w
mov rdx, rax
lea rcx, [rbp - 0x40]
call fcn.140006524
nop
cmp qword [rsp + 0x50], r13
jne 0x14006f6d6
lea rbx, [rbp - 0x40]
cmp qword [rbp - 0x28], 8
cmovae rbx, qword [rbp - 0x40]
mov edx, r14d
mov rcx, r15
call fcn.14006a37c
mov rcx, rax
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x102
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [rdi], eax
cmp qword [rbp - 0x28], 8
jb 0x14006f5bf
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 0x28], r12
mov qword [rbp - 0x30], r13
mov word [rbp - 0x40], r13w
cmp qword [rbp - 8], 8
jb 0x14006f5dd
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 8], r12
mov qword [rbp - 0x10], r13
mov word [rbp - 0x20], r13w
cmp qword [rbp + 0x18], 8
jb 0x14006f5fb
mov rcx, qword [rbp]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x18], r12
mov qword [rbp + 0x10], r13
mov word [rbp], r13w
cmp qword [rbp + 0x38], 8
jb 0x14006f619
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x38], r12
mov qword [rbp + 0x30], r13
mov word [rbp + 0x20], r13w
cmp qword [rbp + 0x58], 8
jb 0x14006f637
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
cmp dword [rdi], r13d
jne 0x14006f675
cmp qword [rsi + 0x18], 8
jb 0x14006f646
mov rsi, qword [rsi]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14006f6a5
mov dword [rsp + 0x28], r13d
lea rax, [0x1400cfda0]
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.140005edc
cmp dword [rdi], r13d
sete al
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1400b6b90
add rsp, 0x178
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rsp + 0x60]
call fcn.140005f88
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.1400057c8
lea rdx, [0x14010f918]
lea rcx, [rbp - 0x80]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_assign_an_already_valid_handle.
lea rcx, [rsp + 0x60]
call fcn.140005f88
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.1400057c8
lea rdx, [0x14010f918]
lea rcx, [rbp - 0x80]
call sub.msvcrt.dll__CxxThrowException
int3