Function at 0x140094c4c
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 [0x1404fd7f0]
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 0x140094d6f
mov qword [r14], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140094c99
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 0x140094d50
cmp eax, 5
jne 0x140094d52
lea rdx, str.SeBackupPrivilege
lea rcx, [rbp - 9]
call fcn.1400d16f0
lea rcx, [rbp - 9]
call fcn.140094f70
lea rcx, [rbp - 9]
mov bl, al
call fcn.14007bf60
test bl, bl
je 0x140094f5f
mov rcx, r14
mov dword [rbp - 0x11], edi
call fcn.140095330
cmp qword [rsi + 0x18], 8
mov rdx, rsi
jb 0x140094d08
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 0x140094dac
cmp dword [rbp - 0x11], 1
je 0x140094e3d
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140156340
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.140135580
lea rcx, [rbp - 0x29]
call fcn.140158e08
jmp 0x140094c89
call fcn.1400abad4
mov r9, rax
cmp dword [rax], 3
jbe 0x140094e36
mov rcx, rsi
call fcn.1400df740
mov qword [rbp - 0x21], rax
lea rdx, [0x140468d61]
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 0x140094e23
mov rcx, rsi
call fcn.1400df740
mov qword [rbp - 0x19], rax
lea rdx, [0x140468d61]
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 0x140094d52
call fcn.1400abad4
mov r9, rax
cmp dword [rax], 3
jbe 0x140094e91
mov rcx, rsi
call fcn.1400df740
mov qword [rbp - 0x19], rax
lea rdx, [0x140468d61]
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.1400d16f0
lea rcx, [rbp - 9]
call fcn.140094f70
lea rcx, [rbp - 9]
call fcn.14007bf60
lea r9, [rbp - 0x11]
mov qword [r14], rdi
mov r8, r14
mov rdx, rsi
mov rcx, r15
call fcn.14014d1e8
mov ebx, eax
test eax, eax
je 0x140094ee4
call fcn.1400abad4
mov r9, rax
cmp dword [rax], 3
jbe 0x140094e36
jmp 0x140094def
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x140094f5f
call fcn.1400abad4
mov r9, rax
cmp dword [rax], 3
jbe 0x140094f4d
mov rcx, rsi
call fcn.1400df740
mov qword [rbp - 0x19], rax
lea rdx, [0x140468d61]
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 0x140094d52
mov eax, 0xa
jmp 0x140094d52