Function at 0x1400079cc
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 [0x14002c3f0]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rbx, qword [rdx]
xor edi, edi
mov r15d, r9d
mov r14, rdx
mov rsi, rcx
test rbx, rbx
jne 0x140007ab4
mov qword [r14], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140007a19
mov rdx, qword [rsi]
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 0x140007a8e
cmp eax, 5
jne 0x140007a90
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp + 7]
call fcn.140007fb0
lea rcx, [rbp + 7]
call fcn.140007cac
lea rcx, [rbp + 7]
mov bl, al
call fcn.140006cc0
test bl, bl
je 0x140007c9a
lea r9, [rbp - 0x11]
mov dword [rbp - 0x11], edi
mov r8, r14
mov rdx, rsi
call fcn.14000e524
mov ebx, eax
test eax, eax
jne 0x140007ae4
cmp dword [rbp - 0x11], 1
je 0x140007b3c
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000f540
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov byte [rbp - 0x19], dil
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, rbx
mov dword [rbp - 0x15], eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rbp - 0x19]
call fcn.140011164
jmp 0x140007a09
call fcn.1400085ac
mov rdi, rax
cmp dword [rax], 3
jbe 0x140007b35
mov rcx, rsi
call fcn.140008ab0
mov qword [rbp - 9], rax
lea rdx, [0x1400242af]
lea rax, str.Could_not_open_the_registry_key
mov dword [rbp - 0x19], ebx
mov qword [rbp - 1], rax
mov rcx, rdi
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 1]
mov qword [rsp + 0x20], rax
call fcn.14000866c
mov eax, ebx
jmp 0x140007a90
call fcn.1400085ac
mov rbx, rax
cmp dword [rax], 3
jbe 0x140007b8d
mov rcx, rsi
call fcn.140008ab0
mov qword [rbp - 1], rax
lea rdx, [0x1400242af]
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov dword [rbp - 0x19], edi
mov qword [rbp - 9], rax
mov rcx, rbx
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.14000866c
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.140007fb0
lea rcx, [rbp + 7]
call fcn.140007cac
lea rcx, [rbp + 7]
call fcn.140006cc0
lea r9, [rbp - 0x11]
mov qword [r14], rdi
mov r8, r14
mov rdx, rsi
call fcn.14000e524
mov r15d, eax
test eax, eax
je 0x140007c22
call fcn.1400085ac
mov rbx, rax
cmp dword [rax], 3
jbe 0x140007c1a
mov rcx, rsi
call fcn.140008ab0
mov qword [rbp - 1], rax
lea rdx, [0x1400242af]
lea rax, str.Could_not_re_open_the_registry_key
mov dword [rbp - 0x19], r15d
mov qword [rbp - 9], rax
mov rcx, rbx
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.14000866c
mov eax, r15d
jmp 0x140007a90
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x140007c9a
call fcn.1400085ac
mov r14, rax
cmp dword [rax], 3
jbe 0x140007c88
mov rcx, rsi
call fcn.140008ab0
mov qword [rbp - 1], rax
lea rdx, [0x1400242af]
lea rax, str.Could_not_delete_the_registry_key
mov dword [rbp - 0x19], ebx
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.14000866c
cmp ebx, 0xc0000022
setne dil
lea eax, [rdi + 5]
jmp 0x140007a90
mov eax, 0xa
jmp 0x140007a90