//
// sub_C427E8 from 0xc427e8 to 0xc42874 (140 bytes)
//
// 2 xrefs:
// > TIFFInitDumpMode @ 0xc42888
// > TIFFInitDumpMode @ 0xc42890
//
// 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 sub_C427E8(__int64 a1, char *a2, signed __int64 a3)
{
__int64 v6; // x4
char *v7; // x1
v6 = *(_QWORD *)(a1 + 912);
if ( v6 < a3 )
{
TIFFErrorExt(
*(_QWORD *)(a1 + 952),
"DumpModeDecode",
"Not enough data for scanline %lu, expected a request for at most %lld bytes, got a request for %lld bytes",
*(unsigned int *)(a1 + 636),
v6,
a3);
return 0;
}
else
{
v7 = *(char **)(a1 + 904);
if ( v7 != a2 )
{
TIFFmemcpy(a2, v7, a3);
v7 = *(char **)(a1 + 904);
v6 = *(_QWORD *)(a1 + 912);
}
*(_QWORD *)(a1 + 904) = &v7[a3];
*(_QWORD *)(a1 + 912) = v6 - a3;
return 1;
}
}