MiFlushFileOnlyMdl

NTSTATUS __stdcall MiFlushFileOnlyMdl(MDL *Mdl, IO_STATUS_BLOCK *IoStatus){
  __int64 v2; 
  __int64 v3; 
  __int64 Information_low; 
  __int64 v6; 
  unsigned __int64 v7; 
  CHAR *Information; 
  UINT64 *v9; 
  unsigned int i; 
  v3 = v2;
  Information_low = LODWORD(IoStatus[2].Information);
  v6 = (IoStatus[2].Status + HIDWORD(IoStatus[2].Information)) & 0xFFF;
  *(_QWORD *)(v2 + 8) = 0i64;
  *(_DWORD *)v2 = 0;
  v7 = (unsigned __int64)(v6 + Information_low + 4095) >> 12;
  if( !byte_140C4DC28 )
  {
    if( (IoStatus->Information & 0x50000) != 0 )
      Information = (CHAR *)IoStatus[1].Information;
    else
      Information = (CHAR *)MmMapLockedPagesSpecifyCache((PMDL)IoStatus, 0, MmCached, 0i64, 0, 0xC0000010);
    if( Information )
    {
      MiPersistMemory(Information, v7 << 12);
      MmUnmapLockedPages((PVOID)IoStatus[1].Information, (PMDL)IoStatus);
    }
    v9 = (UINT64 *)&IoStatus[3];
    for( i = 0; i < v7; ++v9 )
    {
      if( !Information )
        MiPersistPage(*v9);
      ++i;
    }
  }
  *(_DWORD *)v3 = 0;
  *(_QWORD *)(v3 + 8) = v7 << 12;
  return 0;
}

Referenced by:

MiFlushSectionInternal
MiGatherMappedPages