Function at 0x14009496c
Capabilities:
Delete registry key

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0xa8
mov rax, qword [0x1404fa650]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rax, qword [rdx]
xor edi, edi
mov ebx, r9d
mov r15, r8
mov r14, rdx
mov rsi, rcx
test rax, rax
jne 0x140094a8f
mov qword [r14], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x1400949b9
mov rdx, qword [rsi]
mov r9d, ebx
mov qword [rsp + 0x20], r14
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140094a70
cmp eax, 5
jne 0x140094a72
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp - 9]
call fcn.1400d71b0
lea rcx, [rbp - 9]
call fcn.140094c90
lea rcx, [rbp - 9]
mov bl, al
call fcn.14007bc80
test bl, bl
je 0x140094c7f
mov rcx, r14
mov dword [rbp - 0x11], edi
call fcn.140095050
cmp qword [rsi + 0x18], 8
mov rdx, rsi
jb 0x140094a28
mov rdx, qword [rsi]
lea rcx, [rbp - 0x11]
xor r9d, r9d
mov qword [rsp + 0x40], rcx
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov rcx, r15
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 4
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x140094acc
cmp dword [rbp - 0x11], 1
je 0x140094b5d
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140157600
add rsp, 0xa8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov qword [rbp - 0x11], rax
mov byte [rbp - 0x29], dil
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rbp - 0x25], eax
lea rdx, [rbp - 0x11]
mov rax, qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea rcx, [rbp - 0x21]
mov qword [rbp - 0x21], rax
call fcn.1401366c0
lea rcx, [rbp - 0x29]
call fcn.14015a0c8
jmp 0x1400949a9
call fcn.1400abd44
mov r9, rax
cmp dword [rax], 3
jbe 0x140094b56
mov rcx, rsi
call fcn.1400c75e0
mov qword [rbp - 0x21], rax
lea rdx, [0x1404665e4]
lea rax, str.Could_not_open_the_registry_key
mov qword [rbp - 0x19], rax
lea rax, [rbp - 0x21]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x19]
jmp 0x140094b43
mov rcx, rsi
call fcn.1400c75e0
mov qword [rbp - 0x19], rax
lea rdx, [0x1404665e4]
lea rax, str.Could_not_re_open_the_registry_key
mov qword [rbp - 0x21], rax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x21]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rcx, r9
mov dword [rbp - 0x29], ebx
call fcn.140003b38
mov eax, ebx
jmp 0x140094a72
call fcn.1400abd44
mov r9, rax
cmp dword [rax], 3
jbe 0x140094bb1
mov rcx, rsi
call fcn.1400c75e0
mov qword [rbp - 0x19], rax
lea rdx, [0x1404665e4]
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov dword [rbp - 0x29], edi
mov qword [rbp - 0x21], rax
xor r8d, r8d
lea rax, [rbp - 0x19]
mov rcx, r9
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
call fcn.140003b38
lea rdx, str.SeRestorePrivilege
lea rcx, [rbp - 9]
call fcn.1400d71b0
lea rcx, [rbp - 9]
call fcn.140094c90
lea rcx, [rbp - 9]
call fcn.14007bc80
lea r9, [rbp - 0x11]
mov qword [r14], rdi
mov r8, r14
mov rdx, rsi
mov rcx, r15
call fcn.14014e668
mov ebx, eax
test eax, eax
je 0x140094c04
call fcn.1400abd44
mov r9, rax
cmp dword [rax], 3
jbe 0x140094b56
jmp 0x140094b0f
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x140094c7f
call fcn.1400abd44
mov r9, rax
cmp dword [rax], 3
jbe 0x140094c6d
mov rcx, rsi
call fcn.1400c75e0
mov qword [rbp - 0x19], rax
lea rdx, [0x1404665e4]
lea rax, str.Could_not_delete_the_registry_key
mov dword [rbp - 0x29], ebx
mov qword [rbp - 0x21], rax
xor r8d, r8d
lea rax, [rbp - 0x19]
mov rcx, r9
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
call fcn.140003b38
cmp ebx, 0xc0000022
setne dil
lea eax, [rdi + 5]
jmp 0x140094a72
mov eax, 0xa
jmp 0x140094a72