Function at 0x1400052f0
Capabilities:
Delete registry key
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
lea rbp, [rsp - 0x2f]
sub rsp, 0xe8
xor ebx, ebx
mov rsi, rdx
mov dword [rbp + 0x67], ebx
mov r12d, ebx
mov qword [rbp - 0x49], rbx
mov r14d, ebx
mov r13d, ebx
test rcx, rcx
jne 0x14001280c
mov rcx, qword [rsi]
lea rax, [rbp - 0x51]
mov qword [rsp + 0x128], rdi
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersion
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0xe0], r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
lea rdi, [0x1400c82a8]
test eax, eax
jne 0x140005414
mov rcx, qword [rbp - 0x51]
lea r9, [rbp + 0x67]
xor r8d, r8d
lea edx, [rax + 4]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetKeySecurity]
nop dword [rax + rax]
cmp eax, 0x7a
jne 0x140005404
mov r15d, dword [rbp + 0x67]
lea edx, [rax - 0x72]
mov rcx, qword [0x1400ca110]
mov r8d, r15d
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
nop dword [rax + rax]
mov rdi, rax
mov r14, rax
test rax, rax
je 0x140012849
test rdi, rdi
je 0x1400053fd
mov rcx, qword [rbp - 0x51]
lea r9, [rbp + 0x67]
mov r8, rdi
mov edx, 4
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetKeySecurity]
nop dword [rax + rax]
test eax, eax
jne 0x1400053fd
lea r8, [rbp - 0x49]
mov rcx, rdi
lea rdx, [rbp - 1]
call fcn.140002af0
test eax, eax
jne 0x140012899
lea r13, [rbp - 1]
mov r12d, 1
lea rdi, [0x1400c82a8]
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
lea r9, [rbp + 0x77]
mov qword [rbp - 0x61], rbx
mov r8b, 1
mov qword [rbp + 0x77], rbx
mov edx, 4
mov rcx, 0xfffffffffffffffe
call qword [sym.imp.ntdll.dll_NtOpenThreadToken]
nop dword [rax + rax]
test eax, eax
js 0x1400128ac
mov r9d, 8
lea r8, [rbp - 0x61]
mov rcx, 0xfffffffffffffffe
lea edx, [r9 - 3]
call qword [sym.imp.ntdll.dll_NtSetInformationThread]
nop dword [rax + rax]
test eax, eax
js 0x1400128d5
mov r15, qword [rbp + 0x77]
mov rdi, qword [rsi]
lea rdx, [0x1400aae80]
lea rcx, [rbp - 0x61]
mov qword [rbp - 0x69], rbx
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
lea rax, [rbp - 0x61]
mov dword [rbp - 0x31], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x21], rax
mov r9d, 8
mov qword [rbp - 0x29], rdi
lea r8, [rbp - 0x31]
mov dword [rbp - 0x19], 0x140
mov edx, 0x2000000
lea rcx, [rbp - 0x69]
movdqu xmmword [rbp - 0x11], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKeyEx]
nop dword [rax + rax]
test eax, eax
js 0x14000552d
lea rdx, str.SymbolicLinkValue
lea rcx, [rbp - 0x41]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x69]
lea rax, [rbp + 0x77]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x41]
mov dword [rsp + 0x20], ebx
lea r8d, [r9 + 2]
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
nop dword [rax + rax]
cmp eax, 0xc0000034
jne 0x14001294b
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov rcx, qword [rsi]
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x40], rax
lea rdi, [rsi + 0x10]
mov qword [rsp + 0x38], rdi
lea r9, [0x1400aade4]
mov qword [rsp + 0x30], rbx
lea rdx, [0x1400aae80]
mov dword [rsp + 0x28], 0x7001f
xor r8d, r8d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x1400056e3
test r12d, r12d
je 0x140005592
mov rcx, qword [rdi]
lea edx, [rax + 4]
mov r8, r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetKeySecurity]
nop dword [rax + rax]
mov rdi, qword [rsi]
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
lea rcx, [rbp - 0x41]
mov qword [rbp - 0x69], rbx
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
lea rax, [rbp - 0x41]
mov dword [rbp - 0x31], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x21], rax
mov r9d, 8
mov qword [rbp - 0x29], rdi
lea r8, [rbp - 0x31]
mov dword [rbp - 0x19], 0x140
mov edx, 0x2000000
lea rcx, [rbp - 0x69]
movdqu xmmword [rbp - 0x11], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKeyEx]
nop dword [rax + rax]
test eax, eax
js 0x14000564f
lea rdx, str.SymbolicLinkValue
lea rcx, [rbp - 0x61]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x69]
lea rax, [rbp + 0x77]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x61]
mov dword [rsp + 0x20], ebx
lea r8d, [r9 + 2]
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
nop dword [rax + rax]
cmp eax, 0xc0000034
jne 0x1400129a7
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov rcx, qword [rsi]
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x40], rax
lea rdi, [rsi + 0x18]
mov qword [rsp + 0x38], rdi
lea r9, [0x1400aade4]
mov qword [rsp + 0x30], rbx
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
mov dword [rsp + 0x28], 0x7001f
xor r8d, r8d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x1400056e3
test r12d, r12d
je 0x1400056b0
mov rcx, qword [rdi]
lea edx, [rax + 4]
mov r8, r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetKeySecurity]
nop dword [rax + rax]
mov rcx, qword [rsi]
lea rax, [rsi + 8]
mov r9d, 0x2001f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x1400aad00]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x1400056e3
mov qword [rsi + 0x20], rbx
lea ebx, [rax + 1]
test r15, r15
je 0x140005773
mov qword [rbp - 0x61], r15
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov r9d, 4
lea r8, [rbp + 0x77]
mov edi, eax
mov rcx, r15
lea rax, [rbp - 0x69]
mov qword [rsp + 0x20], rax
lea edx, [r9 + 4]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetTokenInformation]
nop dword [rax + rax]
mov ecx, edi
test eax, eax
jne 0x140012a03
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov r9d, 8
lea r8, [rbp - 0x61]
mov rcx, 0xfffffffffffffffe
lea edx, [r9 - 3]
call qword [sym.imp.ntdll.dll_NtSetInformationThread]
nop dword [rax + rax]
test eax, eax
js 0x140012a1f
mov rcx, qword [rbp - 0x61]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov r15, qword [rsp + 0xe0]
mov rdi, qword [rsp + 0x128]
test r14, r14
je 0x1400057a0
mov rcx, qword [0x1400ca110]
mov r8, r14
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov r8, qword [rbp - 0x49]
test r8, r8
je 0x1400057be
mov rcx, qword [0x1400ca110]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
test ebx, ebx
je 0x14001283b
mov eax, ebx
add rsp, 0xe8
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret
mov rdx, rcx
mov qword [rsp + 0x20], rsi
mov rcx, 0xffffffff80000003
mov r9d, 0x2001f
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140005324
mov qword [rsi], rbx
mov rcx, rsi
call fcn.140078790
nop
jmp 0x1400057c6
mov ecx, 8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c82a8]
lea rdx, [0x1400c82a8]
cmp rcx, rdx
je 0x1400053b6
test byte [rcx + 0x44], 0x20
je 0x1400053b6
mov rcx, qword [rcx + 0x38]
lea r8, [0x1400ab930]
mov edx, 0xa
mov r9d, r15d
call fcn.140016ccc
nop
jmp 0x1400053fd
cmp eax, 0xb7
jne 0x1400053fd
mov r13, rdi
jmp 0x1400053f7
cmp eax, 0xc000007c
jne 0x1400128d5
lea r8, [rbp + 0x77]
mov edx, 8
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtOpenProcessToken]
nop dword [rax + rax]
nop
jmp 0x140005464
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov rax, qword [0x1400c82a8]
cmp rax, rdi
je 0x14001292e
test byte [rax + 0x44], 0x20
je 0x14001292e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c82a8]
lea r8, [0x1400ab970]
mov edx, 0x13
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.140016c88
mov rcx, qword [rbp + 0x77]
test rcx, rcx
je 0x140012943
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov r15, rbx
jmp 0x140005470
cmp dword [rbp + 0x77], ebx
jbe 0x14000551d
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov rcx, qword [0x1400c82a8]
lea rax, [0x1400c82a8]
cmp rcx, rax
je 0x14000551d
test byte [rcx + 0x44], 0x20
je 0x14000551d
mov rcx, qword [rcx + 0x38]
lea r9, [0x1400aae80]
mov edx, 0xa
lea r8, [0x1400abae8]
call fcn.14003304c
nop
jmp 0x14000551d
cmp dword [rbp + 0x77], ebx
jbe 0x14000563f
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov rcx, qword [0x1400c82a8]
lea rax, [0x1400c82a8]
cmp rcx, rax
je 0x14000563f
test byte [rcx + 0x44], 0x20
je 0x14000563f
mov rcx, qword [rcx + 0x38]
lea r9, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
mov edx, 0xa
lea r8, [0x1400abae8]
call fcn.14003304c
nop
jmp 0x14000563f
cmp dword [rbp + 0x77], 2
je 0x14000572e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
nop
jmp 0x140005763
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov rax, qword [0x1400c82a8]
lea rdx, [0x1400c82a8]
cmp rax, rdx
je 0x140005773
test byte [rax + 0x44], 0x20
je 0x140005773
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c82a8]
lea r8, [0x1400ab970]
mov edx, 0x14
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.140016c88
nop
jmp 0x140005773