Function at 0x1400c2524
Capabilities:
Delete registry key

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x140477ad0]
xor rax, rsp
mov qword [rbp], rax
mov r12d, r9d
mov r15, r8
mov r14, rdx
mov rbx, rcx
mov rsi, qword [rdx]
xor edi, edi
test rsi, rsi
jne 0x1400c25ac
mov qword [r14], rdi
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400c256f
mov rdx, qword [rbx]
mov qword [rsp + 0x20], r14
mov r9d, r12d
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
jne 0x1400c25dc
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.140123570
add rsp, 0x110
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov byte [rsp + 0x40], dil
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x44], eax
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
lea rcx, [rsp + 0x40]
call fcn.140096a44
jmp 0x1400c255f
cmp eax, 5
jne 0x1400c258d
lea rdx, str.SeBackupPrivilege
lea rcx, [rsp + 0x60]
call fcn.1400aeef0
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.140096094
nop
lea rcx, [rsp + 0x60]
call fcn.14007a7c0
cmp byte [rbp - 0x48], dil
je 0x1400c284b
mov dword [rsp + 0x48], edi
lea r9, [rsp + 0x48]
mov r8, r14
mov rdx, rbx
mov rcx, r15
call fcn.1400964e0
mov esi, eax
test eax, eax
je 0x1400c2695
call fcn.1400a4e1c
cmp dword [rax], 3
jbe 0x1400c2850
cmp qword [rbx + 0x18], 8
jb 0x1400c264b
mov rbx, qword [rbx]
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x40], esi
lea rcx, str.Could_not_open_the_registry_key
mov qword [rsp + 0x58], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
lea rdx, [0x1403efe0e]
mov rcx, rax
call fcn.14000e40c
jmp 0x1400c2850
cmp dword [rsp + 0x48], 1
jne 0x1400c2847
call fcn.1400a4e1c
cmp dword [rax], 3
jbe 0x1400c26fc
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400c26b7
mov rcx, qword [rbx]
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x40], edi
lea rcx, str.Created_a_new_key_where_one_should_have_existed
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
lea rdx, [0x1403efe0e]
mov rcx, rax
call fcn.14000e40c
lea rdx, str.SeRestorePrivilege
lea rcx, [rsp + 0x60]
call fcn.1400aeef0
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x40]
call fcn.140096094
nop
lea rcx, [rsp + 0x60]
call fcn.14007a7c0
mov qword [r14], rdi
lea r9, [rsp + 0x48]
mov r8, r14
mov rdx, rbx
mov rcx, r15
call fcn.1400964e0
mov esi, eax
test eax, eax
je 0x1400c27bc
mov r8d, eax
mov edx, eax
lea rcx, str.RegOpenKeyWithBackup_should_be_able_to_open_whatever_it_created.
call fcn.1402e1a60
call fcn.1400a4e1c
cmp dword [rax], 3
jbe 0x1400c27ae
cmp qword [rbx + 0x18], 8
jb 0x1400c2768
mov rbx, qword [rbx]
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], esi
lea rcx, str.Could_not_re_open_the_registry_key
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
lea rdx, [0x1403efe0e]
mov rcx, rax
call fcn.14000e40c
nop
lea rcx, [rbp - 0x40]
call fcn.14009638c
jmp 0x1400c2850
mov rcx, qword [r14]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov esi, eax
lea rcx, [rbp - 0x40]
call fcn.14009638c
test esi, esi
je 0x1400c284b
call fcn.14007ec1c
call fcn.1400a4e1c
cmp dword [rax], 3
jbe 0x1400c2838
cmp qword [rbx + 0x18], 8
jb 0x1400c27f3
mov rbx, qword [rbx]
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], esi
lea rcx, str.Could_not_delete_the_registry_key
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
lea rdx, [0x1403efe0e]
mov rcx, rax
call fcn.14000e40c
cmp esi, 0xc0000022
setne dil
lea esi, [rdi + 5]
jmp 0x1400c2850
mov esi, edi
jmp 0x1400c2850
mov esi, 0xa
lea rcx, [rbp - 0x80]
call fcn.14009638c
mov eax, esi
jmp 0x1400c258d