Function at 0x14000bd38
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 [0x14002a400]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r15d, r9d
mov r14, rdx
mov rdi, rcx
mov rbx, qword [rdx]
xor esi, esi
test rbx, rbx
je 0x14000bd9c
mov byte [rbp - 0x19], sil
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rbp - 0x15], eax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rbp - 0x19]
call fcn.14000cba0
mov qword [r14], rsi
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000bdac
mov rdx, qword [rdi]
mov qword [rsp + 0x20], r14
mov r9d, r15d
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x14000bfd6
cmp eax, 5
jne 0x14000bfd8
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp + 7]
call fcn.140006d00
nop
lea rcx, [rbp + 7]
call fcn.140014790
mov bl, al
lea rcx, [rbp + 7]
call fcn.1400074e4
nop
test bl, bl
je 0x14000bfcf
mov dword [rbp - 0x11], esi
lea r9, [rbp - 0x11]
mov r8, r14
mov rdx, rdi
call fcn.14000cae4
mov ebx, eax
test eax, eax
je 0x14000be78
call fcn.140007b40
cmp dword [rax], 3
jbe 0x14000be71
cmp qword [rdi + 0x18], 8
jb 0x14000be35
mov rdi, qword [rdi]
mov qword [rbp - 9], rdi
lea rcx, str.Could_not_open_the_registry_key
mov qword [rbp - 1], rcx
lea rcx, [rbp - 9]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 1]
lea rdx, [0x140022d77]
mov qword [rsp + 0x20], rcx
mov dword [rbp - 0x19], ebx
mov rcx, rax
call fcn.140002f5c
mov eax, ebx
jmp 0x14000bfd8
cmp dword [rbp - 0x11], 1
jne 0x14000bfd6
call fcn.140007b40
cmp dword [rax], 3
jbe 0x14000bed5
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000be99
mov rcx, qword [rdi]
mov qword [rbp - 1], rcx
mov dword [rbp - 0x19], esi
lea rcx, str.Created_a_new_key_where_one_should_have_existed
mov qword [rbp - 9], rcx
lea rcx, [rbp - 1]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 9]
mov qword [rsp + 0x20], rcx
lea rdx, [0x140022d77]
mov rcx, rax
call fcn.140002f5c
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.140006d00
nop
lea rcx, [rbp + 7]
call fcn.140014790
nop
lea rcx, [rbp + 7]
call fcn.1400074e4
nop
mov qword [r14], rsi
lea r9, [rbp - 0x11]
mov r8, r14
mov rdx, rdi
call fcn.14000cae4
mov ebx, eax
test eax, eax
je 0x14000bf5b
call fcn.140007b40
cmp dword [rax], 3
jbe 0x14000be71
cmp qword [rdi + 0x18], 8
jb 0x14000bf2a
mov rdi, qword [rdi]
mov qword [rbp - 1], rdi
lea rcx, str.Could_not_re_open_the_registry_key
mov qword [rbp - 9], rcx
lea rcx, [rbp - 1]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 9]
lea rdx, [0x140022d77]
jmp 0x14000be61
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14000bfcf
call fcn.140007b40
cmp dword [rax], 3
jbe 0x14000bfc0
cmp qword [rdi + 0x18], 8
jb 0x14000bf84
mov rdi, qword [rdi]
mov qword [rbp - 1], rdi
mov dword [rbp - 0x19], ebx
lea rcx, str.Could_not_delete_the_registry_key
mov qword [rbp - 9], rcx
lea rcx, [rbp - 1]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 9]
mov qword [rsp + 0x20], rcx
lea rdx, [0x140022d77]
mov rcx, rax
call fcn.140002f5c
cmp ebx, 0xc0000022
setne sil
lea eax, [rsi + 5]
jmp 0x14000bfd8
mov eax, 0xa
jmp 0x14000bfd8
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000dbb0
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret