Newer
Older
AMI-Aptio-BIOS-Reversed / PurleySktPkg / SouthClusterLbg / SiInit / Pei / SiInitPreMem / decompiled / ffd7fb51.c
@Ajax Dong Ajax Dong 7 days ago 917 bytes Recovering names
int __thiscall FindLatestPerformanceEntry(unsigned int *this)
{
  int v2; // esi
  unsigned int v3; // eax
  int v4; // ebx
  int v5; // ebp
  unsigned int v7; // [esp+8h] [ebp-4h]

  v2 = 0; /*0xffd7fb56*/
  v3 = *this; /*0xffd7fb58*/
  v7 = *this; /*0xffd7fb5a*/
  if ( *this ) /*0xffd7fb58*/
  {
    while ( 1 ) /*0xffd7fb68*/
    {
      v4 = v3 - v2 - 1; /*0xffd7fb68*/
      v5 = 40 * v4; /*0xffd7fb69*/
      if ( !*((_QWORD *)this + 5 * v4 + 5) /*0xffd7fba8*/
        && *(_UNKNOWN **)((char *)this + v5 + 8) == &unk_FFD97F8C
        && *(unsigned int *)((char *)this + v5 + 12) == (*(this + 10 * v4 + 11) | *(this + 10 * v4 + 10))
        && !sub_FFD8D0FF(7)
        && !sub_FFD8D0FF(7) )
      {
        break; /*0xffd7fba8*/
      }
      v3 = v7; /*0xffd7fbb2*/
      if ( ++v2 >= v7 ) /*0xffd7fbb9*/
        return v2; /*0xffd7fbb9*/
    }
    return v4; /*0xffd7fbbd*/
  }
  return v2; /*0xffd7fbc1*/
}