Function at 0x140023af0
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbx
push rsi
sub rsp, 0x678
mov rax, qword [0x1400e71f0]
xor rax, rsp
mov qword [rsp + 0x660], rax
xor ebx, ebx
test rdx, rdx
mov rsi, rdx
jne 0x140023b1d
xor eax, eax
jmp 0x140023e26
lea rax, [rsp + 0x48]
mov rdx, rcx
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x670], r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov r12d, 1
test eax, eax
jne 0x140023e1b
lea rcx, [rsp + 0x260]
xor edx, edx
mov r8d, 0x1f8
mov qword [rsp + 0x698], rbp
call fcn.140080d50
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x260]
mov r9d, 0xfc
xor edx, edx
xor ebp, ebp
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x140023e08
mov qword [rsp + 0x6a0], rdi
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x260]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140023d8e
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x1f8
call fcn.140080d50
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x60]
mov r9d, 0xfc
xor edx, edx
xor edi, edi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x140023d83
nop
nop
nop
nop
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x50]
lea rdx, [rsp + 0x60]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140023d4a
lea rcx, [rsp + 0x460]
xor edx, edx
mov r8d, 0x1f8
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x30], 0x1f8
call fcn.140080d50
mov rcx, qword [rsp + 0x50]
lea r11, [rsp + 0x30]
lea rax, [rsp + 0x460]
mov qword [rsp + 0x28], r11
lea r9, [rsp + 0x40]
lea rdx, str.DeviceDesc
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140023cb3
lea rcx, [rsp + 0x460]
call fcn.14001d0e0
test eax, eax
jne 0x140023cb3
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140023d4a
mov rcx, qword [rsp + 0x50]
xor eax, eax
lea r9, [rsp + 0x40]
mov dword [rsp + 0x58], eax
mov byte [rsp + 0x5c], al
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
lea rdx, str.PrinterID
xor r8d, r8d
mov dword [rsp + 0x40], 3
mov dword [rsp + 0x30], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140023d3b
movzx eax, byte [rsi]
mov r9d, dword [rsp + 0x30]
xor edx, edx
cmp byte [rsp + 0x58], al
jne 0x140023d34
lea rax, [rsp + 0x58]
mov r8, rsi
lea rcx, [rsp + 0x58]
sub r8, rax
nop
cmp edx, r9d
jge 0x140023d34
add rcx, r12
add edx, r12d
movzx eax, byte [r8 + rcx]
cmp byte [rcx], al
je 0x140023d20
cmp edx, r9d
cmove ebx, r12d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x140023d6f
mov rcx, qword [rsp + 0x38]
add edi, r12d
lea r8, [rsp + 0x60]
mov edx, edi
mov r9d, 0xfc
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x140023c10
jmp 0x140023d7f
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test ebx, ebx
jne 0x140023db6
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
add ebp, r12d
lea r8, [rsp + 0x260]
mov edx, ebp
mov r9d, 0xfc
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x140023ba0
jmp 0x140023e00
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x60]
mov r9d, 0xfc
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, 0x103
jne 0x140023df5
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x260]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x140023e00
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rsp + 0x6a0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbp, qword [rsp + 0x698]
mov eax, r12d
mov r12, qword [rsp + 0x670]
mov rcx, qword [rsp + 0x660]
xor rcx, rsp
call fcn.140081050
add rsp, 0x678
pop rsi
pop rbx
ret