MiGetPfnPageSizeIndexUnsynchronized

NTSTATUS __stdcall MiGetPfnPageSizeIndexUnsynchronized(_MMPFN *Pfn1, INT64 *a2, INT64 *a3){
  NTSTATUS PfnPageSizeIndex; 
  int v4; 
  int v5; 
  UINT8 v9; 
  _MMPFN *BaseResidentPage; 
  _MMPFN *v11; 
  NTSTATUS result; 

  PfnPageSizeIndex = -1;
  v4 = *(_BYTE *)(&Pfn1->u3 + 1) & 7;
  v5 = *((unsigned __int8 *)&Pfn1->u3 + 2) >> 6;
  if( (Pfn1->u4._bf_0 & 0x1000000000i64) != 0 )
  {
    v9 = MiLockPageInline(Pfn1);
    if( (Pfn1->u4._bf_0 & 0x1000000000i64) != 0 )
    {
      BaseResidentPage = MiGetBaseResidentPage(Pfn1);
      v5 = *((unsigned __int8 *)&BaseResidentPage->u3 + 2) >> 6;
      v4 = *(_BYTE *)(&BaseResidentPage->u3 + 1) & 7;
      PfnPageSizeIndex = MiGetPfnPageSizeIndex((INT64)BaseResidentPage);
      if( v11 != Pfn1 )
        _InterlockedAnd64(&v11->u2.Lock, 0x7FFFFFFFFFFFFFFFui64);
    }
    MiUnlockPage(Pfn1, v9);
  }
  *(_DWORD *)a2 = v4;
  result = PfnPageSizeIndex;
  *(_DWORD *)a3 = v5;
  return result;
}

Referenced by:

MiActivePageClaimCandidate
MiCombineAllPhysicalMemory
MiFillSystemPtes
MiGetPagesRemainingInResidentPage
MiLegitimatePageForDriversToMap
MiPfnsWorthTrying
MiProbeLeafPteAccess