CmpTransMgrRollback

NTSTATUS __stdcall CmpTransMgrRollback(_CM_TRANS *CmTrans, UINT64 *UowCount){
  _ETHREAD *CurrentThread; 
  __int64 v5; 
  __int64 v6; 
  int v8; 
  int v9; 
  LIST_ENTRY *ListIterator; 
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  ListIterator = 0i64;
  *(_DWORD *)UowCount = 0;
  --*((_WORD *)CurrentThread + 242);
  ExAcquireFastMutexUnsafe(&CmpTransactionListLock);
  CmTrans->TransState |= 2u;
  while( 1 )
  {
    LODWORD(v5) = CmListGetNextElement(&CmTrans->KCBUoWListHead, &ListIterator, 0i64);
    v6 = v5;
    if( !v5 )
      break;
    v8 = *(_DWORD *)(v5 + 64);
    if( (v8 & 1) == 0 )
    {
      ++*(_DWORD *)UowCount;
      v9 = *(_DWORD *)(v5 + 68);
      if( v9 )
      {
        if( v9 == 12 && !*(_DWORD *)(v6 + 96) )
          *(_DWORD *)(v6 + 96) = *(_DWORD *)(*(_QWORD *)(v6 + 48) + 40i64);
      }
      else if( !*(_DWORD *)(v6 + 88) )
      {
        *(_DWORD *)(v6 + 88) = *(_DWORD *)(*(_QWORD *)(v6 + 48) + 40i64);
      }
      *(_DWORD *)(v6 + 64) = v8 | 1;
    }
  }
  ExReleaseFastMutexUnsafe(&CmpTransactionListLock);
  KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
  return 0;
}

Referenced by:

CmKtmNotification
CmRmFinalizeRecovery
CmpAbortLightWeightTransaction
CmpRmUnDoPhase