Function at 0x1401c773c
Capabilities:
Delete registry key

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x88]
sub rsp, 0x188
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x14044e770]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov r12d, r9d
mov r13, r8
mov r15, rdx
mov rsi, rcx
xor edi, edi
mov dword [rsp + 0x30], edi
mov r14, qword [rdx]
test r14, r14
je 0x1401c77a2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
mov rcx, r14
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov qword [r15], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x1401c77b2
mov rdx, qword [rsi]
mov qword [rsp + 0x20], r15
mov r9d, r12d
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov dword [rsp + 0x30], eax
test eax, eax
je 0x1401c7b3a
cmp eax, 5
jne 0x1401c7b3a
lea rdx, str.SeBackupPrivilege
lea rcx, [rsp + 0x48]
call fcn.14004a9e4
nop
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x70]
call fcn.14023291c
nop
lea rcx, [rsp + 0x48]
call fcn.14004b500
cmp byte [rbp - 0x38], dil
je 0x1401c7b2a
mov dword [rsp + 0x38], edi
lea r9, [rsp + 0x38]
mov r8, r15
mov rdx, rsi
mov rcx, r13
call fcn.1401c5ae8
mov dword [rsp + 0x30], eax
test eax, eax
je 0x1401c78cf
call fcn.14004acb4
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x1401c78c6
lea rax, str.Could_not_open_the_registry_key
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 0x40
lea rax, [rsp + 0x30]
mov qword [rbp], rax
mov qword [rbp + 8], 4
cmp qword [rsi + 0x18], 8
jb 0x1401c7873
mov rsi, qword [rsi]
lea r14, [0x14030cae0]
mov rbx, rdi
test rsi, rsi
je 0x1401c7892
mov r14, rsi
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rsi + rbx*2], di
jne 0x1401c7889
mov qword [rbp + 0x10], r14
lea eax, [rbx*2 + 2]
mov dword [rbp + 0x18], eax
mov dword [rbp + 0x1c], edi
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14039bacc]
call fcn.140001158
mov edi, dword [rsp + 0x30]
jmp 0x1401c7b2f
cmp dword [rsp + 0x38], 1
jne 0x1401c7b2f
call fcn.14004acb4
mov r10, qword [rax + 8]
lea r14, [0x14030cae0]
or rbx, 0xffffffffffffffff
cmp dword [r10], 3
jbe 0x1401c797a
lea rax, str.Created_a_new_key_where_one_should_have_existed
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 0x60
lea rax, [rsp + 0x30]
mov qword [rbp], rax
mov qword [rbp + 8], 4
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x1401c7929
mov rax, qword [rsi]
mov rdx, r14
mov rcx, rdi
test rax, rax
je 0x1401c7943
mov rdx, rax
mov rcx, rbx
inc rcx
cmp word [rax + rcx*2], di
jne 0x1401c793a
mov qword [rbp + 0x10], rdx
lea eax, [rcx*2 + 2]
mov dword [rbp + 0x18], eax
mov dword [rbp + 0x1c], edi
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14039bacc]
mov rcx, r10
call fcn.140001158
mov dword [rsp + 0x34], 6
lea rdx, str.SeRestorePrivilege
lea rcx, [rsp + 0x68]
call fcn.14004a9e4
nop
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x30]
call fcn.14023291c
nop
lea rcx, [rsp + 0x68]
call fcn.14004b500
mov qword [r15], rdi
lea r9, [rsp + 0x38]
mov r8, r15
mov rdx, rsi
mov rcx, r13
call fcn.1401c5ae8
mov dword [rsp + 0x30], eax
test eax, eax
je 0x1401c7a6d
call fcn.140298678
call fcn.14004acb4
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x1401c7a5b
lea rax, str.Could_not_re_open_the_registry_key
mov qword [rbp + 0x40], rax
mov qword [rbp + 0x48], VarR8FromUI1
lea rax, [rsp + 0x30]
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], 4
cmp qword [rsi + 0x18], 8
jb 0x1401c7a10
mov rsi, qword [rsi]
mov rax, rdi
test rsi, rsi
je 0x1401c7a27
mov r14, rsi
mov rax, rbx
inc rax
cmp word [rsi + rax*2], di
jne 0x1401c7a1e
mov qword [rbp + 0x60], r14
lea eax, [rax*2 + 2]
mov dword [rbp + 0x68], eax
mov dword [rbp + 0x6c], edi
lea rax, [rbp + 0x20]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14039bacc]
call fcn.140001158
mov edi, dword [rsp + 0x30]
lea rcx, [rbp - 0x30]
call fcn.140232dc0
jmp 0x1401c7b2f
mov rcx, qword [r15]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
mov dword [rsp + 0x34], eax
lea rcx, [rbp - 0x30]
call fcn.140232dc0
cmp dword [rsp + 0x34], edi
je 0x1401c7b2a
call fcn.140298678
call fcn.14004acb4
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x1401c7b19
lea rax, str.Could_not_delete_the_registry_key
mov qword [rbp + 0x40], rax
mov qword [rbp + 0x48], 0x44
lea rax, [rsp + 0x34]
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], 4
cmp qword [rsi + 0x18], 8
jb 0x1401c7ace
mov rsi, qword [rsi]
mov rax, rdi
test rsi, rsi
je 0x1401c7ae5
mov r14, rsi
mov rax, rbx
inc rax
cmp word [rsi + rax*2], di
jne 0x1401c7adc
mov qword [rbp + 0x60], r14
lea eax, [rax*2 + 2]
mov dword [rbp + 0x68], eax
mov dword [rbp + 0x6c], edi
lea rax, [rbp + 0x20]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14039bacc]
call fcn.140001158
cmp dword [rsp + 0x34], 0xc0000022
setne dil
add edi, 5
jmp 0x1401c7b2f
mov edi, 0xa
lea rcx, [rbp - 0x70]
call fcn.140232dc0
mov eax, edi
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1402ae860
add rsp, 0x188
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret