PfFbBufferListInsertInFree

VOID __fastcall PfFbBufferListInsertInFree(_EX_RUNDOWN_REF *RunRef, VOID *P, INT64 a3, INT64 a4, INT64 a5){
  char *v7; 
  __int64 Ptr_high; 
  char *v9; 

  if( (a4 & 1) != 0 && LOWORD(RunRef[2].Count) + (unsigned int)LOWORD(RunRef[4].Count) >= (int)KeNumberProcessors_0 + 1 )
  {
    _InterlockedExchangeAdd((volatile signed __int32 *)&RunRef[13], -(int)a3);
    ExFreePoolWithTag(P, HIDWORD(RunRef[8].Ptr));
  }
  else
  {
    v7 = (char *)P + (int)a3;
    *((_QWORD *)P + 2) = RunRef;
    *((_QWORD *)P + 4) = v7;
    Ptr_high = HIDWORD(RunRef[9].Ptr);
    *((_DWORD *)P + 10) = 0;
    v9 = (char *)P + Ptr_high;
    *((_QWORD *)P + 3) = v9;
    *((_DWORD *)P + 11) = a4;
    memset(v9, 0i64, (_DWORD)v7 - (_DWORD)v9);
    RtlpInterlockedPushEntrySList((PSLIST_HEADER)&RunRef[2], (PSLIST_ENTRY)P);
  }
  if( (_DWORD)a5 )
    ExReleaseRundownProtection(RunRef);
}

Referenced by:

PfFbBufferListAllocate
PfFbBufferListAllocateTemporary
PfFbBufferListFlushStandby
PfTCleanup
PfTFullEventListAdd
PfpFlushEventBuffers
PfpRepurposeNameLoggingTrace