EtwpProcessorRundown

VOID __stdcall EtwpProcessorRundown(UINT64 LoggerId, UINT8 Start){
  VOID **PoolWithTag; 
  unsigned int ActiveProcessorCount; 
  unsigned int v5; 
  unsigned int v6; 
  unsigned int v7; 
  _ETW_SILODRIVERSTATE *v8; 
  UINT16 ActiveGroupCount; 
  unsigned int v10; 
  unsigned int v11; 
  _QWORD *v12; 
  __int64 v13; 
  unsigned int v14; 
  _ETW_SILODRIVERSTATE *v15; 
  INT64 v16; 
  INT64 v17; 
  unsigned __int16 v18; 
  bool v19; 
  int v20; 
  unsigned int v21; 
  _ETW_SILODRIVERSTATE *v22; 
  unsigned int v23; 
  unsigned int v24; 
  int v25; 
  _OWORD P[64]; 
  unsigned int *v27; 
  __int64 v28; 
  VOID **v29; 
  int v30; 
  int v31; 

  memset(P, 0i64, sizeof(P));
  PoolWithTag = (VOID **)P;
  ActiveProcessorCount = KeQueryActiveProcessorCountEx(0xFFFFu);
  v5 = 0;
  v23 = ActiveProcessorCount;
  if( ActiveProcessorCount > 0x20 )
  {
    PoolWithTag = ExAllocatePoolWithTag(1ui64, 4i64 * ActiveProcessorCount, 1953985605i64);
    if( !PoolWithTag )
      goto LABEL_8;
    ActiveProcessorCount = v23;
  }
  v6 = 0;
  if( ActiveProcessorCount )
  {
    do
    {
      KeGetProcessorNumberFromIndex(v6, (PROCESSOR_NUMBER *)PoolWithTag + v6);
      ActiveProcessorCount = v23;
      ++v6;
    }
    while( v6 < v23 );
  }
  v7 = *(_DWORD *)LoggerId;
  v8 = *(_ETW_SILODRIVERSTATE **)(LoggerId + 1080);
  v30 = 4 * ActiveProcessorCount;
  v27 = &v23;
  v28 = 4i64;
  v29 = PoolWithTag;
  v31 = 0;
  EtwpLogKernelEvent((__int64)&v27, v8, v7, 2u, 0xB1Bu, 0x401802u);
  if( PoolWithTag != (VOID **)P )
    ExFreePoolWithTag(PoolWithTag, 0);
LABEL_8:
  ActiveGroupCount = KeQueryActiveGroupCount();
  v10 = ActiveGroupCount;
  v11 = 0;
  v25 = ActiveGroupCount;
  if( ActiveGroupCount )
  {
    v12 = P;
    do
    {
      LODWORD(v13) = KeQueryGroupAffinity(v11++);
      *v12++ = v13;
    }
    while( v11 < v10 );
  }
  v14 = *(_DWORD *)LoggerId;
  v15 = *(_ETW_SILODRIVERSTATE **)(LoggerId + 1080);
  v27 = (unsigned int *)&v25;
  v29 = (VOID **)P;
  v30 = 8 * v10;
  v28 = 4i64;
  v31 = 0;
  EtwpLogKernelEvent((__int64)&v27, v15, v14, 2u, 0xB1Au, 0x401802u);
  KeQueryHighestNodeNumber(v17, v16);
  v19 = v18 == -1;
  v20 = v18 + 1;
  v24 = v20;
  if( !v19 )
  {
    do
    {
      KeQueryNodeActiveAffinity(v5, (PGROUP_AFFINITY)&P[v5], 0i64);
      v20 = v24;
      ++v5;
    }
    while( v5 < v24 );
  }
  v21 = *(_DWORD *)LoggerId;
  v22 = *(_ETW_SILODRIVERSTATE **)(LoggerId + 1080);
  v30 = 16 * v20;
  v27 = &v24;
  EtwpLogKernelEvent((__int64)&v27, v22, v21, 2u, 0xB18u, 0x401802u);
}

Referenced by:

EtwpKernelTraceRundown