//
// png_set_packing from 0x660b18 to 0x660b38 (32 bytes)
//
// 5 xrefs:
// > cocos2d::CCImage::_saveImageToPNG @ 0x5e2104
// > sub_654424 @ 0x654b8c
// > png_read_png @ 0x6576f2
// > sub_662E04 @ 0x663096
// > png_write_png @ 0x6632ca
//
// 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 png_set_packing(int result)
{
int v1; // r3
if ( result )
{
if ( *(unsigned __int8 *)(result + 536) <= 7u )
{
v1 = *(_DWORD *)(result + 316);
*(_BYTE *)(result + 537) = 8;
*(_DWORD *)(result + 316) = v1 | 4;
}
}
return result;
}