Newer
Older
AMI-Aptio-BIOS-Reversed / PurleyPlatPkg / Platform / Pei / EarlyVideoPei / ImageDecodePrintInfo.c
@Ajax Dong Ajax Dong 2 days ago 877 bytes Full restructure
char *__fastcall ImageDecodePrintInfo(unsigned int n2)
{
  unsigned int n3; // edx

  if ( !n2 )
    return "EFI_SUCCESS";
  if ( (n2 & 0x80000000) != 0 )
  {
    n3 = n2 & 0x1FFFFFFF;
    if ( (n2 & 0xA0000000) == 0xA0000000 )
    {
      if ( n3 >= 3 )
        return 0;
      // "EFI_INTERRUPT_PENDING"
      return &aEfiInterruptPe[25 * n3];
    }
    else if ( (n2 & 0xC0000000) == 0xC0000000 )
    {
      if ( n3 > 2 )
        return 0;
      // "ABLE_YET"
      return &aAbleYet[25 * n3];
    }
    else
    {
      if ( n3 > 0x1E )
        return 0;
      // "E_BOF"
      return &aEBof[25 * n3];
    }
  }
  else if ( (n2 & 0x20000000) != 0 )
  {
    if ( n2 >= 2 )
      return 0;
    // "EFI_WARN_INTERRUPT_SOURCE_PENDING"
    return &aEfiWarnInterru[35 * n2];
  }
  else
  {
    if ( n2 > 4 )
      return 0;
    // "|||||"
    return &asc_FFE82BA2[26 * n2];
  }
}