//
// TIFFFindCODEC from 0xea4e78 to 0xea4ef8 (128 bytes)
//
// 11 xrefs:
// > sub_EA32D4 @ 0xea3300
// > TIFFIsCODECConfigured @ 0xea3374
// > _TIFFNoRowEncode @ 0xea4f0c
// > _TIFFNoTileDecode @ 0xea4f88
// > TIFFSetCompressionScheme @ 0xea5008
// > _TIFFNoStripEncode @ 0xea505c
// > _TIFFNoStripDecode @ 0xea50d8
// > _TIFFNoTileEncode @ 0xea5154
// > _TIFFNoRowDecode @ 0xea51d0
// > TIFFPrintDirectory @ 0xed4318
// > ??> @ 0xfa948
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:11:09 +0000
//
char **__fastcall TIFFFindCODEC(unsigned __int16 a1)
{
int v1; // w3
_QWORD *v2; // x1
char **result; // x0
char **v4; // x1
char *v5; // x2
v1 = a1;
v2 = (_QWORD *)qword_1562840;
if ( qword_1562840 )
{
while ( 1 )
{
result = (char **)v2[1];
if ( *((unsigned __int16 *)result + 4) == v1 )
break;
v2 = (_QWORD *)*v2;
if ( !v2 )
goto LABEL_6;
}
}
else
{
LABEL_6:
if ( !TIFFBuiltinCODECS )
return nullptr;
if ( (unsigned __int16)word_154A8B8 != v1 )
{
v4 = &off_154A8C8;
while ( 1 )
{
v5 = *v4;
result = v4;
v4 += 3;
if ( !v5 )
break;
if ( *((unsigned __int16 *)v4 - 8) == v1 )
return result;
}
return nullptr;
}
return &TIFFBuiltinCODECS;
}
return result;
}