Newer
Older
AMI-Aptio-BIOS-Reversed / EarlyVideoPei / VgaModeSetPitch.c
@Ajax Dong Ajax Dong 2 days ago 532 bytes Init
int __thiscall VgaModeSetPitch(int *this)
{
  int v1; // ecx
  int v2; // ecx
  int v3; // esi
  int v4; // eax
  int v5; // edx
  int v6; // esi

  PciRegWrite(*(this + 15), 510525552, 0);
  PciRegWrite(v1, 510525552, 133);
  v3 = 0;
  while ( 1 )
  {
    v4 = PciRegRead(v2, 510525552) & 0x3000;
    if ( (v4 & 0x2000) != 0 )
      return 0;
    if ( (unsigned int)++v3 > 0x4C4B40 )
    {
      v6 = 0;
      goto LABEL_7;
    }
    if ( v4 )
    {
      v6 = 1;
LABEL_7:
      PciRegWrite(v2, v5, 0);
      return v6;
    }
  }
}