//
// sub_6E12A0 from 0x6e12a0 to 0x6e1354 (180 bytes)
//
// 6 xrefs:
// > TIFFInitPackBits @ 0x6e16e4
// > TIFFInitPackBits @ 0x6e16e8
// > TIFFInitPackBits @ 0x6e16f4
// > TIFFInitPackBits @ 0x6e16f8
// > ??> @ 0x6e172c
// > ??> @ 0x6e1730
//
// 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
//
int __fastcall sub_6E12A0(int a1, unsigned __int8 *a2, int a3)
{
int v8; // [sp+10h] [bp-Ch]
int v9; // [sp+14h] [bp-8h]
v8 = **(_DWORD **)(a1 + 576);
while ( a3 > 0 )
{
v9 = v8;
if ( a3 < v8 )
v9 = a3;
if ( sub_6E0CCC((_DWORD *)a1, a2, v9) < 0 )
return -1;
a2 += v9;
a3 -= v9;
}
return 1;
}