AlpcpDereferenceBlobEx
VOID __stdcall AlpcpDereferenceBlobEx(PVOID Blob, INT64 References){
signed __int64 BugCheckParameter4;
__int64 v4;
char *v5;
BugCheckParameter4 = -(int)References
+ _InterlockedExchangeAdd64((volatile signed __int64 *)Blob - 3, -(int)References);
if( BugCheckParameter4 <= 0 )
{
if( BugCheckParameter4 )
KeBugCheckEx(0x18u, 0i64, (ULONG_PTR)Blob, 0x21ui64, BugCheckParameter4);
v4 = AlpcpRegisteredTypes[(unsigned __int8)*((char *)Blob - 31)];
(*(void(**)(void))(v4 + 24))();
if( (*(int(__fastcall **)(PVOID))(v4 + 40))(Blob) >= 0 )
{
if( (*((char *)Blob - 32) & 2) != 0 )
{
ExFreeToNPagedLookasideList(
(NPAGED_LOOKASIDE_LIST *)&AlpcpLookasides[16 * (unsigned __int64)*(unsigned int *)(v4 + 8)],
(char *)Blob - 48);
}
else
{
v5 = (char *)Blob - 48;
if( *(_QWORD *)(v4 + 48) )
((void(__fastcall *)(char *))AlpcpLookasides[16 * (unsigned __int64)*(unsigned int *)(v4 + 8) + 7])(v5);
else
ExFreePoolWithTag(v5, *(_DWORD *)(v4 + 4));
}
}
}
}Referenced by:
AlpcCreateSecurityContext
AlpcMessageCleanupProcedure
AlpcMessageDestroyProcedure
AlpcRegionDestroyProcedure
AlpcViewDestroyProcedure
AlpcpCaptureHandleAttributeInternal
AlpcpCaptureSecurityAttributeInternal
AlpcpCaptureViewAttributeInternal
AlpcpCleanupProcessViews
AlpcpCreateReserve
AlpcpCreateSection
AlpcpCreateSectionView
AlpcpCreateSecurityContext
AlpcpCreateView
AlpcpDeletePort
AlpcpDeleteView
AlpcpDereferenceView
AlpcpExposeAttributes
AlpcpExposeHandleAttribute
AlpcpExposeViewAttribute
AlpcpExposeViewAttributeInSenderContext
AlpcpFlushCancelQueue
AlpcpForceUnlinkSecureView
AlpcpLookupMessage
AlpcpPrepareViewForDelivery
AlpcpReleaseAttributes
AlpcpReleaseMessageAttributesOnCancel
AlpcpReleaseViewAttribute
AlpcpSendMessage
NtAlpcCreatePortSection
NtAlpcCreateSectionView
NtAlpcCreateSecurityContext
NtAlpcDeletePortSection
NtAlpcDeleteResourceReserve
NtAlpcDeleteSectionView
NtAlpcDeleteSecurityContext
NtAlpcRevokeSecurityContext
NtSecureConnectPort