Function at 0x14005e7a0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x390
xor eax, eax
mov r12, rcx
mov rbp, rdx
mov dword [rdx], eax
mov dword [rdx + 4], eax
mov dword [rdx + 8], eax
lea r9d, [rax + 2]
lea rcx, [0x1400e3c50]
xor edx, edx
xor r8d, r8d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp rax, 0xffffffffffffffff
mov rbx, rax
je 0x14005ea55
lea rdx, [rsp + 0x180]
mov rcx, rax
mov dword [rsp + 0x180], 0x128
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInfoListDetailA]
test eax, eax
jne 0x14005e814
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
add rsp, 0x390
pop r12
pop rbp
pop rbx
ret
mov qword [rsp + 0x3b0], rsi
lea r8, [rsp + 0x58]
mov qword [rsp + 0x380], r13
xor r13d, r13d
xor edx, edx
mov rcx, rbx
mov esi, r13d
mov dword [rsp + 0x58], 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x14005ea3c
mov qword [rsp + 0x388], rdi
nop
nop
nop
nop
mov ecx, dword [rsp + 0x6c]
lea rdx, [rsp + 0x2b0]
xor r9d, r9d
mov r8d, 0xc8
mov qword [rsp + 0x20], r13
call qword [sym.imp.SETUPAPI.dll_CM_Get_Device_ID_ExA]
test eax, eax
jne 0x14005e946
lea r8d, [rax + 1]
lea rdx, [rsp + 0x58]
xor r9d, r9d
mov rcx, rbx
mov dword [rsp + 0x28], 0x20019
mov dword [rsp + 0x20], 1
call qword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x14005e93a
lea rcx, [rsp + 0x81]
xor edx, edx
mov r8d, 0xff
mov dword [rsp + 0x44], 1
mov dword [rsp + 0x40], 0x100
mov byte [rsp + 0x80], r13b
call fcn.14007cd30
lea r11, [rsp + 0x40]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], r11
lea r9, [rsp + 0x44]
lea rdx, [0x1400b7bf8]
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x14005e92f
lea rdx, [rsp + 0x80]
mov rcx, r12
call fcn.14007ea64
test rax, rax
jne 0x14005e966
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14005e946
lea rcx, str.GetBDFNumberFromDeviceKey:_SetupDiOpenDevRegKey_function_fails_n
call fcn.14000cbb0
add esi, 1
lea r8, [rsp + 0x58]
mov rcx, rbx
mov edx, esi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x14005e860
jmp 0x14005ea34
lea rax, [rsp + 0x3c0]
lea r9, [rsp + 0x3c8]
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov r8d, 0x15
mov rcx, rbx
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x3c0], 8
mov dword [rsp + 0x3c8], r13d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov r11d, dword [rsp + 0x50]
lea rax, [rsp + 0x3c0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
lea r9, [rsp + 0x3c8]
lea rdx, [rsp + 0x58]
mov r8d, 0x1c
mov rcx, rbx
mov dword [rsp + 0x28], 8
mov dword [rbp], r11d
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x3c0], 8
mov dword [rsp + 0x3c8], r13d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov r11, qword [rsp + 0x48]
mov rcx, rdi
mov rax, r11
shr rax, 0x10
mov dword [rbp + 4], eax
movzx eax, r11w
mov dword [rbp + 8], eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rsp + 0x388]
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov r13, qword [rsp + 0x380]
mov rsi, qword [rsp + 0x3b0]
add rsp, 0x390
pop r12
pop rbp
pop rbx
ret