Function at 0x180020580
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rdi
push r12
push r13
push r15
sub rsp, 0x50
mov rax, qword [0x1800e3380]
xor edi, edi
movsxd r12, ecx
mov r15, r8
mov r13d, edi
test rax, rax
jne 0x1800205c6
xor edx, edx
lea rcx, str.Setupapi.dll
call fcn.180022920
mov qword [0x1800e3380], rax
test rax, rax
je 0x1800206c6
cmp qword [0x1800e3388], rdi
jne 0x1800205f6
lea rdx, str.SetupDiGetClassDevsW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800e3388], rax
test rax, rax
je 0x1800206c6
mov rax, qword [0x1800e3380]
cmp qword [0x1800e3390], rdi
jne 0x180020626
lea rdx, str.SetupDiEnumDeviceInfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800e3390], rax
test rax, rax
je 0x1800206c6
mov rax, qword [0x1800e3380]
cmp qword [0x1800e33a0], rdi
jne 0x180020652
lea rdx, str.SetupDiGetDeviceRegistryPropertyW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800e33a0], rax
test rax, rax
je 0x1800206c6
mov rax, qword [0x1800e3380]
cmp qword [0x1800e3398], rdi
jne 0x18002067e
lea rdx, str.SetupDiGetDeviceInterfaceDetailW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800e3398], rax
test rax, rax
je 0x1800206c6
mov rax, qword [0x1800e3380]
cmp qword [0x1800e33b0], rdi
jne 0x1800206a3
lea rdx, str.SetupDiDestroyDeviceInfoList
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800e33b0], rax
test rax, rax
je 0x1800206c6
mov rax, qword [0x1800e3388]
mov r9d, 6
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [case.0x1800152ca.0]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x1800206d5
xor eax, eax
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
xorps xmm0, xmm0
mov qword [rsp + 0x80], rbx
movups xmmword [r15], xmm0
mov qword [rsp + 0x48], rsi
mov r8, r15
movups xmmword [r15 + 0x10], xmm0
mov dword [r15], 0x20
xor edx, edx
mov rax, qword [0x1800e3390]
mov rcx, rbp
mov qword [rsp + 0x40], r14
call qword [case.0x1800152ca.0]
test eax, eax
je 0x1800208a7
lea r14, str.PCIVEN_10DECC_0300
nop
mov dword [rsp + 0x98], edi
mov rsi, rdi
cmp r12d, 1
jae 0x180020873
lfence
xor r9d, r9d
lea rax, [rsp + 0x98]
mov qword [rsp + 0x30], rax
mov rdx, r15
mov rax, qword [0x1800e33a0]
mov rcx, rbp
mov dword [rsp + 0x28], edi
lea r8d, [r9 + 2]
mov qword [rsp + 0x20], rdi
call qword [case.0x1800152ca.0]
mov ebx, dword [rsp + 0x98]
test ebx, ebx
je 0x18002086a
add ebx, 4
mov ecx, 0x40
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x18002086a
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], ebx
mov rdx, r15
mov qword [rsp + 0x20], rax
mov rcx, rbp
mov rax, qword [0x1800e33a0]
lea r8d, [r9 + 2]
call qword [case.0x1800152ca.0]
test eax, eax
je 0x18002086a
cmp word [rsi], 0
mov rdi, rsi
je 0x18002084c
lea r14, [r14 + r12*8]
mov rbx, qword [r14]
cmp word [rbx], 0
je 0x180020822
nop dword [rax]
mov rdx, rbx
mov rcx, rdi
call fcn.18005a0d0
test rax, rax
jne 0x18002081c
mov rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rbx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x180020800
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], 0
jne 0x1800207e0
jmp 0x180020822
cmp word [rbx], 0
jne 0x18002084c
mov rax, 0xffffffffffffffff
nop dword [rax]
cmp word [rdi + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x180020830
lea rdi, [rdi + rax*2]
add rdi, 2
cmp word [rdi], 0
jne 0x1800207d3
jmp 0x180020856
cmp word [rdi], 0
jne 0x1800208d8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
lea r14, str.PCIVEN_10DECC_0300
jmp 0x180020873
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
xorps xmm0, xmm0
inc r13d
movups xmmword [r15], xmm0
mov r8, r15
mov edx, r13d
movups xmmword [r15 + 0x10], xmm0
mov dword [r15], 0x20
mov rcx, rbp
mov rax, qword [0x1800e3390]
call qword [case.0x1800152ca.0]
test eax, eax
jne 0x180020720
mov rax, qword [0x1800e33b0]
mov rcx, rbp
call qword [case.0x1800152ca.0]
xor eax, eax
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x80]
mov r14, qword [rsp + 0x40]
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rax, qword [rsp + 0x88]
mov qword [rax], rbp
mov eax, 1
jmp 0x1800208b9