HalpQueryAcpiResourceRequirements
NTSTATUS __stdcall HalpQueryAcpiResourceRequirements(IO_RESOURCE_REQUIREMENTS_LIST **Requirements){
int v2;
NTSTATUS result;
int v4;
unsigned int v5;
unsigned int v6;
unsigned int v7;
unsigned int v8;
unsigned int v9;
_DWORD *PoolWithTag;
char *v11;
__int64 v12;
INT64 v13;
int v14;
v13 = 0i64;
v14 = 0;
v2 = HalpInterruptModel();
if( v2 > 0 && (v2 <= 4 || v2 == 4096) )
{
result = HalpInterruptGetIrtInfo(&v13);
if( result < 0 )
return result;
v4 = 205;
v5 = 205 - HIDWORD(v13) / (unsigned int)HalQueryMaximumProcessorCount();
}
else
{
v5 = 0;
v4 = 0;
}
if( SecondaryIcServicesEnabled )
{
v6 = v4;
v7 = 256;
}
else
{
v6 = -1;
v7 = 0;
}
v8 = v4 + v7 - v5;
v9 = 32 * (v8 - 1) + 72;
PoolWithTag = ExAllocatePoolWithTag(PagedPool, v9, 0x206C6148ui64);
memset((INT64)PoolWithTag, 0i64);
PoolWithTag[2] = -1;
*PoolWithTag = v9;
PoolWithTag[7] = 1;
PoolWithTag[1] = 15;
PoolWithTag[8] = 65537;
PoolWithTag[9] = v8;
if( v8 )
{
v11 = (char *)PoolWithTag + 42;
v12 = v8;
do
{
if( v5 >= v6 && v5 < v7 )
v5 = v7;
*(_DWORD *)(v11 + 6) = v5;
*(_DWORD *)(v11 + 10) = v5++;
*(_WORD *)(v11 - 1) = 258;
v11 += 32;
--v12;
}
while( v12 );
}
*Requirements = (IO_RESOURCE_REQUIREMENTS_LIST *)PoolWithTag;
return 0;
}Referenced by:
HalpDispatchPnp
HalpQueryResources