Function at 0x140006a14
Capabilities:
Delete registry key

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x14002b400]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rax, qword [rdx]
xor edi, edi
mov ebx, r9d
mov r14, rdx
mov rsi, rcx
test rax, rax
jne 0x140006aee
mov qword [r14], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140006a5c
mov rdx, qword [rsi]
mov r9d, ebx
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 0x140006ad1
cmp eax, 5
jne 0x140006ad3
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp + 7]
call fcn.1400070b0
lea rcx, [rbp + 7]
call fcn.140006ce4
lea rcx, [rbp + 7]
mov bl, al
call fcn.140008970
test bl, bl
je 0x140006cd2
lea r9, [rbp - 1]
mov dword [rbp - 1], edi
mov r8, r14
mov rdx, rsi
call fcn.1400071dc
mov ebx, eax
test eax, eax
jne 0x140006b2b
cmp dword [rbp - 1], 1
je 0x140006bb9
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000f620
add rsp, 0x90
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov qword [rbp - 1], rax
mov byte [rbp - 0x19], dil
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rbp - 0x15], eax
lea rdx, [rbp - 1]
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rbp - 0x11]
mov qword [rbp - 0x11], rax
call fcn.14000ddfc
lea rcx, [rbp - 0x19]
call fcn.140011044
jmp 0x140006a4c
call fcn.140006424
mov r8, rax
cmp dword [rax], 3
jbe 0x140006bb2
mov rcx, rsi
call fcn.140006520
mov qword [rbp - 0x11], rax
lea rdx, [0x140023f9f]
lea rax, str.Could_not_open_the_registry_key
mov qword [rbp - 9], rax
lea rax, [rbp - 0x11]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 9]
jmp 0x140006ba2
mov rcx, rsi
call fcn.140006520
mov qword [rbp - 9], rax
lea rdx, [0x140023f9f]
lea rax, str.Could_not_re_open_the_registry_key
mov qword [rbp - 0x11], rax
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x11]
mov rcx, r8
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x19], ebx
call fcn.140001104
mov eax, ebx
jmp 0x140006ad3
call fcn.140006424
mov r8, rax
cmp dword [rax], 3
jbe 0x140006c0a
mov rcx, rsi
call fcn.140006520
mov qword [rbp - 9], rax
lea rdx, [0x140023f9f]
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov dword [rbp - 0x19], edi
mov qword [rbp - 0x11], rax
mov rcx, r8
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
call fcn.140001104
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.1400070b0
lea rcx, [rbp + 7]
call fcn.140006ce4
lea rcx, [rbp + 7]
call fcn.140008970
lea r9, [rbp - 1]
mov qword [r14], rdi
mov r8, r14
mov rdx, rsi
call fcn.1400071dc
mov ebx, eax
test eax, eax
je 0x140006c5a
call fcn.140006424
mov r8, rax
cmp dword [rax], 3
jbe 0x140006bb2
jmp 0x140006b6e
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x140006cd2
call fcn.140006424
mov r8, rax
cmp dword [rax], 3
jbe 0x140006cc0
mov rcx, rsi
call fcn.140006520
mov qword [rbp - 9], rax
lea rdx, [0x140023f9f]
lea rax, str.Could_not_delete_the_registry_key
mov dword [rbp - 0x19], ebx
mov qword [rbp - 0x11], rax
mov rcx, r8
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
call fcn.140001104
cmp ebx, 0xc0000022
setne dil
lea eax, [rdi + 5]
jmp 0x140006ad3
mov eax, 0xa
jmp 0x140006ad3