Function at 0x140021730
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1fe0]
mov eax, 0x20e0
call fcn.1400ad9b0
sub rsp, rax
movaps xmmword [rsp + 0x20d0], xmm6
mov rax, qword [0x1400e9010]
xor rax, rsp
mov qword [rbp + 0x1fc0], rax
mov r12d, r9d
mov r13, r8
mov r14, rdx
mov qword [rsp + 0x48], rdx
xor esi, esi
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x80], xmm0
movdqa xmm6, xmmword [0x1400ca5c0]
movdqu xmmword [rbp - 0x70], xmm6
mov word [rbp - 0x80], si
mov dword [rsp + 0x50], 0x4d36e968
mov dword [rsp + 0x54], 0x11cee325
mov dword [rsp + 0x58], 0x8c1bf
mov dword [rsp + 0x5c], 0x1803e12b
lea r9d, [rsi + 2]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14002180c
xorps xmm0, xmm0
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], rsi
mov qword [r14 + 0x18], rsi
mov rbx, rax
nop dword [rax]
inc rbx
cmp word [rsi + rbx*2], 0
jne 0x1400217f0
mov r8, rbx
xor edx, edx
mov rcx, r14
call fcn.14001eb50
jmp 0x140021a55
mov dword [rbp - 0x60], 0x20
mov r15d, esi
lea r8, [rbp - 0x60]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140021a2e
mov rbx, 0xffffffffffffffff
nop dword [rax]
nop dword [rax + rax]
mov dword [rsp + 0x44], 0x800
mov dword [rsp + 0x48], 1
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x40]
call sub.VCRUNTIME140.dll_memset
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x800
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
mov r8d, 1
lea rdx, [rbp - 0x60]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x140021a0c
lea rdx, [rbp - 0x40]
call fcn.140021590
cmp eax, 0x8086
jne 0x140021a0c
cmp r12d, 9
jne 0x1400218e6
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
mov r8d, r12d
lea rdx, [rbp - 0x60]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
mov dword [rsp + 0x28], 0x20019
mov dword [rsp + 0x20], 2
xor r9d, r9d
lea r8d, [r9 + 1]
lea rdx, [rbp - 0x60]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140021a0c
mov dword [rsp + 0x44], 0x800
mov dword [rsp + 0x48], 1
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp + 0xfc0]
call sub.VCRUNTIME140.dll_memset
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xfc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, r13
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021a03
cmp dword [rsp + 0x48], 1
jne 0x140021a03
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
lea rax, [rbp + 0xfc0]
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x1400219a0
lea rdx, [rbp + 0xfc0]
lea rcx, [rsp + 0x60]
call fcn.14001eb50
nop
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
setae r9b
cmovae rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x70]
lea r8, [rdx + rax*2]
lea rdx, [rsp + 0x60]
test r9b, r9b
cmovne rdx, qword [rsp + 0x60]
sub r8, rdx
sar r8, 1
lea rcx, [rbp - 0x80]
call fcn.14001ea10
nop
lea rcx, [rsp + 0x60]
call fcn.140005140
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc r15d
lea r8, [rbp - 0x60]
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x140021840
movdqu xmm6, xmmword [rbp - 0x70]
xor esi, esi
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
movups xmm0, xmmword [rbp - 0x80]
movups xmmword [r14], xmm0
movups xmmword [r14 + 0x10], xmm6
movdqa xmm0, xmmword [0x1400ca5c0]
movdqu xmmword [rbp - 0x70], xmm0
mov word [rbp - 0x80], si
lea rcx, [rbp - 0x80]
call fcn.140005140
mov rax, r14
mov rcx, qword [rbp + 0x1fc0]
xor rcx, rsp
call fcn.1400a6140
mov rbx, qword [rsp + 0x2120]
movaps xmm6, xmmword [rsp + 0x20d0]
add rsp, 0x20e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret