Newer
Older
AMI-Aptio-BIOS-Reversed / KbcEmulDxe / KbcEmulDxe_7C4.c
@Ajax Dong Ajax Dong 2 days ago 840 bytes Init
// Original function: sub_7C4
// Address: 0x7C4
// Signature: __int64 sub_7C4()

__int64 sub_7C4()
{
  __int64 result; // rax
  unsigned __int64 n0x10; // rbx
  __int64 v2; // rax
  __int64 v3; // rcx

  result = qword_1228; /*0x7ce*/
  if ( !qword_1228 ) /*0x7da*/
  {
    n0x10 = (*(__int64 (__fastcall **)(__int64))(BootServices + 24))(31); /*0x7f3*/
    (*(void (__fastcall **)(unsigned __int64))(BootServices + 32))(n0x10); /*0x7f6*/
    if ( n0x10 <= 0x10 ) /*0x7fd*/
    {
      v2 = (*(__int64 (__fastcall **)(void *, _QWORD, __int64 *))(BootServices + 320))(&unk_1160, 0, &qword_1228); /*0x81a*/
      v3 = qword_1228; /*0x820*/
      if ( v2 < 0 ) /*0x82a*/
        v3 = 0; /*0x82a*/
      qword_1228 = v3; /*0x82e*/
      return v3; /*0x835*/
    }
    else
    {
      return 0; /*0x7ff*/
    }
  }
  return result; /*0x83d*/
}