Newer
Older
AMI-Aptio-BIOS-Reversed / PurleyPlatPkg / Platform / Pei / EarlyVideoPei / VgaSeqUnlock.c
@Ajax Dong Ajax Dong 2 days ago 436 bytes Full restructure
unsigned __int8 __fastcall VgaSeqUnlock(int a1, _DWORD *a2)
{
  unsigned int v2; // ecx
  unsigned __int8 result; // al
  unsigned __int8 v4; // [esp+4h] [ebp-4h]
  unsigned __int8 v5; // [esp+4h] [ebp-4h]

  v2 = (*a2 * ((unsigned int)(a2[2] + 7) >> 3)) >> 3;
  v4 = v2;
  __outbyte(0x3D4u, 0x13u);
  __outbyte(0x3D5u, v4);
  v5 = BYTE1(v2) & 0x3F;
  __outbyte(0x3D4u, 0xB0u);
  result = v5;
  __outbyte(0x3D5u, v5);
  return result;
}