MmTrimSection
VOID __fastcall MmTrimSection(
_SECTION_OBJECT_POINTERS *SectionObjectPointer,
_LARGE_INTEGER *Offset,
UINT64 RegionSize,
UINT64 Flags){
unsigned int v4;
LONGLONG QuadPart;
_CONTROL_AREA *ControlArea[2];
__int128 v7;
_SUBSECTION *LastSubsection[2];
LONGLONG v9;
v9 = 0i64;
*(_OWORD *)ControlArea = 0i64;
v7 = 0i64;
*(_OWORD *)LastSubsection = 0i64;
v4 = Flags & 1 | 0x20;
if( (Flags & 2) == 0 )
v4 = Flags & 1;
if( Offset )
{
QuadPart = Offset->QuadPart;
Offset = (_LARGE_INTEGER *)&v9;
v9 = QuadPart;
}
if( (unsigned int)MiComputeFlushRange(
SectionObjectPointer,
(unsigned __int64 *)&Offset->QuadPart,
RegionSize,
v4 >= 0x20,
(__int64)ControlArea) )
{
MiTrimSection(ControlArea, 0, v4);
MiFlushRelease(ControlArea[0], *((_SUBSECTION **)&v7 + 1), LastSubsection[0]);
}
}Referenced by:
CcCoherencyFlushAndPurgeCache
CcPurgeCacheSection