Function at 0x14000c9a0
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x14006afb8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, qword [rdx]
xor ebx, ebx
mov r15d, r9d
mov r14, rdx
mov rdi, rcx
test rsi, rsi
jne 0x14000ca9e
mov qword [r14], rbx
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000c9ed
mov rdx, qword [rdi]
mov r9d, r15d
mov qword [rsp + 0x20], r14
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x14000ca78
cmp eax, 5
jne 0x14000ca7a
xorps xmm0, xmm0
lea r8d, [rax + 0xc]
xorps xmm1, xmm1
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp + 7]
movups xmmword [rbp + 7], xmm0
movdqu xmmword [rbp + 0x17], xmm1
call fcn.140012eb8
lea rcx, [rbp + 7]
call fcn.14000cca8
mov rdx, qword [rbp + 0x1f]
mov sil, al
cmp rdx, 8
jae 0x14000cac4
test sil, sil
je 0x14000cc96
lea r9, [rbp - 0x11]
mov dword [rbp - 0x11], ebx
mov r8, r14
mov rdx, rdi
call fcn.140014d6c
mov esi, eax
test eax, eax
jne 0x14000cada
cmp dword [rbp - 0x11], 1
je 0x14000cb68
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140015f80
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
lea rcx, [rbp - 0x19]
call fcn.14001b438
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rbp - 0x19]
call fcn.14001b5a0
jmp 0x14000c9dd
mov rcx, qword [rbp + 7]
lea rdx, [rdx*2 + 2]
call fcn.1400086f0
jmp 0x14000ca4d
call fcn.14001226c
mov rbx, rax
cmp dword [rax], 3
jbe 0x14000cb61
mov rcx, rdi
call fcn.14000a560
mov qword [rbp - 9], rax
lea rdx, [0x14005c327]
lea rax, str.Could_not_open_the_registry_key
mov qword [rbp - 1], rax
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 1]
jmp 0x14000cb51
mov rcx, rdi
call fcn.14000a560
mov qword [rbp - 1], rax
lea rdx, [0x14005c327]
lea rax, str.Could_not_re_open_the_registry_key
mov qword [rbp - 9], rax
lea rax, [rbp - 1]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 9]
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x19], esi
call fcn.14000c128
mov eax, esi
jmp 0x14000ca7a
call fcn.14001226c
mov rsi, rax
cmp dword [rax], 3
jbe 0x14000cbb9
mov rcx, rdi
call fcn.14000a560
mov qword [rbp - 1], rax
lea rdx, [0x14005c327]
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov dword [rbp - 0x19], ebx
mov qword [rbp - 9], rax
mov rcx, rsi
lea rax, [rbp - 1]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
call fcn.14000c128
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.140012e7c
lea rcx, [rbp + 7]
call fcn.14000cca8
lea rcx, [rbp + 7]
call fcn.140013750
lea r9, [rbp - 0x11]
mov qword [r14], rbx
mov r8, r14
mov rdx, rdi
call fcn.140014d6c
mov esi, eax
test eax, eax
je 0x14000cc1a
mov r8d, eax
lea rcx, str.RegOpenKeyWithBackup_should_be_able_to_open_whatever_it_created.
mov edx, eax
call fcn.14003e600
call fcn.14001226c
mov rbx, rax
cmp dword [rax], 3
jbe 0x14000cb61
jmp 0x14000cb1d
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov esi, eax
test eax, eax
je 0x14000cc96
call fcn.14003e6d4
call fcn.14001226c
mov r14, rax
cmp dword [rax], 3
jbe 0x14000cc85
mov rcx, rdi
call fcn.14000a560
mov qword [rbp - 1], rax
lea rdx, [0x14005c327]
lea rax, str.Could_not_delete_the_registry_key
mov dword [rbp - 0x19], esi
mov qword [rbp - 9], rax
mov rcx, r14
lea rax, [rbp - 1]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
call fcn.14000c128
cmp esi, 0xc0000022
setne bl
lea eax, [rbx + 5]
jmp 0x14000ca7a
mov eax, 0xa
jmp 0x14000ca7a