FopReadNamingTable
__int64 __fastcall FopReadNamingTable(__int64 a1, UINT64 a2, __int64 *a3){
int v4;
int NameRecord;
__int16 v7;
UINT64 v8;
unsigned int v9;
unsigned int v10;
__int64 v11;
__int64 v12;
unsigned int v13;
unsigned int v14;
__int128 v16;
__int16 v17;
v17 = 0;
v4 = a2;
v16 = 0i64;
NameRecord = FioFwReadBytesAtOffset(a1, a2, 6ui64, &v16);
if( NameRecord >= 0 )
{
LOWORD(v16) = __ROR2__(v16, 8);
v7 = __ROR2__(WORD2(v16), 8);
WORD1(v16) = __ROR2__(WORD1(v16), 8);
v8 = 18i64;
v9 = WORD1(v16);
if( WORD1(v16) )
{
v10 = 12 * WORD1(v16) + 18;
if( v10 < 0x12 )
return(unsigned int)-1073741675;
v8 = v10;
NameRecord = 0;
}
LODWORD(v11) = BgpFwAllocateMemory(v8);
v12 = v11;
if( v11 )
{
v13 = v4 + 6;
*(_DWORD *)v11 = v16;
*(_WORD *)(v11 + 4) = v7;
v14 = 0;
if( v9 )
{
while( 1 )
{
NameRecord = FopReadNameRecord(a1, v13, (_WORD *)(v12 + 12i64 * v14 + 6));
if( NameRecord < 0 )
break;
++v14;
v13 += 12;
if( v14 >= v9 )
goto LABEL_9;
}
BgpFwFreeMemory(v12);
}
else
{
LABEL_9:
*a3 = v12;
}
}
else
{
return(unsigned int)-1073741801;
}
}
return(unsigned int)NameRecord;
}Referenced by:
FopValidateFontNameTable