Newer
Older
AMI-Aptio-BIOS-Reversed / MdeModulePkg / Core / DxeIplPeim / DxeIplDecodeData.c
@Ajax Dong Ajax Dong 2 days ago 2 KB Full restructure
/* DxeIplDecodeData @ 0xffc187d2 size=0x123 */
int __fastcall DxeIplDecodeData(
        int a1,
        unsigned int *a2,
        unsigned __int8 *a3,
        unsigned int *a4,
        int a5,
        int a6,
        int a7,
        _DWORD *a8,
        int a9)
{
  int result; // eax
  int n6; // esi
  unsigned int n5; // [esp+10h] [ebp-90h]
  unsigned int v13; // [esp+18h] [ebp-88h]
  _DWORD v15[4]; // [esp+20h] [ebp-80h] BYREF
  _DWORD v16[4]; // [esp+30h] [ebp-70h] BYREF
  int v17; // [esp+40h] [ebp-60h]
  int v18; // [esp+44h] [ebp-5Ch]
  unsigned int v19; // [esp+54h] [ebp-4Ch]
  unsigned int v20; // [esp+58h] [ebp-48h]
  int v21; // [esp+5Ch] [ebp-44h]
  int v22; // [esp+60h] [ebp-40h]
  int v23; // [esp+78h] [ebp-28h]
  int v24; // [esp+7Ch] [ebp-24h]
  int v25; // [esp+80h] [ebp-20h]
  int v26; // [esp+88h] [ebp-18h]

  v13 = *a2; /*0xffc187fb*/
  n5 = *a4; /*0xffc187ff*/
  *a4 = 0; /*0xffc18803*/
  *a2 = 0; /*0xffc18806*/
  *a8 = 0; /*0xffc18808*/
  if ( n5 < 5 ) /*0xffc1880d*/
    return 6; /*0xffc18811*/
  v18 = 0; /*0xffc1881e*/
  v17 = 0; /*0xffc18822*/
  result = DxeIplDecodeSetup(v15, a5); /*0xffc1882a*/
  if ( !result ) /*0xffc18838*/
  {
    result = DxeIplDecodeCleanup(a9); /*0xffc18845*/
    if ( !result ) /*0xffc1884d*/
    {
      v16[0] = v15[0]; /*0xffc1885b*/
      v16[1] = v15[1]; /*0xffc1885c*/
      v16[2] = v15[2]; /*0xffc1885d*/
      v16[3] = v15[3]; /*0xffc1885e*/
      v19 = 0; /*0xffc18874*/
      v23 = 0; /*0xffc1887a*/
      v26 = 0; /*0xffc1887f*/
      v21 = 0; /*0xffc18887*/
      v22 = 0; /*0xffc1888c*/
      v18 = a1; /*0xffc18893*/
      v24 = 1; /*0xffc188a5*/
      v25 = 1; /*0xffc188ac*/
      v20 = v13; /*0xffc188b7*/
      *a4 = n5; /*0xffc188bb*/
      n6 = DxeIplLzmaDecodeStream((int)v16, v13, a3, a4, 1, a8); /*0xffc188c7*/
      *a2 = v19; /*0xffc188d0*/
      if ( !n6 && *a8 == 3 ) /*0xffc188d9*/
        n6 = 6; /*0xffc188dd*/
      (*(void (__cdecl **)(int, int))(a9 + 4))(a9, v17); /*0xffc188e3*/
      return n6; /*0xffc188e8*/
    }
  }
  return result; /*0xffc188ea*/
}