//
// TIFFReadTile from 0xed5dac to 0xed5e84 (216 bytes)
//
// 6 xrefs:
// > sub_EC51E8 @ 0xec5330
// > sub_EC5510 @ 0xec572c
// > sub_EC5510 @ 0xec5764
// > sub_EC5510 @ 0xec5790
// > sub_EC5510 @ 0xec57c0
// > ??> @ 0xe6db8
//
// 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:42 +0000
//
__int64 __fastcall TIFFReadTile(
__int64 a1,
__int64 a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
unsigned __int16 a6)
{
unsigned int v11; // w20
unsigned int v13; // w0
v11 = a6;
if ( *(_DWORD *)(a1 + 12) == 1 )
{
TIFFErrorExt(*(_QWORD *)(a1 + 952), *(_QWORD *)a1, "File not open for reading");
return -1;
}
if ( (*(_DWORD *)(a1 + 16) & 0x400) == 0 )
{
TIFFErrorExt(*(_QWORD *)(a1 + 952), *(_QWORD *)a1, "Can not read tiles from a stripped image");
return -1;
}
if ( !(unsigned int)TIFFCheckTile() )
return -1;
v13 = TIFFComputeTile(a1, a3, a4, a5, v11);
return TIFFReadEncodedTile(a1, v13, a2, -1);
}