Newer
Older
AMI-Aptio-BIOS-Reversed / AmiModulePkg / KbcEmulation / KbcEmulDxe / KbcEmulDxe_66C.c
@Ajax Dong Ajax Dong 2 days ago 804 bytes Restructure the repo
// Original function: sub_66C
// Address: 0x66C
// Signature: char __fastcall sub_66C(__int64 a1)

char __fastcall sub_66C(__int64 a1)
{
  unsigned __int8 n0xA; // bl
  char v2; // di
  unsigned __int8 v3; // al
  unsigned __int8 v4; // al

  LOBYTE(a1) = 1; /*0x676*/
  n0xA = 0; /*0x67d*/
  v2 = sub_6E8(a1); /*0x67f*/
  if ( v2 && !byte_11F9 && byte_11F8 ) /*0x694*/
  {
    do /*0x6c7*/
    {
      v3 = __inbyte(0x64u); /*0x69b*/
      if ( (v3 & 1) == 0 ) /*0x69e*/
      {
        (*(void (__fastcall **)(__int64))(BootServices_0 + 248))(500); /*0x6ac*/
        v4 = __inbyte(0x64u); /*0x6b7*/
        if ( (v4 & 1) == 0 ) /*0x6ba*/
          break; /*0x6ba*/
      }
      __inbyte(0x60u); /*0x6c1*/
      ++n0xA; /*0x6c2*/
    }
    while ( n0xA < 0xAu ); /*0x6c7*/
  }
  return v2; /*0x6d1*/
}