RtlpHpVaMgrCtxAllocatorDereference

INT64 __fastcall RtlpHpVaMgrCtxAllocatorDereference(INT64 a1, UINT64 *a2){
  INT64 *v2; 
  INT64 v4; 
  unsigned __int64 v5; 
  INT64 result; 
  v2 = (INT64 *)(a1 + 2144);
  v4 = a1 + 48 * (*(unsigned int *)a2 + 45i64);
  v5 = ExAcquireSpinLockExclusive((PEX_SPIN_LOCK)(a1 + 2144));
  if( (*(_WORD *)(v4 + 42))-- == 1 )
  {
    *(_OWORD *)v4 = 0i64;
    *(_OWORD *)(v4 + 16) = 0i64;
    *(_OWORD *)(v4 + 32) = 0i64;
    *(_QWORD *)(v4 + 16) = 0i64;
    --*(_DWORD *)(a1 + 2152);
  }
  ExReleaseSpinLockExclusiveFromDpcLevel(v2);
  result = (unsigned int)KiIrqlFlags;
  __writecr8(v5);
  return result;
}

Referenced by:

RtlpHpRegisterEnvironment