VerifierExAllocatePoolWithQuotaTag

VOID *__stdcall VerifierExAllocatePoolWithQuotaTag(POOL_TYPE PoolType, UINT64 NumberOfBytes, UINT64 Tag){
  unsigned int v4; 
  VOID *result; 
  unsigned __int32 v7; 
  _POOL_TYPE v8; 
  UINT64 v9; 
  VOID *CallingAddress; 
  v4 = Tag;
  if( (MmVerifierData & 0x400000) == 0 || (VfRuleClasses & 0x800000000i64) != 0 || (MmVerifierData & 1) != 0 )
  {
    VfCheckPoolType(PoolType, CallingAddress, Tag);
    if( (MmVerifierData & 8) != 0 )
    {
      if( *((PVOID *)KeGetCurrentThread() + 23) == PsIdleProcess )
        VerifierBugCheckIfAppropriate(0xC4ui64, 0x10Aui64, 0i64, 0i64, 0i64, v9);
      if( (*((_BYTE *)KeGetPcr() + 12972) & 1) != 0 )
        VerifierBugCheckIfAppropriate(0xC4ui64, 0x10Bui64, 0i64, 0i64, 0i64, v9);
    }
    v7 = PoolType & 0xFFFFFFF7;
    if( (PoolType & 8) == 0 )
      v7 = PoolType;
    v8 = v7 | 0x80;
    if( XdvEnabled )
      result = (VOID *)pXdvExAllocatePoolWithQuotaTag[0](
                         v8,
                         NumberOfBytes,
                         v4,
                         32,
                         (__int64)CallingAddress,
                         (__int64)VeAllocatePoolWithTagPriority);
    else
      result = VeAllocatePoolWithTagPriority(v8, NumberOfBytes, v4, HighPoolPriority, CallingAddress);
    if( !result && (PoolType & 8) == 0 )
      RtlRaiseStatus(-1073741670);
  }
  else
  {
    if( (MmVerifierData & 0x2000000) != 0 )
      VfCheckPoolType(PoolType, CallingAddress, 0i64);
    return ExAllocatePoolWithQuotaTag(PoolType, NumberOfBytes, v4);
  }
  return result;
}

Referenced by:

No references.