Function at 0x140008ddc
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 [0x14004f0e8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14, qword [rdx]
xor ebx, ebx
mov r15d, r9d
mov rsi, rdx
mov rdi, rcx
test r14, r14
jne 0x140008edb
mov qword [rsi], rbx
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140008e29
mov rdx, qword [rdi]
mov r9d, r15d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140008eb5
cmp eax, 5
jne 0x140008eb7
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.14000e0cc
lea rcx, [rbp + 7]
call fcn.1400090d0
mov rdx, qword [rbp + 0x1f]
mov r14b, al
cmp rdx, 8
jae 0x140008f01
test r14b, r14b
je 0x1400090c0
lea r9, [rbp - 0x11]
mov dword [rbp - 0x11], ebx
mov r8, rsi
mov rdx, rdi
call fcn.1400103b4
mov r14d, eax
test eax, eax
jne 0x140008f17
cmp dword [rbp - 0x11], 1
je 0x140008fa7
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140011260
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.140016430
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rbp - 0x19]
call fcn.140016598
jmp 0x140008e19
mov rcx, qword [rbp + 7]
lea rdx, [rdx*2 + 2]
call fcn.1400063d0
jmp 0x140008e89
call fcn.14000d2fc
mov rbx, rax
cmp dword [rax], 3
jbe 0x140008f9f
mov rcx, rdi
call fcn.140007720
mov qword [rbp - 9], rax
lea rdx, [0x140043c83]
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 0x140008f8e
mov rcx, rdi
call fcn.140007720
mov qword [rbp - 1], rax
lea rdx, [0x140043c83]
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], r14d
call fcn.1400072c8
mov eax, r14d
jmp 0x140008eb7
call fcn.14000d2fc
mov r14, rax
cmp dword [rax], 3
jbe 0x140008ff8
mov rcx, rdi
call fcn.140007720
mov qword [rbp - 1], rax
lea rdx, [0x140043c83]
lea rax, str.Created_a_new_key_where_one_should_have_existed
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.1400072c8
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.14000e090
lea rcx, [rbp + 7]
call fcn.1400090d0
lea rcx, [rbp + 7]
call fcn.14000e93c
lea r9, [rbp - 0x11]
mov qword [rsi], rbx
mov r8, rsi
mov rdx, rdi
call fcn.1400103b4
mov r14d, eax
test eax, eax
je 0x140009049
call fcn.14000d2fc
mov rbx, rax
cmp dword [rax], 3
jbe 0x140008f9f
jmp 0x140008f5a
mov rcx, qword [rsi]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov esi, eax
test eax, eax
je 0x1400090c0
call fcn.14000d2fc
mov r14, rax
cmp dword [rax], 3
jbe 0x1400090af
mov rcx, rdi
call fcn.140007720
mov qword [rbp - 1], rax
lea rdx, [0x140043c83]
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.1400072c8
cmp esi, 0xc0000022
setne bl
lea eax, [rbx + 5]
jmp 0x140008eb7
mov eax, 0xa
jmp 0x140008eb7