//
// png_do_swap from 0x870e08 to 0x870e40 (56 bytes)
//
// 2 xrefs:
// > png_do_read_transformations @ 0x86aa72
// > png_do_write_transformations @ 0x8737fe
//
// 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:58 +0000
//
int __fastcall png_do_swap(int result, int a2)
{
int v2; // r4
int v3; // r1
int v4; // r3
char v5; // r2
if ( *(_BYTE *)(result + 9) == 16 )
{
v2 = *(_DWORD *)result * *(unsigned __int8 *)(result + 10);
if ( v2 )
{
v3 = a2 + 2;
v4 = 0;
do
{
result = *(unsigned __int8 *)(v3 - 2);
++v4;
v5 = *(_BYTE *)(v3 - 1);
v3 += 2;
*(_BYTE *)(v3 - 3) = result;
*(_BYTE *)(v3 - 4) = v5;
}
while ( v4 != v2 );
}
}
return result;
}