Function at 0x14004e90c
Capabilities:
Delete registry key

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x160
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r13
mov rax, qword [0x140123d60]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov r14, rcx
xor r15d, r15d
mov qword [rbp - 0x20], r15
lea rbx, [0x140123fc8]
mov rdx, rbx
cmp qword [reloc.OLEAUT32.dll_VariantInit], 8
cmovae rdx, qword [0x140123fc8]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, 0x3010f
xor r8d, r8d
mov rdi, 0xffffffff80000002
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x14004eb97
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x14004ecde
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
nop dword [rax + rax]
test eax, eax
je 0x14004e9f4
test byte [0x140124ec0], 2
je 0x14004e9f4
mov dword [rbp - 0x18], eax
lea rax, [rbp - 0x18]
mov qword [rbp + 0x40], rax
mov qword [rbp + 0x48], 4
lea rax, [rbp + 0x30]
mov qword [rsp + 0x20], rax
lea r9d, [r15 + 2]
lea rdx, [0x1400d8540]
lea rcx, [0x14011d1c0]
call fcn.14000391c
mov rax, qword [r14 + 8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x14004eb60
mov r13d, 7
mov qword [rbp + 0x48], r13
mov qword [rbp + 0x40], r15
mov word [rbp + 0x30], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbx + 0x10]
lea rcx, [rbp + 0x30]
call fcn.1400046a4
nop
mov qword [rbp + 0x28], r13
mov qword [rbp + 0x20], r15
mov word [rbp + 0x10], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbx + 0x30]
lea rcx, [rbp + 0x10]
call fcn.1400046a4
nop
mov qword [rbp + 8], r13
mov qword [rbp], r15
mov word [rbp - 0x10], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbx + 0x10]
lea rcx, [rbp - 0x10]
call fcn.1400046a4
nop
mov edx, 1
lea r8d, [rdx + 0x5b]
lea rcx, [rbp - 0x10]
call fcn.14000f5e0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbx + 0x30]
lea rcx, [rbp - 0x10]
call fcn.1400070b4
mov qword [rbp - 0x18], r15
lea rdx, [rbp - 0x10]
cmp qword [rbp + 8], 8
cmovae rdx, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x20]
test rcx, rcx
setne al
test al, al
je 0x14004ed95
mov qword [rsp + 0x40], r15
lea rax, [rbp - 0x18]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x20106
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x14004ed40
lea rcx, [rbp - 0x18]
call fcn.140006c64
nop
cmp qword [rbp + 8], 8
jb 0x14004eb17
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
mov qword [rbp + 8], r13
mov qword [rbp], r15
mov word [rbp - 0x10], r15w
cmp qword [rbp + 0x28], 8
jb 0x14004eb3c
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
nop
cmp qword [rbp + 0x48], 8
jb 0x14004eb53
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
mov rbx, qword [rbx]
cmp rbx, qword [r14 + 8]
jne 0x14004ea0a
lea rcx, [rbp - 0x20]
call fcn.140006c64
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.1400bf860
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
cmp eax, 2
jne 0x14004ebf7
cmp qword [rbp - 0x20], r15
jne 0x14004ed0f
cmp qword [reloc.OLEAUT32.dll_VariantInit], 8
cmovae rbx, qword [0x140123fc8]
mov qword [rsp + 0x40], r15
lea rax, [rbp - 0x20]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0xf013f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x14004ec4c
jmp 0x14004e9f4
mov r8d, 5
cmp eax, r8d
jne 0x14004ec95
test byte [0x140124ec0], 2
je 0x14004ec1b
lea rdx, [0x1400d8690]
call fcn.1400086f4
lea rdx, str.Unable_to_access_the_template_index.
lea rcx, [rsp + 0x50]
call fcn.140006cc8
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.14004e2e8
lea rdx, [0x14011a430]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
test byte [0x140124ec0], 2
je 0x14004ec64
mov r8d, eax
lea rdx, [0x1400d8560]
call fcn.1400086f4
lea rdx, str.Unable_to_create_index_registry_key.
lea rcx, [rbp + 0x30]
call fcn.140006cc8
nop
lea rdx, [rbp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.14004e2e8
lea rdx, [0x14011a430]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
test byte [0x140124ec0], 2
je 0x14004ecad
mov r8d, eax
lea rdx, [0x1400d8650]
call fcn.1400086f4
lea rdx, str.Unable_to_open_index_registry_key.
lea rcx, [rsp + 0x50]
call fcn.140006cc8
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.14004e2e8
lea rdx, [0x14011a430]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp + 0x30]
call fcn.140006cc8
nop
lea rdx, [rbp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.1400064e4
lea rdx, [0x140119500]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_assign_an_already_valid_handle.
lea rcx, [rbp + 0x30]
call fcn.140006cc8
nop
lea rdx, [rbp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.1400064e4
lea rdx, [0x140119500]
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll__CxxThrowException
nop
test byte [0x140124ec0], 2
je 0x14004ed64
lea rcx, [rbp - 0x10]
call fcn.140004514
mov r8, rax
mov r9d, edi
lea rdx, [0x1400d8498]
call fcn.1400364e8
lea rdx, str.Unable_to_create_a_template_index_subkey.
lea rcx, [rsp + 0x50]
call fcn.140006cc8
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.14004e2e8
lea rdx, [0x14011a430]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rsp + 0x50]
call fcn.140006cc8
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x60]
call fcn.1400064e4
lea rdx, [0x140119500]
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll__CxxThrowException
int3