Function at 0x1010287
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x984
mov eax, dword [0x102c22c]
and dword [ebp - 0x96c], 0
or dword [ebp - 0x970], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0x2001f
push 2
push 0
xor edi, edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
inc edi
push edi
mov dword [ebp - 0x978], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov dword [ebp - 0x968], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
cmp eax, 0xffffffff
mov dword [ebp - 0x980], eax
je 0x1010659
lea ecx, [ebp - 0x974]
push ecx
lea ecx, [ebp - 0x204]
push ecx
lea ecx, [ebp - 0x97c]
push ecx
push 0
push 0x1002cf8
push eax
mov dword [ebp - 0x974], 0x1fe
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10105e4
cmp dword [ebp - 0x97c], edi
jne 0x10105e4
mov eax, dword [ebp - 0x974]
and word [ebp + eax*2 - 0x204], 0
push 0
lea eax, [ebp - 0x204]
push eax
push dword [0x102c94c]
call fcn.010165a4
cmp eax, 0xffffffff
je 0x101035b
mov dword [ebp - 0x96c], edi
jmp 0x10105fe
lea eax, [ebp - 0x32c]
push eax
push ebx
push esi
mov dword [ebp - 0x32c], 0x128
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsA]
test eax, eax
je 0x10105fe
or dword [ebp - 0x324], 0x4000800
lea eax, [ebp - 0x32c]
push eax
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsA]
test eax, eax
jne 0x10103b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002ca0
jmp 0x10105f6
cmp dword [0x103f604], edi
je 0x10105fe
push edi
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiBuildDriverInfoList]
test eax, eax
jne 0x10103e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002c48
jmp 0x10105f6
xor eax, eax
mov ecx, 0xc7
lea edi, [ebp - 0x964]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x964]
push eax
push 0
push 1
push ebx
push esi
mov dword [ebp - 0x964], 0x31c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDriverInfoA]
test eax, eax
je 0x10105d8
lea eax, [ebp - 0x964]
push eax
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetSelectedDriverA]
test eax, eax
jne 0x101043e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002bf8
jmp 0x10104df
call dword [sym.imp.SETUPAPI.dll_SetupOpenFileQueue]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x970], edi
jne 0x1010460
push 0x1002ba0
call fcn.01015c42
jmp 0x10105d8
lea eax, [ebp - 0x32c]
push eax
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsA]
test eax, eax
jne 0x101048b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002b50
call fcn.01015c5a
pop ecx
pop ecx
jmp 0x10105d8
or dword [ebp - 0x328], 8
lea eax, [ebp - 0x32c]
push eax
push ebx
push esi
mov dword [ebp - 0x314], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsA]
test eax, eax
jne 0x10104bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002af0
jmp 0x10104df
push ebx
push esi
push 0x15
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
test eax, eax
jne 0x10104ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002a98
call fcn.01015c5a
add esp, 0xc
jmp 0x10105d8
mov eax, dword [ebp - 0x978]
push dword [ebp - 0x968]
and dword [ebp - 0x648], 0
push eax
mov dword [ebp - 0x540], eax
call fcn.0102185d
mov dword [ebp - 0x53c], eax
mov eax, dword [0x102ddb0]
push 0x104
mov dword [ebp - 0x330], eax
lea eax, [ebp - 0x538]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x968]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push dword [ebp - 0x968]
lea eax, [ebp - 0x644]
push 0x1001aa4
push 0x103
push eax
call dword [sym.imp.ntdll.dll__snprintf]
add esp, 0x10
lea eax, [ebp - 0x984]
push eax
lea eax, [ebp - 0x648]
push eax
push 0x10100d7
push 0
push 8
push edi
call dword [sym.imp.SETUPAPI.dll_SetupScanFileQueueA]
test eax, eax
jne 0x1010596
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002a58
call fcn.01015c5a
add esp, 0xc
xor edi, edi
inc edi
cmp dword [ebp - 0x648], edi
jne 0x10105d2
push 0
lea eax, [ebp - 0x204]
push eax
push dword [0x102c94c]
call fcn.01016588
push dword [0x102c94c]
push dword [ebp - 0x968]
push dword [ebp - 0x540]
call fcn.01021d96
mov dword [0x103f94c], edi
mov dword [ebp - 0x96c], edi
push 1
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDriverInfoList]
jmp 0x10105fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x968]
push 0x1002a1c
call fcn.01015c5a
add esp, 0xc
push dword [ebp - 0x980]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x970], 0xffffffff
je 0x1010659
lea eax, [ebp - 0x32c]
push eax
push ebx
push esi
mov dword [ebp - 0x32c], 0x128
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsA]
test eax, eax
je 0x101064d
and dword [ebp - 0x328], 0xfffffff7
or dword [ebp - 0x314], 0xffffffff
lea eax, [ebp - 0x32c]
push eax
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsA]
push dword [ebp - 0x970]
call dword [sym.imp.SETUPAPI.dll_SetupCloseFileQueue]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x96c]
pop edi
pop esi
pop ebx
call fcn.0101439a
leave
ret 0x10