AlpcpChargePagedPoolQuota

INT64 __fastcall AlpcpChargePagedPoolQuota(__int64 a1, unsigned __int64 a2){
  unsigned __int64 v2; 
  __int64 v3; 
  _m_prefetchw((const void *)(a1 + 2072));
  while( 1 )
  {
    v2 = *(_QWORD *)(a1 + 2072);
    if( v2 < a2 )
      break;
    v3 = *(_QWORD *)(a1 + 2072);
    if( v3 == _InterlockedCompareExchange64((volatile signed __int64 *)(a1 + 2072), v2 - a2, v2) )
      return 0i64;
  }
  return PsChargeProcessPagedPoolQuota(a1, a2);
}

Referenced by:

AlpcpCaptureMessageData
AlpcpCaptureMessageDataSafe
AlpcpCreateReserve
AlpcpCreateSecurityContext
AlpcpSendMessage