Function at 0x140006140
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 0x140013e0c
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, [0x1400c72a8]
test eax, eax
jne 0x140006264
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 0x140006254
mov r15d, dword [rbp + 0x67]
lea edx, [rax - 0x72]
mov rcx, qword [0x1400c9130]
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 0x140013e49
test rdi, rdi
je 0x14000624d
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 0x14000624d
lea r8, [rbp - 0x49]
mov rcx, rdi
lea rdx, [rbp - 1]
call fcn.1400030a0
test eax, eax
jne 0x140013e99
lea r13, [rbp - 1]
mov r12d, 1
lea rdi, [0x1400c72a8]
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 0x140013eac
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 0x140013ed5
mov r15, qword [rbp + 0x77]
mov rdi, qword [rsi]
lea rdx, [0x1400a9c30]
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 0x14000637d
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 0x140013f4b
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, [0x1400a9d14]
mov qword [rsp + 0x30], rbx
lea rdx, [0x1400a9c30]
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 0x140006533
test r12d, r12d
je 0x1400063e2
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 0x14000649f
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 0x140013fa7
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, [0x1400a9d14]
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 0x140006533
test r12d, r12d
je 0x140006500
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, [0x1400a9d80]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x140006533
mov qword [rsi + 0x20], rbx
lea ebx, [rax + 1]
test r15, r15
je 0x1400065c3
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 0x140014003
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 0x14001401f
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 0x1400065f0
mov rcx, qword [0x1400c9130]
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 0x14000660e
mov rcx, qword [0x1400c9130]
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 0x140013e3b
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 0x140006174
mov qword [rsi], rbx
mov rcx, rsi
call fcn.140077c20
nop
jmp 0x140006616
mov ecx, 8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea rdx, [0x1400c72a8]
cmp rcx, rdx
je 0x140006206
test byte [rcx + 0x44], 0x20
je 0x140006206
mov rcx, qword [rcx + 0x38]
lea r8, [0x1400aa7e0]
mov edx, 0xa
mov r9d, r15d
call fcn.14001c23c
nop
jmp 0x14000624d
cmp eax, 0xb7
jne 0x14000624d
mov r13, rdi
jmp 0x140006247
cmp eax, 0xc000007c
jne 0x140013ed5
lea r8, [rbp + 0x77]
mov edx, 8
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtOpenProcessToken]
nop dword [rax + rax]
nop
jmp 0x1400062b4
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 [0x1400c72a8]
cmp rax, rdi
je 0x140013f2e
test byte [rax + 0x44], 0x20
je 0x140013f2e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea r8, [0x1400aa820]
mov edx, 0x13
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.14001c1f8
mov rcx, qword [rbp + 0x77]
test rcx, rcx
je 0x140013f43
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov r15, rbx
jmp 0x1400062c0
cmp dword [rbp + 0x77], ebx
jbe 0x14000636d
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea rax, [0x1400c72a8]
cmp rcx, rax
je 0x14000636d
test byte [rcx + 0x44], 0x20
je 0x14000636d
mov rcx, qword [rcx + 0x38]
lea r9, [0x1400a9c30]
mov edx, 0xa
lea r8, [0x1400aab00]
call fcn.14003249c
nop
jmp 0x14000636d
cmp dword [rbp + 0x77], ebx
jbe 0x14000648f
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea rax, [0x1400c72a8]
cmp rcx, rax
je 0x14000648f
test byte [rcx + 0x44], 0x20
je 0x14000648f
mov rcx, qword [rcx + 0x38]
lea r9, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
mov edx, 0xa
lea r8, [0x1400aab00]
call fcn.14003249c
nop
jmp 0x14000648f
cmp dword [rbp + 0x77], 2
je 0x14000657e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
nop
jmp 0x1400065b3
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 [0x1400c72a8]
lea rdx, [0x1400c72a8]
cmp rax, rdx
je 0x1400065c3
test byte [rax + 0x44], 0x20
je 0x1400065c3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea r8, [0x1400aa820]
mov edx, 0x14
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.14001c1f8
nop
jmp 0x1400065c3