//
// png_set_tRNS_to_alpha from 0x8695d8 to 0x869604 (44 bytes)
//
// 2 xrefs:
// > cocos2d::CCImage::_initWithPngData @ 0x7eb9c2
// > sub_8644A4 @ 0x864cda
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:02:49 +0000
//
int __fastcall png_set_tRNS_to_alpha(int result)
{
int v1; // r1
int v2; // r3
if ( result )
{
v1 = *(_DWORD *)(result + 312);
if ( (v1 & 0x40) != 0 )
{
return png_app_error(result, "invalid after png_start_read_image or png_read_update_info");
}
else
{
v2 = *(_DWORD *)(result + 316);
*(_DWORD *)(result + 312) = v1 | 0x4000;
*(_DWORD *)(result + 316) = v2 | 0x2001000;
}
}
return result;
}