MiAllocateSkipPagesForMdl
NTSTATUS __fastcall MiAllocateSkipPagesForMdl(__int64 a1, int a2, int a3){
UINT64 v5;
UINT64 v7;
UINT64 v8;
unsigned __int64 v9;
UINT64 SizeInPages;
int v11;
NTSTATUS result;
UINT64 PreferredNode;
UINT64 Flags;
UINT64 *StartingPfn;
v5 = *(_QWORD *)(a1 + 32);
v7 = *(_QWORD *)(a1 + 16);
v8 = *(_QWORD *)(a1 + 24);
v9 = (unsigned __int64)*(unsigned int *)(*(_QWORD *)(a1 + 64) + 40i64) >> 12;
if( v5 )
SizeInPages = *(_QWORD *)(a1 + 32);
else
SizeInPages = *(_QWORD *)(a1 + 40) - v9;
v11 = a3 | 0x60000000;
while( 1 )
{
LODWORD(StartingPfn) = v11;
LODWORD(Flags) = 0x80000000;
LODWORD(PreferredNode) = a2;
result = MiFindContiguousPages(
*(_MI_PARTITION **)a1,
v7,
v8,
v5,
SizeInPages,
*(_MI_PFN_CACHE_ATTRIBUTE *)(a1 + 60),
PreferredNode,
Flags,
StartingPfn);
if( result < 0 )
break;
v9 += SizeInPages;
if( v9 == *(_QWORD *)(a1 + 40) )
break;
v8 = -2i64;
result = -1 - v7;
if( -1i64 - v7 < SizeInPages )
break;
v5 = *(_QWORD *)(a1 + 32);
}
return result;
}Referenced by:
MiFindPagesForMdl