//
// sub_6C60B8 from 0x6c60b8 to 0x6c61f0 (312 bytes)
//
// 3 xrefs:
// > sub_6C6AF4 @ 0x6c6d64
// > sub_6C6AF4 @ 0x6c6d68
// > ??> @ 0x6c6de8
//
// 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_6C60B8(int result)
{
_BYTE *v1; // r3
_DWORD *v2; // [sp+4h] [bp-18h]
_DWORD *v3; // [sp+8h] [bp-14h]
unsigned int v4; // [sp+Ch] [bp-10h]
unsigned int v5; // [sp+10h] [bp-Ch]
int i; // [sp+14h] [bp-8h]
v2 = (_DWORD *)result;
if ( (*(_DWORD *)(*(_DWORD *)(result + 576) + 4) & 1) == 0 )
{
v3 = *(_DWORD **)(result + 576);
v4 = 1;
v5 = 12;
if ( (v3[7] & 1) != 0 )
{
v4 = (v3[19] == 0) | 2;
v5 = 13;
}
for ( i = 0; i <= 5; ++i )
result = sub_6C427C((int)v2, v4, v5);
if ( v2[152] >= v2[148] )
result = TIFFFlushData1(v2);
v1 = (_BYTE *)v2[151];
*v1 = v3[12];
v2[151] = v1 + 1;
++v2[152];
v3[12] = 0;
v3[13] = 8;
}
return result;
}