FopGetTableOffsetAndSize
INT64 __fastcall FopGetTableOffsetAndSize(INT64 a1, UINT64 a2, INT64 a3, UINT32 *a4, UINT32 *a5){
int v6;
int v7;
int v9;
unsigned __int16 v10;
unsigned int v11;
unsigned int v12;
unsigned int v13;
int v14;
UINT32 v15;
UINT32 v16;
unsigned __int32 v17;
__int64 v19;
int v20;
__int128 v21;
v6 = a3;
v19 = 0i64;
v20 = 0;
v7 = a2;
v21 = 0i64;
v9 = FioFwReadBytesAtOffset(a1, a2, 0xCui64, &v19);
if( v9 < 0 )
{
v10 = WORD2(v19);
}
else
{
if( _byteswap_ulong(v19) != 0x10000 )
return(unsigned int)-1073741637;
v10 = __ROR2__(WORD2(v19), 8);
v9 = 0;
}
if( v9 >= 0 )
{
v11 = 0;
v12 = v10;
v13 = v7 + 12;
if( v10 )
{
while( 1 )
{
v14 = FioFwReadBytesAtOffset(a1, v13, 0x10ui64, &v21);
v15 = HIDWORD(v21);
v9 = v14;
v16 = DWORD2(v21);
v17 = v21;
if( v14 >= 0 )
{
v9 = 0;
v17 = _byteswap_ulong(v21);
v16 = _byteswap_ulong(DWORD2(v21));
v15 = _byteswap_ulong(HIDWORD(v21));
*(_QWORD *)&v21 = __PAIR64__(_byteswap_ulong(DWORD1(v21)), v17);
*((_QWORD *)&v21 + 1) = __PAIR64__(v15, v16);
}
if( v9 < 0 )
break;
if( v17 == v6 )
{
*a4 = v16;
*a5 = v15;
return(unsigned int)v9;
}
++v11;
v13 += 16;
if( v11 >= v12 )
return(unsigned int)-1073741275;
}
}
else
{
return(unsigned int)-1073741275;
}
}
return(unsigned int)v9;
}Referenced by:
BgpRasInitializeRasterizer
FopInitializeFonts
FopValidateFontNameTable