Function at 0x140001c60
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x70
mov rdi, rcx
call fcn.140002288
and qword [rbp - 0x38], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
nop dword [rax + rax]
lea r8, [rbp - 0x38]
mov edx, SHCreateMemStream
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
nop dword [rax + rax]
test eax, eax
jne 0x140001ccc
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edx, ax
or edx, 0x80070000
test eax, eax
cmovle edx, eax
test edx, edx
js 0x140001edf
mov rbx, qword [rbp - 0x38]
lea rax, [rbp - 0x40]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x38]
mov rcx, rbx
lea edx, [r9 + 0xe]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
nop dword [rax + rax]
test eax, eax
je 0x140001d03
cmp dword [rbp + 0x38], 2
jne 0x140001d03
mov byte [rdi], 1
test rbx, rbx
je 0x140001d17
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov al, byte [rdi]
lea rdx, str.SystemCurrentControlSetControlPrint
neg al
mov rcx, 0xffffffff80000002
lea rax, [rbp - 0x38]
sbb r9d, r9d
mov qword [rsp + 0x20], rax
and r9d, 2
xor r8d, r8d
inc r9d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
je 0x140001d71
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edx, ax
or edx, 0x80070000
test eax, eax
cmovle edx, eax
test edx, edx
js 0x140001f0f
mov rbx, qword [rbp - 0x38]
lea rsi, [rdi + 0xd0]
lea rax, [rbp - 0x28]
cmp rsi, rax
je 0x140001da6
mov rcx, qword [rsi]
mov r14, rbx
xor ebx, ebx
cmp r14, rcx
je 0x140001dba
test rcx, rcx
je 0x140001da3
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov qword [rsi], r14
test rbx, rbx
je 0x140001dba
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rsi]
lea rax, [rbp - 0x40]
and dword [rbp + 0x38], 0
lea rdx, str.EnableJavaScriptDebugging
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp + 0x38]
mov dword [rbp - 0x40], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
test eax, eax
jne 0x140001e00
mov eax, dword [rbp + 0x38]
mov dword [rdi + 0xc8], eax
cmp dword [rdi + 0xc8], 1
lea rcx, [rdi + 0x58]
sete al
mov byte [rdi + 3], al
cmp qword [rcx + 0x18], 8
jb 0x140001e1b
mov rcx, qword [rcx]
xor r8d, r8d
lea rdx, [rbp - 0x30]
call qword [sym.imp.WINSPOOL.DRV_OpenPrinterW]
nop dword [rax + rax]
test eax, eax
jne 0x140001e50
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edx, ax
or edx, 0x80070000
test eax, eax
cmovle edx, eax
test edx, edx
js 0x140001eaf
mov rbx, qword [rbp - 0x30]
lea rax, [rbp + 0x38]
add rdi, 0xa8
cmp rdi, rax
je 0x140001e85
mov rcx, qword [rdi]
mov rsi, rbx
xor ebx, ebx
cmp rsi, rcx
je 0x140001e99
test rcx, rcx
je 0x140001e82
call qword [sym.imp.WINSPOOL.DRV_ClosePrinter]
nop dword [rax + rax]
mov qword [rdi], rsi
test rbx, rbx
je 0x140001e99
mov rcx, rbx
call qword [sym.imp.WINSPOOL.DRV_ClosePrinter]
nop dword [rax + rax]
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
lea r9, str.printscanprintwdk_toolsjsconstraintdebugjsprintconstraintdebug.cpp
mov dword [rsp + 0x20], 0x6a
lea r8, str.Unable_to_Open_given_Printer
lea rcx, [rbp - 0x20]
call fcn.1400010b4
lea rdx, [0x14000ad38]
lea rcx, [rbp - 0x20]
call sub.msvcrt.dll__CxxThrowException
int3
lea r9, str.printscanprintwdk_toolsjsconstraintdebugjsprintconstraintdebug.cpp
mov dword [rsp + 0x20], 0x128
lea r8, str.OpenProcessToken_function_failed
lea rcx, [rbp - 0x20]
call fcn.1400010b4
lea rdx, [0x14000ad38]
lea rcx, [rbp - 0x20]
call sub.msvcrt.dll__CxxThrowException
int3
lea r9, str.printscanprintwdk_toolsjsconstraintdebugdebugregistrykey.cpp
mov dword [rsp + 0x20], 0x2c
lea r8, str.Failed_to_open_print_print_registry_key
lea rcx, [rbp - 0x20]
call fcn.1400010b4
lea rdx, [0x14000ad38]
lea rcx, [rbp - 0x20]
call sub.msvcrt.dll__CxxThrowException
int3