Function at 0x140045dc8
Capabilities:
Delete registry key

Disassembly:
mov rax, rsp
push rbp
push r13
push r14
lea rbp, [rax - 0x78]
sub rsp, 0x160
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov rsi, rcx
xor r14d, r14d
mov qword [rbp - 0x20], r14
lea rbx, [0x140123128]
mov rdx, rbx
cmp qword [reloc.OLEAUT32.dll_VariantInit], 8
cmovae rdx, qword [0x140123128]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, 0x3010f
xor r8d, r8d
mov rdi, 0xffffffff80000002
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140045eb6
mov rcx, qword [rbp - 0x20]
test rcx, rcx
jne 0x140045e85
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp + 0x10]
call fcn.140005a2c
nop
lea rdx, [rbp + 0x10]
lea rcx, [rsp + 0x50]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
je 0x140045f85
test byte [0x140124700], 2
je 0x140045f85
mov r8d, eax
lea rdx, [0x1400d1520]
call fcn.1400075f0
jmp 0x140045f85
cmp eax, 2
jne 0x140046175
cmp qword [rbp - 0x20], r14
je 0x140045ef6
lea rdx, str.Attempting_to_assign_an_already_valid_handle.
lea rcx, [rbp + 0x10]
call fcn.140005a2c
nop
lea rdx, [rbp + 0x10]
lea rcx, [rsp + 0x50]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
cmp qword [reloc.OLEAUT32.dll_VariantInit], 8
cmovae rbx, qword [0x140123128]
mov qword [rsp + 0x40], r14
lea rax, [rbp - 0x20]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0xf013f
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x140045f85
test byte [0x140124700], 2
je 0x140045f54
mov r8d, eax
lea rdx, [0x1400d1540]
call fcn.1400075f0
lea rdx, str.Unable_to_create_index_registry_key.
lea rcx, [rbp + 0x10]
call fcn.140005a2c
nop
lea rdx, [rbp + 0x10]
lea rcx, [rsp + 0x50]
call fcn.1400457a0
lea rdx, [0x140119518]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
mov rax, qword [rsi + 8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140046167
mov r12d, 7
or r13, 0xffffffffffffffff
mov qword [rbp + 0x28], r12
mov qword [rbp + 0x20], r14
mov word [rbp + 0x10], r14w
mov r9, r13
xor r8d, r8d
lea rdx, [rbx + 0x10]
lea rcx, [rbp + 0x10]
call fcn.1400034bc
nop
mov qword [rbp + 0x48], r12
mov qword [rbp + 0x40], r14
mov word [rbp + 0x30], r14w
lea rdx, [rbx + 0x30]
mov r9, r13
xor r8d, r8d
lea rcx, [rbp + 0x30]
call fcn.1400034bc
nop
mov qword [rbp], r12
mov qword [rbp - 8], r14
mov word [rbp - 0x18], r14w
mov r9, r13
xor r8d, r8d
lea rdx, [rbx + 0x10]
lea rcx, [rbp - 0x18]
call fcn.1400034bc
nop
mov edx, 1
lea r8d, [rdx + 0x5b]
lea rcx, [rbp - 0x18]
call fcn.14000e2ec
lea rdx, [rbx + 0x30]
mov r9, r13
xor r8d, r8d
lea rcx, [rbp - 0x18]
call fcn.140005e98
mov qword [rbp + 8], r14
lea rdx, [rbp - 0x18]
cmp qword [rbp], 8
cmovae rdx, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x140046136
mov qword [rsp + 0x40], r14
lea rax, [rbp + 8]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x20106
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test eax, eax
jne 0x1400460e1
lea rcx, [rbp + 8]
call fcn.140005984
nop
cmp qword [rbp], 8
jb 0x140046093
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp], r12
mov qword [rbp - 8], r14
mov word [rbp - 0x18], r14w
cmp qword [rbp + 0x48], 8
jb 0x1400460b1
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x48], r12
mov qword [rbp + 0x40], r14
mov word [rbp + 0x30], r14w
cmp qword [rbp + 0x28], 8
jb 0x1400460cf
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov rbx, qword [rbx]
cmp rbx, qword [rsi + 8]
jne 0x140045f9f
jmp 0x140046167
test byte [0x140124700], 2
je 0x140046105
lea rcx, [rbp - 0x18]
call fcn.140003344
mov r8, rax
mov r9d, edi
lea rdx, [0x1400d0a00]
call fcn.1400329b4
lea rdx, str.Unable_to_create_a_template_index_subkey.
lea rcx, [rsp + 0x50]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.1400457a0
lea rdx, [0x140119518]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rsp + 0x50]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
lea rcx, [rbp - 0x20]
call fcn.140005984
jmp 0x14004620f
mov r8d, 5
cmp eax, r8d
jne 0x1400461c6
test byte [0x140124700], 2
je 0x140046195
lea rdx, [0x1400d1670]
call fcn.1400075f0
lea rdx, str.Unable_to_access_the_template_index.
lea rcx, [rsp + 0x50]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.1400457a0
lea rdx, [0x140119518]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
test byte [0x140124700], 2
je 0x1400461de
mov r8d, eax
lea rdx, [0x1400d1630]
call fcn.1400075f0
lea rdx, str.Unable_to_open_index_registry_key.
lea rcx, [rsp + 0x50]
call fcn.140005a2c
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.1400457a0
lea rdx, [0x140119518]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.1400b3bf0
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret