Newer
Older
AMI-Aptio-BIOS-Reversed / MdeModulePkg / Core / DxeIplPeim / DxeIplGetFvFromHob.c
@Ajax Dong Ajax Dong 2 days ago 980 bytes Full restructure
/* DxeIplGetFvFromHob @ 0xffc16fa2 size=0x79 */
_WORD *__fastcall DxeIplGetFvFromHob(_DWORD *a1, _DWORD *a2)
{
  _WORD *i; // eax
  _WORD *v5; // eax
  _WORD *i_1; // eax
  _WORD *result; // eax
  void *buf; // eax
  void *buf_1; // eax

  i = (_WORD *)DxeIplGetPeiServices(); /*0xffc16fab*/
  v5 = DxeIplGetBootModeGuid((int)&unk_FFC18DA8, i); /*0xffc16fb9*/
  if ( v5 ) /*0xffc16fc0*/
  {
    *a1 = v5 + 12; /*0xffc16fc5*/
    i_1 = (_WORD *)DxeIplGetPeiServices(); /*0xffc16fc7*/
    result = DxeIplGetBootModeGuid((int)&unk_FFC18CF8, i_1) + 12; /*0xffc16fd8*/
  }
  else
  {
    buf = (void *)DxeIplAllocPages((int)&unk_FFC18DA8, 40008); /*0xffc16fe6*/
    *a1 = buf; /*0xffc16fed*/
    *a1 = DxeIplSetMem32(buf, 0x9C48u); /*0xffc16ff4*/
    buf_1 = (void *)DxeIplAllocPages((int)&unk_FFC18CF8, 4000); /*0xffc17002*/
    *a2 = buf_1; /*0xffc17009*/
    result = DxeIplSetMem32(buf_1, 0xFA0u); /*0xffc1700b*/
  }
  *a2 = result; /*0xffc17014*/
  return result; /*0xffc17013*/
}