CmpRollbackLightWeightTransaction

INT64 __fastcall CmpRollbackLightWeightTransaction(INT64 a1){
  signed __int32 v2; 
  unsigned int v3; 
  int CompareAddress; 

  v2 = _InterlockedCompareExchange((volatile signed __int32 *)a1, 3, 0);
  CompareAddress = v2;
  if( v2 == 1 )
  {
    if( _InterlockedCompareExchange((volatile signed __int32 *)a1, 4, 1) != 1 )
      return(unsigned int)-1072103421;
    v3 = 0;
    CompareAddress = 4;
    ExBlockOnAddressPushLock((_EX_PUSH_LOCK *)(a1 + 8), (VOID *)a1, &CompareAddress, 4ui64, 0i64);
    goto LABEL_3;
  }
  v3 = 0;
  if( !v2 )
  {
LABEL_3:
    CmpAbortLightWeightTransaction(a1);
    return v3;
  }
  v3 = -1072103421;
  if( v2 == 3 )
    return(unsigned int)-1072103403;
  return v3;
}

Referenced by:

CmpAbortRollbackPacket
CmpCloseLightWeightTransaction
CmpRollbackTransactionArray
NtRollbackRegistryTransaction