Newer
Older
AMI-Aptio-BIOS-Reversed / Platform / SetupBufferOps.c
@Ajax Dong Ajax Dong 2 days ago 787 bytes Init
// SetupBufferOps - decompiled from Platform.efi
__int64 __fastcall SetupBufferOps(const void *SourceBuffer, unsigned __int64 n209, UINTN Length)
{
  __int64 v5; // rbx
  const void **p_DestinationBuffer; // rax

  if ( !SourceBuffer ) /*0x826e*/
    return -1; /*0x8270*/
  v5 = 0; /*0x8276*/
  if ( off_FD00 ) /*0x8286*/
  {
    p_DestinationBuffer = (const void **)&off_FD00; /*0x8288*/
    do /*0x82a5*/
    {
      if ( (unsigned __int8)CompareMem(*p_DestinationBuffer, SourceBuffer, Length) ) /*0x8291*/
        break; /*0x8298*/
      ++v5; /*0x829a*/
      p_DestinationBuffer = (const void **)(&off_FD00 + 3 * v5); /*0x82a1*/
    }
    while ( *p_DestinationBuffer ); /*0x82a5*/
  }
  if ( !*(&off_FD00 + 3 * v5) ) /*0x82b3*/
    return -1; /*0x82b8*/
  return v5; /*0x82c9*/
}