Function at 0x14000d328
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 [0x140037db0]
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 0x14000d38c
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.14000e1e0
mov qword [r14], rsi
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000d39c
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 0x14000d5c6
cmp eax, 5
jne 0x14000d5c8
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp + 7]
call fcn.140007470
nop
lea rcx, [rbp + 7]
call fcn.14001e89c
mov bl, al
lea rcx, [rbp + 7]
call fcn.140007fe4
nop
test bl, bl
je 0x14000d5bf
mov dword [rbp - 0x11], esi
lea r9, [rbp - 0x11]
mov r8, r14
mov rdx, rdi
call fcn.14000e124
mov ebx, eax
test eax, eax
je 0x14000d468
call fcn.140008bdc
cmp dword [rax], 3
jbe 0x14000d461
cmp qword [rdi + 0x18], 8
jb 0x14000d425
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, [0x14002e963]
mov qword [rsp + 0x20], rcx
mov dword [rbp - 0x19], ebx
mov rcx, rax
call fcn.14000324c
mov eax, ebx
jmp 0x14000d5c8
cmp dword [rbp - 0x11], 1
jne 0x14000d5c6
call fcn.140008bdc
cmp dword [rax], 3
jbe 0x14000d4c5
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000d489
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, [0x14002e963]
mov rcx, rax
call fcn.14000324c
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.140007470
nop
lea rcx, [rbp + 7]
call fcn.14001e89c
nop
lea rcx, [rbp + 7]
call fcn.140007fe4
nop
mov qword [r14], rsi
lea r9, [rbp - 0x11]
mov r8, r14
mov rdx, rdi
call fcn.14000e124
mov ebx, eax
test eax, eax
je 0x14000d54b
call fcn.140008bdc
cmp dword [rax], 3
jbe 0x14000d461
cmp qword [rdi + 0x18], 8
jb 0x14000d51a
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, [0x14002e963]
jmp 0x14000d451
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14000d5bf
call fcn.140008bdc
cmp dword [rax], 3
jbe 0x14000d5b0
cmp qword [rdi + 0x18], 8
jb 0x14000d574
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, [0x14002e963]
mov rcx, rax
call fcn.14000324c
cmp ebx, 0xc0000022
setne sil
lea eax, [rsi + 5]
jmp 0x14000d5c8
mov eax, 0xa
jmp 0x14000d5c8
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000f830
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret