PpmUpdatePerfStates

void __fastcall PpmUpdatePerfStates(_DWORD *a1){
  INT64 v2; 
  INT64 v3; 
  char v4; 
  unsigned int v5; 
  unsigned int v6; 
  __int64 v7; 
  __int64 v8; 
  __int64 v9; 
  __int64 v10; 
  PpmAcquireLock(&PpmPerfPolicyLock);
  if( a1[2] )
  {
    v2 = PpmPerfDomainHead;
    v3 = 0i64;
    v4 = 0;
    while( (INT64 *)v2 != &PpmPerfDomainHead )
    {
      v5 = *(_DWORD *)(v2 + 200);
      v6 = 0;
      v3 = v2;
      if( v5 )
      {
        v7 = *(_QWORD *)(v2 + 216);
        while( 1 )
        {
          v8 = 136i64 * v6;
          if( *(_DWORD *)(v8 + v7 + 16) )
          {
            if( *(_DWORD *)(v8 + v7 + 20) == a1[1] )
              break;
          }
          if( ++v6 >= v5 )
            goto LABEL_8;
        }
        v4 = 1;
        break;
      }
LABEL_8:
      v2 = *(_QWORD *)v2;
    }
    v9 = v3 & -(__int64)(v4 != 0);
  }
  else
  {
    KeGetPrcb((unsigned int)a1[1]);
    v9 = *(_QWORD *)(v10 + 33128);
  }
  if( v9 )
  {
    if( *(_DWORD *)(v9 + 320) == *a1 )
    {
      PpmReleaseLock(&PpmPerfPolicyLock);
    }
    else
    {
      *(_DWORD *)(v9 + 320) = *a1;
      PpmPerfUpdateDomainPolicy(1);
    }
    if( (unsigned int)PpmPerfDomainCount > 1 )
    {
      PpmAcquireLock(&PpmPerfPolicyLock);
      PpmReinitializeHeteroEngine(1);
    }
  }
}

Referenced by:

No references.