Newer
Older
AMI-Aptio-BIOS-Reversed / KbcEmulDxe / KbcEmulDxe_8CC.c
@Ajax Dong Ajax Dong 2 days ago 1 KB Init
// Original function: sub_8CC
// Address: 0x8CC
// Signature: __int64 __fastcall sub_8CC(__int64 a1)

__int64 __fastcall sub_8CC(__int64 a1)
{
  __int64 result; // rax
  __int64 SystemTable; // rdi
  unsigned __int64 v3; // rbx
  __int64 v4; // rsi

  result = qword_1230; /*0x8db*/
  if ( !qword_1230 ) /*0x8e5*/
  {
    SystemTable = SystemTable; /*0x8eb*/
    v3 = 0; /*0x8f2*/
    qword_1230 = 0; /*0x8f4*/
    if ( *(_QWORD *)(SystemTable + 104) ) /*0x8fb*/
    {
      v4 = 0; /*0x901*/
      while ( !(unsigned __int8)sub_B88(a1, v4 + *(_QWORD *)(SystemTable + 112)) ) /*0x911*/
      {
        ++v3; /*0x913*/
        v4 += 24; /*0x916*/
        if ( v3 >= *(_QWORD *)(SystemTable + 104) ) /*0x91e*/
          goto LABEL_6; /*0x91e*/
      }
      result = *(_QWORD *)(*(_QWORD *)(SystemTable + 112) + 24 * v3 + 16); /*0x994*/
      qword_1230 = result; /*0x999*/
    }
    else
    {
LABEL_6:
      sub_844(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", 0x800000000000000EuLL); /*0x920*/
      sub_88C((__int64)"e:\\hs\\MdePkg\\Library\\DxeHobLib\\HobLib.c", 54, (__int64)"!EFI_ERROR (Status)"); /*0x94e*/
      result = qword_1230; /*0x953*/
    }
    if ( !result ) /*0x95d*/
    {
      sub_88C((__int64)"e:\\hs\\MdePkg\\Library\\DxeHobLib\\HobLib.c", 55, (__int64)"mHobList != ((void *) 0)"); /*0x970*/
      return qword_1230; /*0x975*/
    }
  }
  return result; /*0x986*/
}