Newer
Older
AMI-Aptio-BIOS-Reversed / EarlyVideoPei / VgaSeqSetClocking.c
@Ajax Dong Ajax Dong 2 days ago 1 KB Init
unsigned __int8 __fastcall VgaSeqSetClocking(int a1, int a2)
{
  int v2; // esi
  char *_@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__; // esi
  char v5; // al

  v2 = 3 * *(_DWORD *)(*(_DWORD *)(a2 + 20) + 32);
  if ( *(_BYTE *)(a1 + 28) == 64 )
    _@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__ = &a8s8cPs5pc1Sahs[v2];// "@8s:8C>ps5pC1(sAhs1hSJhs@hS1`s:(C>`s5`c=@cN`c5`SL`cOHSF`s< c= cFhSIhCN`s8`s8 s"
  else
    _@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__ = (char *)&unk_FFE7B7EC + v2;
  VgaSeqRegReadModifyWrite(0x3D4u, 0xC0u, 0, *_@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__);
  VgaSeqRegReadModifyWrite(0x3D4u, 0xC1u, 0, _@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__[1]);
  if ( *(_BYTE *)(a1 + 28) == 64 )
    v5 = _@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__[2] & 0xF0;
  else
    v5 = _@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__[2] & 0xC0
       | (16 * (_@8s:8C_ps5pC1(sAhs1hSJhs@hS1_s:(C__s5_c_@cN_c5_SL_cOHSF_s__c__[2] & 3));
  return VgaSeqRegReadModifyWrite(0x3D4u, 0xBBu, 15, v5);
}