MiCheckPteForWriteCluster

_MMPFN *__fastcall MiCheckPteForWriteCluster(INT64 a1, INT64 a2, UINT64 a3, INT64 a4, INT64 a5, _BYTE *a6){
  _MMPFN *result; 
  unsigned __int64 v9; 
  result = MiLockTransitionLeafPage((_MMPTE *)a2, a6);
  if( !result )
    return 0i64;
  if( (*((_BYTE *)result + 34) & 7) != 3
    || *((_WORD *)result + 16)
    || (*((_QWORD *)result + 2) & 0xFFFFFFFFFC00FC1Fui64) != a3 )
  {
    goto LABEL_11;
  }
  if( qword_140C4DC80 )
  {
    if( (a3 & 0x10) == 0 )
      a3 &= ~qword_140C4DC80;
  }
  if( _bittest64(*(const signed __int64 **)(a1 + 8), HIDWORD(a3)) )
  {
LABEL_11:
    v9 = (unsigned __int8)*a6;
    _InterlockedAnd64((volatile signed __int64 *)result + 3, 0x7FFFFFFFFFFFFFFFui64);
    __writecr8(v9);
    return 0i64;
  }
  return result;
}

Referenced by:

MiGetPageForWriteCluster