Newer
Older
AMI-Aptio-BIOS-Reversed / MdeModulePkg / Core / DxeIplPeim / DxeIplDecompress.c
@Ajax Dong Ajax Dong 2 days ago 1 KB Full restructure
/* DxeIplDecompress @ 0xffc164ee size=0x79 */
int __fastcall DxeIplDecompress(_DWORD *a1, int a2, int a3, int a4)
{
  int result; // eax
  _DWORD *this_1; // ebx
  unsigned int v7; // esi
  _DWORD *v8; // edx
  _DWORD *v9; // ecx
  int v10; // ecx
  _DWORD *this; // [esp+10h] [ebp-8h] BYREF
  int v12; // [esp+14h] [ebp-4h]

  v12 = a2; /*0xffc164fc*/
  result = DxeIplFvOpenDevice(&this); /*0xffc16504*/
  if ( result >= 0 )
  {
    this_1 = this; /*0xffc16512*/
    v7 = 0; /*0xffc16523*/
    v8 = (_DWORD *)((char *)a1 + ((*a1 & 0xFFFFFF) != 0xFFFFFF ? 0xFFFFFFFC : 0) + 8);
    if ( this[1] ) /*0xffc1652b*/
    {
      v9 = (_DWORD *)this[2]; /*0xffc16530*/
      while ( !DxeIplFvIsAddrValid(v9, v8) ) /*0xffc1653a*/
      {
        ++v7; /*0xffc1653c*/
        v9 = (_DWORD *)(v10 + 16); /*0xffc1653d*/
        if ( v7 >= this_1[1] ) /*0xffc16543*/
          return -2147483645; /*0xffc16543*/
      }
      return (*(int (__cdecl **)(_DWORD *, int, int, int))(this_1[3] + 4 * v7))(a1, v12, a3, a4); /*0xffc1655f*/
    }
    else
    {
      return -2147483645; /*0xffc16545*/
    }
  }
  return result; /*0xffc1654a*/
}