Function at 0x14004ab64
Capabilities:
Delete registry key

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xc8
mov rax, qword [0x1400841b0]
xor rax, rsp
mov qword [rbp + 7], rax
mov r14, qword [rdx]
xor edi, edi
mov dword [rbp - 0x79], edi
mov r15d, r9d
mov r13, r8
mov r12, rdx
mov rsi, rcx
test r14, r14
je 0x14004abcf
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, r14
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov qword [r12], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x14004abe0
mov rdx, qword [rsi]
mov r9d, r15d
mov qword [rsp + 0x20], r12
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov dword [rbp - 0x79], eax
test eax, eax
je 0x14004af1f
cmp eax, 5
jne 0x14004af21
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp - 0x69]
call fcn.140009014
lea rcx, [rbp - 0x69]
call fcn.14004d4b4
lea rcx, [rbp - 0x69]
mov bl, al
call fcn.14000a1c0
test bl, bl
je 0x14004af18
lea r9, [rbp - 0x75]
mov dword [rbp - 0x75], edi
mov r8, r12
mov rdx, rsi
mov rcx, r13
call fcn.14004a4e8
mov dword [rbp - 0x79], eax
test eax, eax
je 0x14004acea
call fcn.1400097d0
mov rcx, rax
cmp dword [rax], 3
jbe 0x14004ae61
cmp qword [rsi + 0x18], 8
lea rax, str.Could_not_open_the_registry_key
mov qword [rbp - 0x29], rax
lea rax, [rbp - 0x79]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x21], 0x40
mov qword [rbp - 0x11], 4
jb 0x14004ac98
mov rsi, qword [rsi]
lea r14, [0x14005ca08]
mov rbx, rdi
test rsi, rsi
je 0x14004acb7
mov r14, rsi
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rsi + rbx*2], di
jne 0x14004acae
lea eax, [rbx*2 + 2]
mov qword [rbp - 9], r14
mov dword [rbp - 1], eax
mov dword [rbp + 3], edi
lea rax, [rbp - 0x49]
mov qword [rsp + 0x28], rax
lea rdx, [0x14006ef1b]
mov dword [rsp + 0x20], 5
call fcn.1400011b0
jmp 0x14004ae61
cmp dword [rbp - 0x75], 1
jne 0x14004af1f
call fcn.1400097d0
or rbx, 0xffffffffffffffff
lea r14, [0x14005ca08]
mov r8, rax
cmp dword [rax], 3
jbe 0x14004ad87
cmp qword [rsi + 0x18], 8
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov qword [rbp - 0x29], rax
lea rax, [rbp - 0x79]
mov qword [rbp - 0x19], rax
mov rax, rsi
mov qword [rbp - 0x21], 0x60
mov qword [rbp - 0x11], 4
jb 0x14004ad3c
mov rax, qword [rsi]
mov rdx, r14
mov rcx, rdi
test rax, rax
je 0x14004ad56
mov rdx, rax
mov rcx, rbx
inc rcx
cmp word [rax + rcx*2], di
jne 0x14004ad4d
lea eax, [rcx*2 + 2]
mov qword [rbp - 9], rdx
mov dword [rbp - 1], eax
mov dword [rbp + 3], edi
lea rax, [rbp - 0x49]
mov rcx, r8
mov qword [rsp + 0x28], rax
lea rdx, [0x14006ef1b]
mov dword [rsp + 0x20], 5
call fcn.1400011b0
lea rdx, str.SeRestorePrivilege
mov dword [rbp - 0x71], 6
lea rcx, [rbp - 0x69]
call fcn.140009014
lea rcx, [rbp - 0x69]
call fcn.14004d4b4
lea rcx, [rbp - 0x69]
call fcn.14000a1c0
lea r9, [rbp - 0x75]
mov qword [r12], rdi
mov r8, r12
mov rdx, rsi
mov rcx, r13
call fcn.14004a4e8
mov dword [rbp - 0x79], eax
test eax, eax
je 0x14004ae69
mov r8d, eax
lea rcx, str.RegOpenKeyWithBackup_should_be_able_to_open_whatever_it_created.
mov edx, eax
call fcn.14003d144
call fcn.1400097d0
mov rcx, rax
cmp dword [rax], 3
jbe 0x14004ae61
cmp qword [rsi + 0x18], 8
lea rax, str.Could_not_re_open_the_registry_key
mov qword [rbp - 0x29], rax
lea rax, [rbp - 0x79]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x21], VarR8FromUI1
mov qword [rbp - 0x11], 4
jb 0x14004ae1c
mov rsi, qword [rsi]
mov rax, rdi
test rsi, rsi
je 0x14004ae33
mov r14, rsi
mov rax, rbx
inc rax
cmp word [rsi + rax*2], di
jne 0x14004ae2a
lea eax, [rax*2 + 2]
mov qword [rbp - 9], r14
mov dword [rbp - 1], eax
mov dword [rbp + 3], edi
lea rax, [rbp - 0x49]
mov qword [rsp + 0x28], rax
lea rdx, [0x14006ef1b]
mov dword [rsp + 0x20], 5
call fcn.1400011b0
mov eax, dword [rbp - 0x79]
jmp 0x14004af21
mov rcx, qword [r12]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov dword [rbp - 0x71], eax
test eax, eax
je 0x14004af18
call fcn.14003d170
call fcn.1400097d0
mov rcx, rax
cmp dword [rax], 3
jbe 0x14004af08
cmp qword [rsi + 0x18], 8
lea rax, str.Could_not_delete_the_registry_key
mov qword [rbp - 0x29], rax
lea rax, [rbp - 0x71]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x21], 0x44
mov qword [rbp - 0x11], 4
jb 0x14004aec3
mov rsi, qword [rsi]
mov rax, rdi
test rsi, rsi
je 0x14004aeda
mov r14, rsi
mov rax, rbx
inc rax
cmp word [rsi + rax*2], di
jne 0x14004aed1
lea eax, [rax*2 + 2]
mov qword [rbp - 9], r14
mov dword [rbp - 1], eax
mov dword [rbp + 3], edi
lea rax, [rbp - 0x49]
mov qword [rsp + 0x28], rax
lea rdx, [0x14006ef1b]
mov dword [rsp + 0x20], 5
call fcn.1400011b0
cmp dword [rbp - 0x71], 0xc0000022
setne dil
lea eax, [rdi + 5]
jmp 0x14004af21
mov eax, 0xa
jmp 0x14004af21
xor eax, eax
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.14004ddf0
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret