Function at 0x140023f00
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 + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14026fdb0]
xor rax, rsp
mov qword [rbp + 0x7d0], rax
mov r12, rcx
xor r8d, r8d
lea rdx, str.GetLastAddPrinter
lea rcx, [rsp + 0x58]
call fcn.140001190
nop
mov r9, r12
lea r8, str.lpszPrinter___s
mov edx, 1
lea rcx, [rsp + 0x58]
call fcn.140001370
xor ebx, ebx
mov qword [rsp + 0x48], rbx
xor edx, edx
mov r8d, 0x410
lea rcx, [rsp + 0x70]
call fcn.14019d7c0
mov dword [rsp + 0x40], ebx
mov edi, ebx
mov esi, ebx
call fcn.1400166e0
cmp eax, 6
je 0x1400240a1
cmp eax, 0xa
je 0x1400240a1
mov ecx, pe_nt_image_headers64
mov dword [rsp + 0x40], ecx
mov eax, ecx
nop dword [rax + rax]
add eax, 2
cmp eax, ecx
jb 0x140024043
add ecx, 0x100
mov dword [rsp + 0x40], ecx
test rbx, rbx
je 0x140023fd7
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 0x140024019
mov eax, dword [rsp + 0x40]
shr eax, 1
mov dword [rsp + 0x20], eax
mov r9, rbx
lea r8, [0x1402209ac]
xor edx, edx
lea rcx, [0x140220a70]
call qword [sym.imp.KERNEL32.dll_GetProfileStringW]
test eax, eax
je 0x140024043
mov ecx, dword [rsp + 0x40]
jmp 0x140023fb0
xor r9d, r9d
lea r8, str.return___08x
lea edx, [r9 + 2]
lea rcx, [rsp + 0x58]
call fcn.140001370
nop
lea rcx, [rsp + 0x58]
call fcn.140001320
xor eax, eax
jmp 0x1400241be
mov rdi, rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x14002408a
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 0x140024060
test rbx, rbx
je 0x140024198
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x140024198
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 0x140024192
mov dword [rsp + 0x40], 0x208
xor edx, edx
mov r8d, 0x410
lea rcx, [rsp + 0x70]
call fcn.14019d7c0
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 0x14002412e
lea esi, [rax + 1]
lea rdx, [rsp + 0x70]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x1400240d0
cmp esi, 1
jne 0x140024185
mov dword [rsp + 0x50], 0x450
lea rax, [rsp + 0x50]
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, [0x140220a6c]
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 0x140024198
cmp eax, 2
cmovne esi, ebx
mov r9d, esi
lea r8, str.return___08x
mov edx, 2
lea rcx, [rsp + 0x58]
call fcn.140001370
nop
lea rcx, [rsp + 0x58]
call fcn.140001320
mov eax, esi
mov rcx, qword [rbp + 0x7d0]
xor rcx, rsp
call fcn.140198b40
lea r11, [rsp + 0x8e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret