RtlpAllocateAtom
VOID *__stdcall RtlpAllocateAtom(UINT64 NumberOfBytes, UINT64 Tag){
UINT64 v2;
UINT32 v3;
VOID **PoolWithTag;
VOID *v5;
v2 = NumberOfBytes + 16;
v3 = Tag;
if( NumberOfBytes + 16 < NumberOfBytes )
return 0i64;
PoolWithTag = ExAllocatePoolWithTag(1ui64, v2, (unsigned int)Tag);
if( PoolWithTag )
{
v5 = PsChargeSharedPoolQuota(KeGetCurrentThread()->ApcState.Process, v2, 0i64);
*PoolWithTag = v5;
if( v5 )
{
PoolWithTag[1] = (VOID *)v2;
PoolWithTag += 2;
}
else
{
ExFreePoolWithTag(PoolWithTag, v3);
return 0i64;
}
}
return PoolWithTag;
}Referenced by:
RtlCreateAtomTableEx
RtlpAllocateAtomTableEntry
RtlpLookupOrCreateLowBox