MmTrimSection

VOID __fastcall MmTrimSection(
        _SECTION_OBJECT_POINTERS *SectionObjectPointer,
        _LARGE_INTEGER *Offset,
        UINT64 RegionSize,
        UINT64 Flags){
  unsigned int v4; 
  int v5; 
  LONGLONG QuadPart; 
  __int128 FlushRange; 
  __int128 v8; 
  __int128 LastSubsection; 
  LONGLONG v10; 

  v10 = 0i64;
  FlushRange = 0i64;
  v8 = 0i64;
  LastSubsection = 0i64;
  v4 = Flags & 1 | 0x20;
  if( (Flags & 2) == 0 )
    v4 = Flags & 1;
  if( Offset )
  {
    QuadPart = Offset->QuadPart;
    Offset = (_LARGE_INTEGER *)&v10;
    v10 = QuadPart;
  }
  MiComputeFlushRange(SectionObjectPointer, Offset, RegionSize, (_MI_FLUSH_RANGE *)(v4 >= 0x20));
  if( v5 )
  {
    MiTrimSection((_MI_FLUSH_RANGE *)&FlushRange, 0i64, v4);
    MiFlushRelease((_CONTROL_AREA *)FlushRange, *((_SUBSECTION **)&v8 + 1), (_SUBSECTION *)LastSubsection);
  }
}

Referenced by:

CcCoherencyFlushAndPurgeCache
CcPurgeCacheSection