IopLiveDumpMarkImportantDumpData

INT64 __fastcall IopLiveDumpMarkImportantDumpData(_RTL_BITMAP_EX *Bitmap, UINT64 *MaxAdditionalPageCount){
  UINT64 v2; 
  INT64 MillisecondCounter; 
  unsigned int v6; 
  int v7; 
  __int64 *i; 
  int v9; 
  int v10; 
  int v11; 
  int v12; 
  INT64 v14; 
  __int128 v15; 
  __int128 v16; 
  __int64 v17; 
  _EVENT_HEADER UserEventHeader; 
  unsigned int v19; 
  *(_QWORD *)&UserEventHeader.ProviderId.Data1 = 0i64;
  MillisecondCounter = 0i64;
  *(_QWORD *)&UserEventHeader.EventDescriptor.Id = 0i64;
  if( (LODWORD(Bitmap[5].SizeOfBitMap) & 0x80u) != 0 )
    MillisecondCounter = IopLiveDumpGetMillisecondCounter(0);
  *(_QWORD *)&UserEventHeader.ThreadId = 0i64;
  *(_DWORD *)&UserEventHeader.EventDescriptor.Id |= 1u;
  v19 = 0;
  v17 = 0i64;
  UserEventHeader.TimeStamp.QuadPart = (LONGLONG)&Bitmap[34];
  *(_QWORD *)UserEventHeader.ProviderId.Data4 = MaxAdditionalPageCount;
  v6 = 0;
  *(_QWORD *)&UserEventHeader.Size = IoSetDumpRange;
  v16 = 0i64;
  v15 = 0i64;
  LOBYTE(v7) = ExAddPrivateDataToCrashDump(&UserEventHeader, (_ETW_GUID_ENTRY *)MaxAdditionalPageCount, v2);
  if( v7 < 0 )
  {
    if( v7 == -1073741789 )
      return 0i64;
    v6 = v7;
  }
  for( i = (__int64 *)PsActiveProcessHead; i != &PsActiveProcessHead; i = (__int64 *)*i )
  {
    v9 = MmAddRangeToCrashDump(&UserEventHeader, (unsigned __int64)(i - 137), 2624i64);
    if( v9 < 0 )
    {
      if( v9 == -1073741789 )
        return 0i64;
      v6 = v9;
    }
  }
  v10 = MmAddPrivateDataToCrashDump(&UserEventHeader, 16);
  if( v10 < 0 )
  {
    if( v10 == -1073741789 )
      return 0i64;
    v6 = v10;
  }
  IopLiveDumpAddTriageDumpData((INT64 *)Bitmap, (INT64)&UserEventHeader);
  v11 = MmAddPrivateDataToCrashDump(&UserEventHeader, 1);
  if( v11 < 0 )
  {
    if( v11 != -1073741789 )
    {
      v6 = v11;
      goto LABEL_18;
    }
    return 0i64;
  }
LABEL_18:
  if( IptInterface )
  {
    *((_QWORD *)&v16 + 1) = KeActiveProcessors.Bitmap[0];
    *(_QWORD *)&v16 = &KeActiveProcessors;
    while( !(unsigned int)KeEnumerateNextProcessor(&v19, (unsigned __int16 **)&v16) )
    {
      if( (*(int(__fastcall **)(_QWORD, __int128 *))(IptInterface + 16))(v19, &v15) >= 0 )
      {
        v12 = MmAddRangeToCrashDump(&UserEventHeader, v15, *((__int64 *)&v15 + 1));
        if( v12 < 0 )
        {
          if( v12 == -1073741789 )
            return 0i64;
          v6 = v12;
        }
      }
    }
  }
  if( (LODWORD(Bitmap[5].SizeOfBitMap) & 0x80u) != 0 )
  {
    v14 = IopLiveDumpGetMillisecondCounter(0);
    IopLiveDumpTraceMarkImportantDumpDataDuration((GUID *)Bitmap, v14 - MillisecondCounter);
  }
  return v6;
}

Referenced by:

IopLiveDumpEndMirroringCallback