IoEnumerateDeviceObjectList
NTSTATUS __stdcall IoEnumerateDeviceObjectList(
DRIVER_OBJECT *DriverObject,
DEVICE_OBJECT **DeviceObjectList,
UINT64 DeviceObjectListSize,
UINT64 *ActualNumberDeviceObjects){
unsigned int v5;
unsigned int v7;
UINT8 v9;
_DEVICE_OBJECT *DeviceObject;
KIRQL v11;
unsigned int v12;
bool v13;
_DEVICE_OBJECT *v14;
unsigned int i;
v5 = 0;
v7 = DeviceObjectListSize;
v9 = KeAcquireQueuedSpinLock(0xAui64);
DeviceObject = DriverObject->DeviceObject;
v11 = v9;
v12 = v7 >> 3;
while( DeviceObject )
{
DeviceObject = (_DEVICE_OBJECT *)*((_QWORD *)DeviceObject + 2);
++v5;
}
v13 = v12 < v5;
*(_DWORD *)ActualNumberDeviceObjects = v5;
v14 = DriverObject->DeviceObject;
for( i = v13 ? 0xC0000023 : 0; v12; --v12 )
{
if( !v14 )
break;
ObfReferenceObjectWithTag(v14, 0x746C6644u);
*DeviceObjectList++ = v14;
v14 = (_DEVICE_OBJECT *)*((_QWORD *)v14 + 2);
}
KeReleaseQueuedSpinLock(0xAui64, v11);
return i;
}Referenced by:
No references.