Newer
Older
AMI-Aptio-BIOS-Reversed / EarlyVideoPei / VgaModeSetClockMask.c
@Ajax Dong Ajax Dong 2 days ago 699 bytes Init
char __thiscall VgaModeSetClockMask(int this)
{
  int n0x20; // eax
  int v3; // ecx

  LOBYTE(n0x20) = *(_BYTE *)(this + 28);
  if ( (unsigned __int8)n0x20 >= 0x20u )
  {
    *(_BYTE *)(this + 29) = 1;
    *(_DWORD *)(this + 32) = 396;
LABEL_6:
    *(_DWORD *)(this + 36) = 16;
    return n0x20;
  }
  *(_DWORD *)(this + 36) = 32;
  if ( (unsigned __int8)n0x20 < 0x10u )
  {
    *(_BYTE *)(this + 29) = 2;
    *(_DWORD *)(this + 32) = 166;
    return n0x20;
  }
  v3 = *(_DWORD *)(this + 60);
  *(_BYTE *)(this + 29) = 1;
  *(_DWORD *)(this + 32) = 266;
  n0x20 = PciRegRead(v3, 510533756) & 0x300;
  if ( n0x20 == 512 )
  {
    *(_DWORD *)(this + 32) = 200;
    goto LABEL_6;
  }
  return n0x20;
}