EtwpDequeueBufferPendingCompression

_WMI_BUFFER_HEADER *__stdcall EtwpDequeueBufferPendingCompression(_WMI_LOGGER_CONTEXT *LoggerContext){
  _SINGLE_LIST_ENTRY *Next; 
  _SINGLE_LIST_ENTRY *v3; 
  _SINGLE_LIST_ENTRY *v4; 
  VOID **PoolWithTag; 
  _WMI_BUFFER_HEADER *v6; 
  _WMI_BUFFER_HEADER *v7; 
  _WMI_BUFFER_HEADER *v8; 
  _WMI_BUFFER_HEADER *v9; 
  _ETW_LOCK_HANDLE LockHandle; 

  Next = LoggerContext->PlaceholderList.Next;
  LockHandle.OldIrql = 0;
  if( Next )
  {
    v3 = Next->Next;
    v4 = Next - 4;
    LoggerContext->PlaceholderList.Next = v3;
  }
  else
  {
    PoolWithTag = ExAllocatePoolWithTag((unsigned int)LoggerContext->PoolType, 0x48ui64, 1115124805i64);
    v4 = (_SINGLE_LIST_ENTRY *)PoolWithTag;
    if( !PoolWithTag )
    {
LABEL_11:
      EtwpDisableCompression(LoggerContext);
      return 0i64;
    }
    PoolWithTag[4] = 0i64;
    *((_DWORD *)PoolWithTag + 11) = 6;
  }
  if( !v4 )
    goto LABEL_11;
  EtwpLockBufferList(LoggerContext, &LockHandle);
  v7 = EtwpDequeueBufferPendingCompressionFromQueue(
         &LoggerContext->OverflowQueue,
         (INT64 *)&LoggerContext->BuffersAvailable,
         (_WMI_BUFFER_HEADER *)v4,
         v6);
  if( !v7 )
    v7 = EtwpDequeueBufferPendingCompressionFromQueue(
           &LoggerContext->BufferQueue,
           (INT64 *)&LoggerContext->BuffersAvailable,
           v8,
           v9);
  EtwpUnlockBufferList(LoggerContext, &LockHandle);
  if( !v7 )
  {
    v4[4].Next = (_SINGLE_LIST_ENTRY *)LoggerContext->PlaceholderList;
    LoggerContext->PlaceholderList.Next = v4 + 4;
  }
  return v7;
}

Referenced by:

EtwpCompressPendingBuffers