Function at 0x140016ad0
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push r12
push r13
push r14
lea rbp, [rsp - 0x530]
sub rsp, 0x630
mov rax, qword [0x1400a3080]
xor rax, rsp
mov qword [rbp + 0x510], rax
xor r13d, r13d
mov qword [rsp + 0x60], rdx
mov dword [rcx], r13d
mov rsi, r8
mov qword [rsp + 0x58], rcx
xor r8d, r8d
mov dword [rdx], r13d
lea rcx, [0x140092990]
lea r9d, [r13 + 0x12]
mov dword [rsp + 0x40], r13d
xor edx, edx
mov dword [rbp + 0x300], 8
mov r12d, r13d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140016b4d
mov dword [rsi], 0xffffd8f1
xor eax, eax
jmp 0x14001706e
mov qword [rsp + 0x678], rbx
lea rax, [rbp - 0x58]
mov qword [rsp + 0x628], rdi
lea r8, [0x140092990]
mov qword [rsp + 0x620], r15
xor r9d, r9d
xor edx, edx
mov dword [rbp - 0x58], 0x20
mov rcx, r14
mov qword [rbp - 0x40], r13
mov r15d, r13d
mov dword [rbp - 0x78], 0x20
mov edi, r13d
mov qword [rbp - 0x60], r13
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x140016c52
mov r12d, 1
nop dword [rax]
lea r9, [rbp - 0x78]
mov rcx, r14
lea r8, [0x140092918]
mov ebx, r13d
lea rdx, [rbp - 0x58]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceAlias]
test eax, eax
je 0x140016bdc
cmp dword [rbp - 0x64], ebx
je 0x140016bdc
test byte [rbp - 0x64], 4
cmove ebx, r12d
lea r9, [rbp - 0x78]
mov rcx, r14
lea r8, [0x140091f18]
lea rdx, [rbp - 0x58]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceAlias]
test eax, eax
je 0x140016c06
mov eax, dword [rbp - 0x64]
test eax, eax
je 0x140016c06
test al, 4
jne 0x140016c06
or ebx, 2
lea eax, [rdi + 1]
mov dword [rbp - 0x58], 0x20
test ebx, ebx
mov qword [rbp - 0x40], r13
lea r8, [0x140092990]
mov dword [rbp - 0x78], 0x20
cmovne eax, edi
mov qword [rbp - 0x60], r13
mov edi, eax
inc r15d
lea rax, [rbp - 0x58]
mov r9d, r15d
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x140016bb0
mov r12d, r13d
sub r15d, edi
mov ecx, 0x40
lea eax, [r15*8]
movsxd rdx, eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov qword [rsp + 0x50], rax
mov rbx, rax
test rax, rax
jne 0x140016c93
test r14, r14
je 0x140016c86
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov dword [rsi], 0xffffd8f8
xor eax, eax
jmp 0x140017056
xor edi, edi
mov dword [rbp - 0x58], 0x20
lea rax, [rbp - 0x58]
mov qword [rbp - 0x40], rdi
xor r9d, r9d
mov qword [rbp - 0x60], rdi
lea r8, [0x140092990]
mov qword [rbp - 0x80], rdi
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, r14
mov dword [rbp - 0x78], 0x20
mov dword [rsp + 0x68], 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x140017035
mov r12, rbx
lea r9, [rbp - 0x78]
mov rcx, r14
lea r8, [0x140092918]
mov ebx, edi
lea rdx, [rbp - 0x58]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceAlias]
test eax, eax
je 0x140016d10
cmp dword [rbp - 0x64], 0
je 0x140016d10
test byte [rbp - 0x64], 4
mov eax, 1
cmove ebx, eax
lea r9, [rbp - 0x78]
mov rcx, r14
lea r8, [0x140091f18]
lea rdx, [rbp - 0x58]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceAlias]
test eax, eax
je 0x140016d3a
mov eax, dword [rbp - 0x64]
test eax, eax
je 0x140016d3a
test al, 4
jne 0x140016d3a
or ebx, 2
test ebx, ebx
je 0x140016fe0
lea r9, [rbp - 0x78]
mov rcx, r14
lea r8, [0x140091fc0]
lea rdx, [rbp - 0x58]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceAlias]
mov ebx, 1
lea r8, [rbp + 0x300]
test eax, eax
lea rdx, [rbp - 0x58]
mov eax, 2
mov esi, ebx
cmovne esi, eax
mov r9d, 0x210
lea rax, [rsp + 0x68]
mov rcx, r14
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x140016fe0
xor edx, edx
lea rcx, [rbp + 0xf0]
mov r8d, 0x208
call fcn.140055560
lea rcx, [rbp - 0x30]
mov dword [rsp + 0x48], edi
mov dword [rsp + 0x44], 0x208
mov dword [rbp - 0x30], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x140016e2f
cmp dword [rbp - 0x2c], 6
jae 0x140016e2f
lea r8d, [rbx + 7]
lea rdx, str._USB
lea rcx, [rbp + 0x304]
call fcn.1400636b0
test eax, eax
jne 0x140016e2f
mov qword [rsp + 0x30], rdi
lea rax, [rbp + 0xf0]
mov dword [rsp + 0x28], 0x208
lea r9, [rsp + 0x4c]
lea r8d, [rbx + 0xc]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x68]
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
jne 0x140016e2f
mov word [rbp + 0xf0], di
jmp 0x140016e56
cmp word [rbp + 0xf0], 0
je 0x140016e56
mov r8d, 0xa
lea rdx, str.USB_Audio
lea rcx, [rbp + 0xf0]
call fcn.1400636b0
test eax, eax
jne 0x140016eb6
mov r9d, ebx
lea rdx, [rbp - 0x58]
xor r8d, r8d
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInterfaceRegKey]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140016eb6
lea rax, [rsp + 0x44]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x4c]
lea rax, [rbp + 0xf0]
mov rcx, rbx
lea rdx, str.FriendlyName
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140016eaf
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140016eb6
mov word [rbp + 0xf0], di
movzx ecx, word [rbp + 0xf0]
lea rdi, [rbp + 0xf0]
mov ebx, dword [rsp + 0x44]
mov edx, 8
call fcn.140063548
test eax, eax
je 0x140016ef6
nop word [rax + rax]
movzx ecx, word [rdi + 2]
add rdi, 2
mov edx, 8
call fcn.140063548
test eax, eax
jne 0x140016ee0
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rdi + rax*2], 0
jne 0x140016f00
cmp rbx, rax
cmovb rax, rbx
lea rbx, [rax - 1]
lea rbx, [rdi + rbx*2]
cmp rbx, rdi
jbe 0x140016f3a
nop
movzx ecx, word [rbx]
mov edx, 8
call fcn.140063548
test eax, eax
je 0x140016f3a
sub rbx, 2
cmp rbx, rdi
ja 0x140016f20
sub rbx, rdi
lea rcx, [rbp + 0xf0]
add rbx, 2
mov rdx, rdi
sar rbx, 1
add rbx, rbx
mov r8, rbx
call fcn.140054eb0
mov edx, dword [rsp + 0x7c]
lea rax, [rsp + 0x48]
xor edi, edi
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xf0]
mov word [rbp + rbx + 0xf0], di
lea r8, [rbp + 0x304]
mov ecx, esi
call fcn.1400162f0
mov r10, rax
cmp dword [rsp + 0x48], edi
jne 0x140016fdd
movsxd r8, dword [rax + 0x430]
mov r9d, edi
test r8, r8
jle 0x140016fce
mov rcx, qword [rax + 0x438]
lea r11d, [rdi + 1]
nop dword [rax]
mov rdx, qword [rcx]
test rdx, rdx
je 0x140016fc5
mov eax, dword [rdx + 0x10]
cmp eax, r11d
cmovb eax, r11d
add r9d, eax
add rcx, 8
sub r8, r11
jne 0x140016fb0
add dword [rsp + 0x40], r9d
mov qword [r12], r10
add r12, 8
jmp 0x140016fe0
dec r15d
lea rax, [rbp - 0x58]
mov dword [rbp - 0x58], 0x20
inc r13d
mov qword [rbp - 0x40], rdi
mov r9d, r13d
mov dword [rbp - 0x78], 0x20
lea r8, [0x140092990]
mov qword [rbp - 0x60], rdi
xor edx, edx
mov dword [rsp + 0x68], 0x20
mov rcx, r14
mov qword [rbp - 0x80], rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x140016ce0
mov r12d, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
test r14, r14
je 0x140017043
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rax, qword [rsp + 0x58]
mov dword [rax], r15d
mov rax, qword [rsp + 0x60]
mov dword [rax], r12d
mov rax, rbx
mov rdi, qword [rsp + 0x628]
mov rbx, qword [rsp + 0x678]
mov r15, qword [rsp + 0x620]
mov rcx, qword [rbp + 0x510]
xor rcx, rsp
call fcn.140052e10
add rsp, 0x630
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret