MiLockPagedRange

NTSTATUS __stdcall MiLockPagedRange(INT64 a1, UINT64 a2){
  UINT64 v2; 

  v2 = 0i64;
  if( !a2 )
    return 1;
  while( MiLockPagedAddress((VOID *)(v2 + a1)) )
  {
    v2 += 4096i64;
    if( v2 >= a2 )
      return 1;
  }
  while( v2 )
  {
    v2 -= 4096i64;
    MiUnlockPagedAddress((VOID *)(v2 + a1));
  }
  return 0;
}

Referenced by:

MiBuildNewCloneDescriptor
MiCreatePatchTableProtos
MiInsertNewCombineBlocks