Function at 0x140008e0c
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 0x140008f0b
mov qword [rsi], rbx
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140008e59
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 0x140008ee5
cmp eax, 5
jne 0x140008ee7
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.14000e0fc
lea rcx, [rbp + 7]
call fcn.140009100
mov rdx, qword [rbp + 0x1f]
mov r14b, al
cmp rdx, 8
jae 0x140008f31
test r14b, r14b
je 0x1400090f0
lea r9, [rbp - 0x11]
mov dword [rbp - 0x11], ebx
mov r8, rsi
mov rdx, rdi
call fcn.1400103e4
mov r14d, eax
test eax, eax
jne 0x140008f47
cmp dword [rbp - 0x11], 1
je 0x140008fd7
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140011290
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.140016460
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rbp - 0x19]
call fcn.1400165c8
jmp 0x140008e49
mov rcx, qword [rbp + 7]
lea rdx, [rdx*2 + 2]
call fcn.140006400
jmp 0x140008eb9
call fcn.14000d32c
mov rbx, rax
cmp dword [rax], 3
jbe 0x140008fcf
mov rcx, rdi
call fcn.140007750
mov qword [rbp - 9], rax
lea rdx, [0x140043d03]
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 0x140008fbe
mov rcx, rdi
call fcn.140007750
mov qword [rbp - 1], rax
lea rdx, [0x140043d03]
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.1400072f8
mov eax, r14d
jmp 0x140008ee7
call fcn.14000d32c
mov r14, rax
cmp dword [rax], 3
jbe 0x140009028
mov rcx, rdi
call fcn.140007750
mov qword [rbp - 1], rax
lea rdx, [0x140043d03]
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.1400072f8
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.14000e0c0
lea rcx, [rbp + 7]
call fcn.140009100
lea rcx, [rbp + 7]
call fcn.14000e934
lea r9, [rbp - 0x11]
mov qword [rsi], rbx
mov r8, rsi
mov rdx, rdi
call fcn.1400103e4
mov r14d, eax
test eax, eax
je 0x140009079
call fcn.14000d32c
mov rbx, rax
cmp dword [rax], 3
jbe 0x140008fcf
jmp 0x140008f8a
mov rcx, qword [rsi]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov esi, eax
test eax, eax
je 0x1400090f0
call fcn.14000d32c
mov r14, rax
cmp dword [rax], 3
jbe 0x1400090df
mov rcx, rdi
call fcn.140007750
mov qword [rbp - 1], rax
lea rdx, [0x140043d03]
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.1400072f8
cmp esi, 0xc0000022
setne bl
lea eax, [rbx + 5]
jmp 0x140008ee7
mov eax, 0xa
jmp 0x140008ee7