MiCreateNodeLists
VOID __stdcall MiCreateNodeLists(_MI_PARTITION *Partition, _PHYSICAL_MEMORY_DESCRIPTOR *PhysicalMemoryBlock){
unsigned int v2;
int v5;
__int64 v6;
__int64 v7;
__int64 v8;
_QWORD *v9;
__int64 v10;
__int64 v11;
__int64 v12;
PVOID v13;
__int64 v14;
PVOID P[2];
__int64 v16;
v2 = 0;
P[1] = P;
v16 = 0i64;
P[0] = P;
v5 = 0;
while( (unsigned int)MiDescribePageRun(
P,
PhysicalMemoryBlock->Run[v5].BasePage,
PhysicalMemoryBlock->Run[v5].PageCount) )
{
if( ++v5 == PhysicalMemoryBlock->NumberOfRuns )
{
LODWORD(v6) = MiAllocatePool((struct _SLIST_ENTRY *)0x40);
if( v6 )
{
v7 = v6 + 16;
*(_QWORD *)(v6 + 8) = 1i64;
*(_QWORD *)v6 = Partition;
*(_DWORD *)(v6 + 16) = v16;
v8 = v6 + 16 + 16 * (*(unsigned int *)(v6 + 16) + 1i64);
*(_QWORD *)(v6 + 24) = PhysicalMemoryBlock->NumberOfPages;
while( 1 )
{
v9 = P[0];
if( P[0] == P )
return;
if( *((PVOID **)P[0] + 1) != P )
goto LABEL_11;
v10 = *(_QWORD *)P[0];
if( *(PVOID *)(*(_QWORD *)P[0] + 8i64) != P[0] )
goto LABEL_11;
P[0] = *(PVOID *)P[0];
*(_QWORD *)(v10 + 8) = P;
v11 = v2;
v12 = v2++;
v12 *= 2i64;
*(_QWORD *)(v7 + 8 * v12 + 16) = v9[2];
*(_QWORD *)(v7 + 8 * v12 + 24) = v9[3];
*(_DWORD *)(v8 + 8 * v11) = *((_DWORD *)v9 + 8);
*(_DWORD *)(v8 + 8 * v11 + 4) = *((_DWORD *)v9 + 9);
ExFreePoolWithTag(v9, 0);
}
}
break;
}
}
while( 1 )
{
v13 = P[0];
if( P[0] == P )
break;
if( *((PVOID **)P[0] + 1) != P || (v14 = *(_QWORD *)P[0], *(PVOID *)(*(_QWORD *)P[0] + 8i64) != P[0]) )
LABEL_11:
__fastfail(3u);
P[0] = *(PVOID *)P[0];
*(_QWORD *)(v14 + 8) = P;
ExFreePoolWithTag(v13, 0);
}
}Referenced by:
MiInitNucleus
MiMakePartitionMemoryBlock