RtlpHpVaMgrCtxAllocatorDereference

NTSTATUS __stdcall RtlpHpVaMgrCtxAllocatorDereference(INT64 a1, UINT64 *a2){
  INT64 *v2; 
  INT64 v4; 
  unsigned __int64 v5; 
  NTSTATUS result; 

  v2 = (INT64 *)(a1 + 2144);
  v4 = a1 + 48 * (*(unsigned int *)a2 + 45i64);
  v5 = (unsigned __int8)ExAcquireSpinLockExclusive((INT64 *)(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 = KiIrqlFlags;
  __writecr8(v5);
  return result;
}

Referenced by:

RtlpHpRegisterEnvironment