ExReturnPoolQuota
VOID __stdcall ExReturnPoolQuota(PVOID P){
char v2;
_EPROCESS *BilledProcess;
__int64 v4;
UINT64 v5;
char *v6;
__int16 v7;
if( !ExpSpecialAllocations || (LODWORD(v5) = ExGetHeapFromVA(P), !(unsigned int)ExpHpIsSpecialPoolHeap(v5)) )
{
v2 = *((char *)P - 13);
if( (v2 & 8) != 0 )
{
BilledProcess = (_EPROCESS *)ExpGetBilledProcess((INT64)P - 16);
if( BilledProcess )
{
v4 = (unsigned __int8)*((_WORD *)P - 7);
if( (v2 & 4) != 0 )
{
v6 = (char *)P - 16 * (unsigned __int8)*((_WORD *)P - 8) - 16;
v7 = *((_WORD *)v6 + 1);
v6[3] &= ~8u;
v4 = (unsigned __int8)v7;
}
*((char *)P - 13) &= ~8u;
PsReturnPoolQuota((PEPROCESS)BilledProcess, (POOL_TYPE)(v2 & 1), 16 * v4);
ObDereferenceObjectDeferDeleteWithTag(BilledProcess, *((unsigned int *)P - 3));
}
}
}
}Referenced by:
IopCompleteRequest
IopFreeIrp
IopFreeMiniCompletionPacket