Newer
Older
AMI-Aptio-BIOS-Reversed / TxtPei / DebugGetErrorLevel.c
@Ajax Dong Ajax Dong 2 days ago 763 bytes Init
// Decompiled: 0xffe07888
// Function: DebugGetErrorLevel
// Module: TxtPei.efi (TXTPEI)

int DebugGetErrorLevel()
{
  unsigned __int8 v0; // al
  char n3; // al
  char n3_1; // cl

  v0 = __inbyte(0x70u); /*0xffe0788e*/
  __outbyte(0x70u, v0 & 0x80 | 0x4A); /*0xffe07893*/
  n3 = __inbyte(0x71u); /*0xffe0789a*/
  n3_1 = n3; /*0xffe0789b*/
  if ( (unsigned __int8)n3 <= 3u ) /*0xffe078a0*/
  {
LABEL_4:
    if ( !n3_1 ) /*0xffe078bb*/
      return 0; /*0xffe078bb*/
    goto LABEL_5; /*0xffe078bb*/
  }
  n3_1 = n3; /*0xffe078a2*/
  if ( !n3 ) /*0xffe078aa*/
  {
    n3_1 = MEMORY[0xFDAF0490] & 2 | 1; /*0xffe078b6*/
    goto LABEL_4; /*0xffe078b6*/
  }
LABEL_5:
  if ( n3_1 != -1 )
    return n3_1 != 1 ? -2147483578 : -2147483644;
  return 0; /*0xffe078d3*/
}