MiCreateForkWsle

VOID __stdcall MiCreateForkWsle(
        _MMSUPPORT_INSTANCE *Vm,
        UINT8 WsIrql,
        _MMPTE *PointerPxe,
        _MMPTE *EndPxe,
        UINT64 PagingLevel){
  int v5; 
  unsigned __int64 v7; 
  UINT64 v10; 
  UINT64 v11; 
  _MMPTE *v12; 
  _MMPFN *v13; 
  UINT64 PagingLevela; 
  _MI_FAULT_VA_LIST *v15; 
  UINT64 v16; 

  if( PointerPxe <= EndPxe )
  {
    v5 = PagingLevel;
    v7 = (unsigned __int64)PointerPxe;
    do
    {
      LODWORD(v10) = MI_READ_PTE_LOCK_FREE(v7);
      v16 = v10;
      v11 = v10;
      if( (v10 & 1) != 0 && (v10 & 0x80u) == 0i64 )
      {
        if( v5 > 1 )
        {
          v12 = (_MMPTE *)((__int64)((v7 << 25) - ((_QWORD)MmGetPteBase() << 25)) >> 16);
          LODWORD(PagingLevela) = v5 - 1;
          MiCreateForkWsle(Vm, WsIrql, v12, v12 + 511, PagingLevela);
        }
        MiPteInShadowRange((UINT64)&v16);
        v13 = &MmGetPfnDb()[(v11 >> 12) & 0xFFFFFFFFFi64];
        if( (v13->$976DF529DAC3D73085C9E386D94B91E6::$E228DCF3D8940E384DBC5EFCA756D8B6::gap0[0] & 1) == 0 )
        {
          LODWORD(v15) = 0;
          MiAllocateWsle(Vm, (_MMPTE *)v7, v13, 0i64, ZeroPte, v15);
        }
      }
      v7 += 8i64;
    }
    while( v7 <= (unsigned __int64)EndPxe );
  }
}

Referenced by:

MiCreateForkWsle
MiCreateForkWsles