HvlGetPpmStatsForProcessor

UINT64 __stdcall HvlGetPpmStatsForProcessor(_KPRCB *Prcb, UINT64 *IdleTime, UINT64 *ActiveTscCount){
  __int64 v6; 
  unsigned __int64 *StatisticsPage; 
  unsigned __int64 v8; 
  __int64 v9; 
  unsigned __int64 *v10; 
  UINT64 ReferenceTime; 
  __int64 v13; 

  if( Prcb == KeGetCurrentPrcb() )
  {
    v6 = HIDWORD(xmmword_140CED0E0);
    StatisticsPage = Prcb->StatisticsPage;
    do
    {
      v8 = StatisticsPage[v6];
      *ActiveTscCount = Prcb->StatisticsPage[(unsigned int)xmmword_140CED0F0];
    }
    while( v8 != StatisticsPage[v6] );
    v9 = DWORD1(xmmword_140CED0F0);
    v10 = Prcb->StatisticsPage;
    do
    {
      *IdleTime = v10[v9];
      ReferenceTime = HvlGetReferenceTime();
    }
    while( *IdleTime != v10[v9] );
  }
  else
  {
    ReferenceTime = HvlGetReferenceTime();
    v13 = (unsigned int)xmmword_140CED0F0;
    *IdleTime = ReferenceTime - Prcb->StatisticsPage[DWORD1(xmmword_140CED0E0)];
    *ActiveTscCount = Prcb->StatisticsPage[v13];
  }
  return ReferenceTime;
}

Referenced by:

PpmUpdatePerformanceFeedback