//
// TIFFReadTile from 0xc5fbec to 0xc5fcc4 (216 bytes)
//
// 6 xrefs:
// > sub_C4F028 @ 0xc4f170
// > sub_C4F350 @ 0xc4f56c
// > sub_C4F350 @ 0xc4f5a4
// > sub_C4F350 @ 0xc4f5d0
// > sub_C4F350 @ 0xc4f600
// > ??> @ 0xb06b8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__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);
}