Function at 0x140011cf4
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 [0x14006dfb8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, qword [rdx]
xor ebx, ebx
mov r15d, r9d
mov r14, rdx
mov rdi, rcx
test rsi, rsi
jne 0x140011df2
mov qword [r14], rbx
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140011d41
mov rdx, qword [rdi]
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 0x140011dcc
cmp eax, 5
jne 0x140011dce
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.140017b78
lea rcx, [rbp + 7]
call fcn.140011ffc
mov rdx, qword [rbp + 0x1f]
mov sil, al
cmp rdx, 8
jae 0x140011e18
test sil, sil
je 0x140011fea
lea r9, [rbp - 0x11]
mov dword [rbp - 0x11], ebx
mov r8, r14
mov rdx, rdi
call fcn.140019c84
mov esi, eax
test eax, eax
jne 0x140011e2e
cmp dword [rbp - 0x11], 1
je 0x140011ebc
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14001ae20
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.140020274
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rbp - 0x19]
call fcn.1400203dc
jmp 0x140011d31
mov rcx, qword [rbp + 7]
lea rdx, [rdx*2 + 2]
call fcn.14000e340
jmp 0x140011da1
call fcn.140016c38
mov rbx, rax
cmp dword [rax], 3
jbe 0x140011eb5
mov rcx, rdi
call fcn.1400101b0
mov qword [rbp - 9], rax
lea rdx, [0x14005ddbf]
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 0x140011ea5
mov rcx, rdi
call fcn.1400101b0
mov qword [rbp - 1], rax
lea rdx, [0x14005ddbf]
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], esi
call fcn.14000fc18
mov eax, esi
jmp 0x140011dce
call fcn.140016c38
mov rsi, rax
cmp dword [rax], 3
jbe 0x140011f0d
mov rcx, rdi
call fcn.1400101b0
mov qword [rbp - 1], rax
lea rdx, [0x14005ddbf]
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov dword [rbp - 0x19], ebx
mov qword [rbp - 9], rax
mov rcx, rsi
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.14000fc18
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.140017b3c
lea rcx, [rbp + 7]
call fcn.140011ffc
lea rcx, [rbp + 7]
call fcn.1400183f8
lea r9, [rbp - 0x11]
mov qword [r14], rbx
mov r8, r14
mov rdx, rdi
call fcn.140019c84
mov esi, eax
test eax, eax
je 0x140011f6e
mov r8d, eax
lea rcx, str.RegOpenKeyWithBackup_should_be_able_to_open_whatever_it_created.
mov edx, eax
call fcn.14003f7b0
call fcn.140016c38
mov rbx, rax
cmp dword [rax], 3
jbe 0x140011eb5
jmp 0x140011e71
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov esi, eax
test eax, eax
je 0x140011fea
call fcn.14003f884
call fcn.140016c38
mov r14, rax
cmp dword [rax], 3
jbe 0x140011fd9
mov rcx, rdi
call fcn.1400101b0
mov qword [rbp - 1], rax
lea rdx, [0x14005ddbf]
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.14000fc18
cmp esi, 0xc0000022
setne bl
lea eax, [rbx + 5]
jmp 0x140011dce
mov eax, 0xa
jmp 0x140011dce