Function at 0x140207434
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 [0x1405420e0]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov r12d, r9d
mov r13, r8
mov r15, rdx
mov rsi, rcx
mov r14, qword [rdx]
xor edi, edi
test r14, r14
je 0x1402074a8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
mov rcx, r14
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov qword [r15], rdi
mov rdx, rsi
cmp qword [rsi + 0x18], 8
jb 0x1402074b8
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]
nop dword [rax + rax]
mov dword [rsp + 0x30], eax
test eax, eax
je 0x14020787e
cmp eax, 5
jne 0x14020787e
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rsp + 0x58], xmm0
mov word [rsp + 0x48], di
lea rdx, str.SeBackupPrivilege
lea rcx, [rsp + 0x48]
call fcn.140055574
nop
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x70]
call fcn.1402846ac
nop
lea rcx, [rsp + 0x48]
call fcn.140055f70
cmp byte [rbp - 0x38], dil
je 0x14020786e
mov dword [rsp + 0x38], edi
lea r9, [rsp + 0x38]
mov r8, r15
mov rdx, rsi
mov rcx, r13
call fcn.140204bfc
mov dword [rsp + 0x30], eax
test eax, eax
je 0x1402075ee
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x1402075e5
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 0x140207592
mov rsi, qword [rsi]
lea r14, [0x1403cb630]
mov rbx, rdi
test rsi, rsi
je 0x1402075b1
mov r14, rsi
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rsi + rbx*2], di
jne 0x1402075a8
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, [0x140481d40]
call fcn.140001208
mov edi, dword [rsp + 0x30]
jmp 0x140207873
cmp dword [rsp + 0x38], 1
jne 0x140207873
call fcn.1400550c0
mov r10, qword [rax + 8]
lea r14, [0x1403cb630]
or rbx, 0xffffffffffffffff
cmp dword [r10], 3
jbe 0x140207699
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 0x140207648
mov rax, qword [rsi]
mov rdx, r14
mov rcx, rdi
test rax, rax
je 0x140207662
mov rdx, rax
mov rcx, rbx
inc rcx
cmp word [rax + rcx*2], di
jne 0x140207659
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, [0x140481d40]
mov rcx, r10
call fcn.140001208
mov dword [rsp + 0x34], 6
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rsp + 0x78], xmm0
mov word [rsp + 0x68], di
lea rdx, str.SeRestorePrivilege
lea rcx, [rsp + 0x68]
call fcn.140055574
nop
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x30]
call fcn.1402846ac
nop
lea rcx, [rsp + 0x68]
call fcn.140055f70
mov qword [r15], rdi
lea r9, [rsp + 0x38]
mov r8, r15
mov rdx, rsi
mov rcx, r13
call fcn.140204bfc
mov dword [rsp + 0x30], eax
test eax, eax
je 0x1402077ab
mov r8d, eax
mov edx, eax
lea rcx, str.RegOpenKeyWithBackup_should_be_able_to_open_whatever_it_created.
call fcn.140329e3c
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x140207799
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 0x14020774e
mov rsi, qword [rsi]
mov rax, rdi
test rsi, rsi
je 0x140207765
mov r14, rsi
mov rax, rbx
inc rax
cmp word [rsi + rax*2], di
jne 0x14020775c
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, [0x140481d40]
call fcn.140001208
mov edi, dword [rsp + 0x30]
lea rcx, [rbp - 0x30]
call fcn.140284b60
jmp 0x140207873
mov rcx, qword [r15]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov dword [rsp + 0x34], eax
lea rcx, [rbp - 0x30]
call fcn.140284b60
cmp dword [rsp + 0x34], edi
je 0x14020786e
call fcn.140329e68
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x14020785d
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 0x140207812
mov rsi, qword [rsi]
mov rax, rdi
test rsi, rsi
je 0x140207829
mov r14, rsi
mov rax, rbx
inc rax
cmp word [rsi + rax*2], di
jne 0x140207820
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, [0x140481d40]
call fcn.140001208
cmp dword [rsp + 0x34], 0xc0000022
setne dil
add edi, 5
jmp 0x140207873
mov edi, 0xa
lea rcx, [rbp - 0x70]
call fcn.140284b60
mov eax, edi
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.140356560
add rsp, 0x188
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret