Function at 0x1400048f0
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 0x1400110fe
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 0x140004a14
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 0x140004a04
mov r15d, dword [rbp + 0x67]
lea edx, [rax - 0x72]
mov rcx, qword [0x1400c9078]
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 0x14001113b
test rdi, rdi
je 0x1400049fd
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 0x1400049fd
lea r8, [rbp - 0x49]
mov rcx, rdi
lea rdx, [rbp - 1]
call fcn.140001ea0
test eax, eax
jne 0x14001118b
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 0x14001119e
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 0x1400111c7
mov r15, qword [rbp + 0x77]
mov rdi, qword [rsi]
lea rdx, [0x1400a9e40]
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 0x140004b2d
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 0x14001123d
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, [0x1400a9da4]
mov qword [rsp + 0x30], rbx
lea rdx, [0x1400a9e40]
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 0x140004ce3
test r12d, r12d
je 0x140004b92
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 0x140004c4f
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 0x140011299
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, [0x1400a9da4]
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 0x140004ce3
test r12d, r12d
je 0x140004cb0
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, [0x1400a9cc0]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x140004ce3
mov qword [rsi + 0x20], rbx
lea ebx, [rax + 1]
test r15, r15
je 0x140004d73
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 0x1400112f5
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 0x140011311
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 0x140004da0
mov rcx, qword [0x1400c9078]
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 0x140004dbe
mov rcx, qword [0x1400c9078]
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 0x14001112d
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 0x140004924
mov qword [rsi], rbx
mov rcx, rsi
call fcn.14007752c
nop
jmp 0x140004dc6
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 0x1400049b6
test byte [rcx + 0x44], 0x20
je 0x1400049b6
mov rcx, qword [rcx + 0x38]
lea r8, [0x1400aa8c0]
mov edx, 0xa
mov r9d, r15d
call fcn.14001635c
nop
jmp 0x1400049fd
cmp eax, 0xb7
jne 0x1400049fd
mov r13, rdi
jmp 0x1400049f7
cmp eax, 0xc000007c
jne 0x1400111c7
lea r8, [rbp + 0x77]
mov edx, 8
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtOpenProcessToken]
nop dword [rax + rax]
nop
jmp 0x140004a64
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 0x140011220
test byte [rax + 0x44], 0x20
je 0x140011220
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea r8, [0x1400aa900]
mov edx, 0x13
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.140016318
mov rcx, qword [rbp + 0x77]
test rcx, rcx
je 0x140011235
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov r15, rbx
jmp 0x140004a70
cmp dword [rbp + 0x77], ebx
jbe 0x140004b1d
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 0x140004b1d
test byte [rcx + 0x44], 0x20
je 0x140004b1d
mov rcx, qword [rcx + 0x38]
lea r9, [0x1400a9e40]
mov edx, 0xa
lea r8, [0x1400aa9f0]
call fcn.140031e7c
nop
jmp 0x140004b1d
cmp dword [rbp + 0x77], ebx
jbe 0x140004c3f
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 0x140004c3f
test byte [rcx + 0x44], 0x20
je 0x140004c3f
mov rcx, qword [rcx + 0x38]
lea r9, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
mov edx, 0xa
lea r8, [0x1400aa9f0]
call fcn.140031e7c
nop
jmp 0x140004c3f
cmp dword [rbp + 0x77], 2
je 0x140004d2e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
nop
jmp 0x140004d63
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 0x140004d73
test byte [rax + 0x44], 0x20
je 0x140004d73
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c72a8]
lea r8, [0x1400aa900]
mov edx, 0x14
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.140016318
nop
jmp 0x140004d73