PfFbBufferListAllocateTemporary

NTSTATUS __stdcall PfFbBufferListAllocateTemporary(PFFB_BUFFER_LIST *BufferList, INT64 AllocationSize){
  unsigned int v2; 
  NTSTATUS result; 
  VOID **PoolWithTag; 
  INT64 v6; 

  v2 = AllocationSize;
  if( (int)AllocationSize + _InterlockedExchangeAdd(BufferList + 26, AllocationSize) > BufferList[21] )
  {
    result = -1073741523;
LABEL_3:
    _InterlockedExchangeAdd(BufferList + 26, -v2);
    return result;
  }
  PoolWithTag = ExAllocatePoolWithTag((unsigned int)BufferList[18], (int)AllocationSize, (unsigned int)BufferList[17]);
  if( !PoolWithTag )
  {
    result = -1073741670;
    goto LABEL_3;
  }
  LODWORD(v6) = 0;
  PfFbBufferListInsertInFree((_EX_RUNDOWN_REF *)BufferList, PoolWithTag, v2, 1i64, v6);
  return 0;
}

Referenced by:

PfpEventHandleOutOfBuffers
PfpSectInfoHandleOutOfBuffers