/* DxeIplDiscoverDxeCore @ 0xffc159b3 size=0xf6 */
int __thiscall DxeIplDiscoverDxeCore(void *n32)
{
_WORD *i; // eax
int v3; // ecx
const __int16 *PreviousMemoryTypeInformation; // edi
int v5; // esi
int n64; // edx
unsigned int n128; // [esp+10h] [ebp-8Ch] BYREF
int (__cdecl **v9)(_DWORD, const __int16 *, void *, _DWORD, unsigned int *, _BYTE *); // [esp+14h] [ebp-88h] BYREF
_BYTE v10[132]; // [esp+18h] [ebp-84h] BYREF
for ( i = (_WORD *)sub_FFC16008(); ; *i = -2 ) /*0xffc159bf*/
{
i = (_WORD *)sub_FFC16056(&unk_FFC18CC8, i); /*0xffc159d7*/
if ( !i ) /*0xffc159de*/
break; /*0xffc159de*/
}
if ( sub_FFC16226(v3, &v9) < 0 ) /*0xffc159fb*/
goto LABEL_13; /*0xffc159fb*/
n128 = 128; /*0xffc159fd*/
PreviousMemoryTypeInformation = L"PreviousMemoryTypeInformation"; /*0xffc15a05*/
if ( n32 != (void *)5 ) /*0xffc15a0d*/
PreviousMemoryTypeInformation = L"MemoryTypeInformation"; /*0xffc15a0f*/
v5 = (*v9)(v9, PreviousMemoryTypeInformation, &unk_FFC18DD8, 0, &n128, v10); /*0xffc15a29*/
if ( v5 == -2147483634 ) /*0xffc15a34*/
v5 = (*v9)(v9, PreviousMemoryTypeInformation, &unk_FFC18CC8, 0, &n128, v10); /*0xffc15a4e*/
if ( v5 < 0 ) /*0xffc15a52*/
goto LABEL_13; /*0xffc15a52*/
if ( !DxeIplMeasureFv((int)v10, n128) ) /*0xffc15a5c*/
v5 = -2147483645; /*0xffc15a6f*/
if ( v5 < 0 ) /*0xffc15a76*/
{
LABEL_13:
n64 = n64; /*0xffc15a78*/
n128 = n64; /*0xffc15a83*/
}
sub_FFC16191(n64); /*0xffc15a8c*/
return sub_FFC16191(16); /*0xffc15a9e*/
}