PsChargeSharedPoolQuota
INT64 __fastcall PsChargeSharedPoolQuota(__int64 a1, ULONG_PTR a2, unsigned __int64 a3){
INT64 v5;
if( (PEPROCESS)a1 == PsInitialSystemProcess )
return 1i64;
v5 = *(_QWORD *)(a1 + 1384);
if( !a2 || (int)PspChargeQuota(*(_QWORD *)(a1 + 1384), 0i64, 1i64, a2) >= 0 )
{
if( !a3 || (int)PspChargeQuota(v5, 0i64, 0i64, a3) >= 0 )
{
_InterlockedIncrement((volatile signed __int32 *)(v5 + 512));
return v5;
}
if( a2 )
PspReturnQuota((CHAR *)v5, 0i64, 1ui64, a2);
}
return 0i64;
}Referenced by:
NtSetInformationJobObject
ObAdjustSecurityQuota
ObpChargeQuotaForObject
PspAllocateRateControl
RtlpAllocateAtom