Function at 0x140019fd0
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
lea rbp, [rax - 0x7f8]
sub rsp, 0x8e0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14027bbd0]
xor rax, rsp
mov qword [rbp + 0x7d0], rax
mov r12, rcx
xor r8d, r8d
lea rdx, str.GetLastAddPrinter
lea rcx, [rsp + 0x50]
call fcn.140017fc0
nop
mov r9, r12
lea r8, str.lpszPrinter___s
mov edx, 1
lea rcx, [rsp + 0x50]
call fcn.140017c80
xor ebx, ebx
mov edi, ebx
mov esi, ebx
call fcn.14000c310
cmp eax, 6
je 0x14001a151
cmp eax, 0xa
je 0x14001a151
mov ecx, 0x100
mov dword [rsp + 0x40], ecx
mov eax, ecx
add eax, 2
cmp eax, ecx
jb 0x14001a0f3
add ecx, 0x100
mov dword [rsp + 0x40], ecx
test rbx, rbx
je 0x14001a087
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [rsp + 0x40]
mov edx, ecx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbx, rax
test rax, rax
je 0x14001a0c9
mov eax, dword [rsp + 0x40]
shr eax, 1
mov dword [rsp + 0x20], eax
mov r9, rbx
lea r8, [0x1401c6ea8]
xor edx, edx
lea rcx, str.Devices
call qword [sym.imp.KERNEL32.dll_GetProfileStringW]
test eax, eax
je 0x14001a0f3
mov ecx, dword [rsp + 0x40]
jmp 0x14001a060
xor r9d, r9d
lea r8, str.return___08x
lea edx, [r9 + 2]
lea rcx, [rsp + 0x50]
call fcn.140017c80
nop
lea rcx, [rsp + 0x50]
call fcn.140018150
xor eax, eax
jmp 0x14001a26e
mov rdi, rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x14001a13a
mov esi, 1
nop dword [rax + rax]
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cdqe
lea rdi, [rdi + rax*2]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x14001a110
test rbx, rbx
je 0x14001a248
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x14001a248
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001a242
mov dword [rsp + 0x40], 0x208
xor edx, edx
mov r8d, 0x410
lea rcx, [rsp + 0x70]
call fcn.140192cb0
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x70]
mov edx, edi
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
inc edi
test eax, eax
jne 0x14001a1de
lea esi, [rax + 1]
lea rdx, [rsp + 0x70]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x14001a180
cmp esi, 1
jne 0x14001a235
mov dword [rsp + 0x44], 0x450
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x380]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, r12
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea rdx, [0x1401ccfd0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [rbp + 0x380]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14001a248
cmp eax, 2
cmovne esi, ebx
mov r9d, esi
lea r8, str.return___08x
mov edx, 2
lea rcx, [rsp + 0x50]
call fcn.140017c80
nop
lea rcx, [rsp + 0x50]
call fcn.140018150
mov eax, esi
mov rcx, qword [rbp + 0x7d0]
xor rcx, rsp
call fcn.1401945b0
lea r11, [rsp + 0x8e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret