MiAllocateMostlyContiguousPagesForMdl
UINT64 __fastcall MiAllocateMostlyContiguousPagesForMdl(INT64 a1, INT64 a2, INT64 a3){
__int64 v3;
UINT64 v5;
int v6;
UINT64 v7;
int v8;
UINT64 v9;
UINT64 result;
__int64 v11;
unsigned __int64 v12;
__int64 v13;
UINT64 v14;
UINT64 PreferredNode;
UINT64 PreferredNodea;
UINT64 PreferredChannel;
UINT64 PreferredChannela;
UINT64 v19;
UINT64 v20;
v3 = *(_QWORD *)(a1 + 64);
v5 = *(_QWORD *)(a1 + 16);
v6 = a3 | 0x60002000;
v7 = *(_QWORD *)(a1 + 24);
v8 = a2;
v9 = HighestPhysicalPage;
LODWORD(v19) = a3 | 0x60002000;
LODWORD(PreferredChannel) = 0x80000000;
LODWORD(PreferredNode) = a2;
for( result = MiFindContiguousPages(
*(_MI_PARTITION **)a1,
v5,
v7,
0i64,
*(_QWORD *)(a1 + 40) - ((unsigned __int64)*(unsigned int *)(v3 + 40) >> 12),
(_MI_PFN_CACHE_ATTRIBUTE)*(_DWORD *)(a1 + 60),
PreferredNode,
PreferredChannel,
v19,
(UINT64 *)v3);
;
result = MiFindContiguousPages(
*(_MI_PARTITION **)a1,
v5,
v7,
0i64,
v11 - v12,
(_MI_PFN_CACHE_ATTRIBUTE)*(_DWORD *)(a1 + 60),
PreferredNodea,
PreferredChannela,
v20,
(UINT64 *)v3) )
{
v11 = *(_QWORD *)(a1 + 40);
v12 = (unsigned __int64)*(unsigned int *)(v3 + 40) >> 12;
if( v12 == v11 )
break;
v13 = *(_QWORD *)(a1 + 32);
if( !v13 )
break;
result = v13 + v5;
if( v13 + v5 <= v5 || result > v9 )
break;
v5 += v13;
v14 = v13 + v7;
if( v13 + v7 <= v7 || (v7 += v13, v14 > v9) )
v7 = v9;
LODWORD(v20) = v6;
LODWORD(PreferredChannela) = 0x80000000;
LODWORD(PreferredNodea) = v8;
}
return result;
}Referenced by:
MiFindPagesForMdl