PopRecordPepWorkorderBlackboxInformation

VOID __stdcall PopRecordPepWorkorderBlackboxInformation(){
  unsigned int v0; 
  _DWORD *v1; 
  unsigned __int64 v2; 
  void **v3; 
  __int64 v4; 
  __int64 v5; 
  VOID **PoolWithTag; 
  _DWORD *v7; 
  __int64 **i; 
  unsigned __int64 v9; 
  __int64 *v10; 
  __int64 v11; 
  __int64 v12; 
  UINT64 v13; 
  __int128 InputBuffer; 
  __int128 v15; 

  InputBuffer = 0i64;
  v0 = 0;
  v1 = 0i64;
  v15 = 0i64;
  v2 = (unsigned __int8)KeAcquireSpinLockRaiseToDpc((UINT64 *)&stru_140C23628 + 530);
  v3 = (void **)*(&stru_140C23628 + 531);
  if( (_UNKNOWN *)*(&stru_140C23628 + 531) == (_UNKNOWN *)((char *)&stru_140C23628 + 4248) )
    goto LABEL_13;
  do
  {
    v3 = (void **)*v3;
    v4 = v0++;
  }
  while( v3 != (void **)((char *)&stru_140C23628 + 4248) );
  if( !v0 )
  {
LABEL_13:
    v5 = 0i64;
  }
  else
  {
    v5 = 48 * v4 + 64;
    PoolWithTag = ExAllocatePoolWithTag(0x200ui64, v5, 1111641936i64);
    v1 = PoolWithTag;
    if( PoolWithTag )
    {
      memset(PoolWithTag, 0i64, v5);
      *v1 = 1;
      v7 = v1 + 4;
      v1[1] = v5;
      v1[2] = v0;
      for( i = (__int64 **)*(&stru_140C23628 + 531); i != (__int64 **)((char *)&stru_140C23628 + 4248); v7 += 12 )
      {
        v9 = *(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart - (_QWORD)i[20];
        *((_QWORD *)v7 + 1) = i;
        *v7 = v9 / 0x2710;
        *((_QWORD *)v7 + 2) = i[18];
        v10 = i[19];
        *((_QWORD *)v7 + 3) = v10;
        if( v10 )
        {
          v7[8] = *(_DWORD *)v10;
          if( v10 != (__int64 *)-8i64 )
          {
            v11 = v10[1];
            if( v11 )
            {
              v12 = *(_QWORD *)(v11 + 64);
              if( v12 )
                *((_QWORD *)v7 + 5) = *(_QWORD *)(v12 + 96);
            }
          }
        }
        i = (__int64 **)*i;
      }
    }
  }
  KxReleaseSpinLock((UINT64 *)&stru_140C23628 + 530);
  __writecr8(v2);
  if( v5 )
  {
    *(_QWORD *)&v15 = 0i64;
    LODWORD(v13) = 0;
    *((_QWORD *)&v15 + 1) = 7i64;
    *(_QWORD *)&InputBuffer = v1;
    *((_QWORD *)&InputBuffer + 1) = (unsigned int)v5;
    NtPowerInformation(PowerInformationLevelMaximum|SystemPowerCapabilities, &InputBuffer, 0x20ui64, 0i64, v13);
  }
  if( v1 )
    ExFreePoolWithTag(v1, 0x42424F50u);
}

Referenced by:

PopRecordPoBlackboxInformation