Function at 0x140014458
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor r13d, r13d
mov rbx, rdx
mov dword [rbp + 0x40], r13d
mov esi, r13d
mov r14d, r13d
mov edi, r13d
test rcx, rcx
je 0x1400144ad
mov qword [rsp + 0x20], rdx
mov r9d, 0x2001f
mov rdx, rcx
xor r8d, r8d
mov rcx, 0xffffffff80000003
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400146c2
mov rcx, qword [rbx]
lea rax, [rbp - 0x10]
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersion
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov r15d, 4
lea r12d, [r15 - 3]
test eax, eax
jne 0x14001452a
mov rcx, qword [rbp - 0x10]
lea r9, [rbp + 0x40]
xor r8d, r8d
mov edx, r15d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetKeySecurity]
cmp eax, 0x7a
jne 0x140014520
mov ecx, dword [rbp + 0x40]
call sym.spoolsv.exe_PrvDllAllocSplMem
mov rdi, rax
test rax, rax
je 0x140014520
mov rcx, qword [rbp - 0x10]
lea r9, [rbp + 0x40]
mov r8, rax
mov edx, r15d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetKeySecurity]
test eax, eax
cmove esi, r12d
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
call sym.spoolsv.exe_PrvRevertToPrinterSelf
mov rcx, qword [rbx]
lea r15, [rbx + 0x10]
mov r12, rax
lea r9, [0x14007352c]
lea rax, [rbp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x40], rax
lea rdx, [0x140073680]
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x7001f
mov dword [rsp + 0x20], r13d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x14001467e
test esi, esi
je 0x14001458b
mov rcx, qword [r15]
lea edx, [rax + 4]
mov r8, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetKeySecurity]
mov rcx, qword [rbx]
lea rax, [rbp + 0x50]
mov qword [rsp + 0x40], rax
lea r15, [rbx + 0x18]
mov qword [rsp + 0x38], r15
lea r9, [0x14007352c]
mov qword [rsp + 0x30], r13
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
mov dword [rsp + 0x28], 0x7001f
xor r8d, r8d
mov dword [rsp + 0x20], r13d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x14001467e
test esi, esi
je 0x1400145e4
mov rcx, qword [r15]
lea edx, [rax + 4]
mov r8, rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetKeySecurity]
mov rcx, qword [rbx]
lea r15, [rbx + 8]
mov r9d, 0x2001f
mov qword [rsp + 0x20], r15
xor r8d, r8d
lea rdx, [0x1400736f0]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001467e
mov rcx, qword [r15]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x28], rax
lea rsi, [rbx + 0x446]
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
mov qword [rbx + 0x20], r13
lea rdx, [0x140073590]
mov qword [rbx + 0x28], r13
mov dword [rbx + 0x30], r13d
mov dword [rbp + 0x58], 0x410
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x140014653
mov dword [rbx + 0x24], 1
cmp dword [rbx + 0x24], r13d
je 0x140014678
mov edx, 0x2c
mov word [rbx + 0x854], r13w
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
je 0x140014678
mov word [rax], r13w
mov r14d, 1
test r12, r12
je 0x14001468b
mov rcx, r12
call sym.spoolsv.exe_PrvImpersonatePrinterClient
test rdi, rdi
je 0x140014698
mov rcx, rdi
call sym.spoolsv.exe_PrvDllFreeSplMem
test r14d, r14d
je 0x1400146b8
mov eax, r14d
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbx
call fcn.1400141ac
jmp 0x14001469d
mov qword [rbx], r13
jmp 0x1400146b8