PnpAssignResourcesToDevices
INT64 __fastcall PnpAssignResourcesToDevices(
UINT64 DeviceCount,
_PNP_RESOURCE_REQUEST *RequestTable,
UINT *RebalancePerformed){
unsigned int v3;
_PNP_RESOURCE_REQUEST *v6;
__int64 v7;
__int64 v8;
__int64 v10;
int v11[4];
char v12;
int v13;
v3 = DeviceCount;
if( (_DWORD)DeviceCount )
{
v6 = RequestTable;
v7 = (unsigned int)DeviceCount;
do
{
v8 = *(_QWORD *)(*((_QWORD *)v6->PhysicalDevice + 39) + 40i64);
if( (*(_DWORD *)(v8 + 396) & 1) != 0 )
{
v10 = *(_QWORD *)(v8 + 48);
v11[0] = 0;
v13 = 0;
v12 = 0;
if( (int)PnpGetObjectProperty(
PiPnpRtlCtx,
v10,
1i64,
0i64,
0i64,
(__int64)&DEVPKEY_Device_Reported,
&v13,
(unsigned __int64)&v12,
1,
(ULONG *)v11,
0) >= 0
&& v13 == 17
&& v11[0] == 1
&& v12 == -1 )
{
v6->AllocationType = ArbiterRequestLegacyReported;
}
}
++v6;
--v7;
}
while( v7 );
}
return PnpAllocateResources(v3, RequestTable, 0i64, RebalancePerformed);
}Referenced by:
PnpProcessAssignResources