IopCombineLegacyResources
_CM_RESOURCE_LIST *__stdcall IopCombineLegacyResources(_DEVICE_NODE *DeviceNode){
_CM_RESOURCE_LIST *v1;
unsigned int v2;
_DEVICE_NODE *v3;
_DEVICE_NODE *NextResourceDeviceNode;
_CM_RESOURCE_LIST *ResourceList;
VOID **PoolWithTag;
char *v7;
_CM_RESOURCE_LIST *v8;
int v9;
__int64 v10;
v1 = 0i64;
v2 = 0;
v3 = DeviceNode;
NextResourceDeviceNode = DeviceNode;
if( DeviceNode )
{
do
{
ResourceList = NextResourceDeviceNode->ResourceList;
if( ResourceList )
v2 += PnpDetermineResourceListSize(ResourceList);
NextResourceDeviceNode = NextResourceDeviceNode->OverUsed2.NextResourceDeviceNode;
}
while( NextResourceDeviceNode );
if( v2 )
{
PoolWithTag = ExAllocatePoolWithTag(1ui64, v2, 538996816i64);
v1 = (_CM_RESOURCE_LIST *)PoolWithTag;
if( PoolWithTag )
{
*(_DWORD *)PoolWithTag = 0;
v7 = (char *)PoolWithTag + 4;
do
{
v8 = v3->ResourceList;
if( v8 )
{
v9 = PnpDetermineResourceListSize(&v3->ResourceList->Count);
if( v9 )
{
v10 = (unsigned int)(v9 - 4);
memmove(v7, v8->List, v9 - 4);
v7 += v10;
v1->Count += v3->ResourceList->Count;
}
}
v3 = v3->OverUsed2.NextResourceDeviceNode;
}
while( v3 );
}
}
}
return v1;
}Referenced by:
IopLegacyResourceAllocation