Function at 0x14000d438
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 [0x140043db0]
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 0x14000d49c
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.14000e2f0
mov qword [r14], rsi
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000d4ac
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 0x14000d6d6
cmp eax, 5
jne 0x14000d6d8
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp + 7]
call fcn.140007720
nop
lea rcx, [rbp + 7]
call fcn.14001eadc
mov bl, al
lea rcx, [rbp + 7]
call fcn.1400082a4
nop
test bl, bl
je 0x14000d6cf
mov dword [rbp - 0x11], esi
lea r9, [rbp - 0x11]
mov r8, r14
mov rdx, rdi
call fcn.14000e234
mov ebx, eax
test eax, eax
je 0x14000d578
call fcn.140008d5c
cmp dword [rax], 3
jbe 0x14000d571
cmp qword [rdi + 0x18], 8
jb 0x14000d535
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, [0x14003a433]
mov qword [rsp + 0x20], rcx
mov dword [rbp - 0x19], ebx
mov rcx, rax
call fcn.14000324c
mov eax, ebx
jmp 0x14000d6d8
cmp dword [rbp - 0x11], 1
jne 0x14000d6d6
call fcn.140008d5c
cmp dword [rax], 3
jbe 0x14000d5d5
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14000d599
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, [0x14003a433]
mov rcx, rax
call fcn.14000324c
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp + 7]
call fcn.140007720
nop
lea rcx, [rbp + 7]
call fcn.14001eadc
nop
lea rcx, [rbp + 7]
call fcn.1400082a4
nop
mov qword [r14], rsi
lea r9, [rbp - 0x11]
mov r8, r14
mov rdx, rdi
call fcn.14000e234
mov ebx, eax
test eax, eax
je 0x14000d65b
call fcn.140008d5c
cmp dword [rax], 3
jbe 0x14000d571
cmp qword [rdi + 0x18], 8
jb 0x14000d62a
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, [0x14003a433]
jmp 0x14000d561
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14000d6cf
call fcn.140008d5c
cmp dword [rax], 3
jbe 0x14000d6c0
cmp qword [rdi + 0x18], 8
jb 0x14000d684
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, [0x14003a433]
mov rcx, rax
call fcn.14000324c
cmp ebx, 0xc0000022
setne sil
lea eax, [rsi + 5]
jmp 0x14000d6d8
mov eax, 0xa
jmp 0x14000d6d8
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14000f940
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret