ExAcquireRundownProtectionEx

UINT8 __stdcall ExAcquireRundownProtectionEx(EX_RUNDOWN_REF *RunRef, UINT64 a2){
  signed __int64 Count; 
  __int64 v3; 
  signed __int64 v4; 
  _m_prefetchw(RunRef);
  Count = RunRef->Count;
  if( (RunRef->Count & 1) != 0 )
    return 0;
  v3 = (unsigned int)(2 * a2);
  while( 1 )
  {
    v4 = Count;
    Count = _InterlockedCompareExchange64((volatile signed __int64 *)RunRef, v3 + Count, Count);
    if( v4 == Count )
      break;
    if( (Count & 1) != 0 )
      return 0;
  }
  return 1;
}

Referenced by:

ExCompareExchangeCallBack
ExReferenceCallBackBlock
MiCompleteProtoPteFault
PfSnAddProcessTrace
PfSnReferenceProcessTrace
PspRundownProcess