// // png_do_check_palette_indexes from 0x8710d4 to 0x8711e8 (276 bytes) // // 2 xrefs: // > png_do_read_transformations @ 0x86a82c // > png_write_row @ 0x8720ee // // 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_check_palette_indexes(int result, int a2) { int v2; // r2 bool v3; // cc int v4; // r4 unsigned int v5; // r2 unsigned int v6; // r3 char v7; // r1 int v8; // r4 unsigned int v9; // r3 unsigned int v10; // r2 int v11; // r1 int v12; // t1 unsigned int v13; // r3 unsigned int v14; // r2 int v15; // t1 int v16; // r4 unsigned __int8 *v17; // r3 unsigned __int8 *v18; // r6 int v19; // t1 unsigned int v20; // r2 int v21; // r5 int v22; // r5 int v23; // r5 int v24; // r2 int v25; // r4 unsigned __int8 *v26; // r3 unsigned __int8 *v27; // r6 int v28; // t1 int v29; // r2 int v30; // r5 int v31; // r2 v2 = *(unsigned __int8 *)(a2 + 9); v3 = 0; if ( *(_WORD *)(result + 520) ) v3 = *(unsigned __int16 *)(result + 520) < 1 << v2; if ( v3 ) { v4 = v2 - 1; v5 = *(_DWORD *)(result + 484); v6 = *(_DWORD *)(a2 + 4) + v5; v7 = (*(_DWORD *)a2 * -*(_BYTE *)(a2 + 11)) & 7; switch ( v4 ) { case 0: if ( v5 < v6 ) { v13 = v6 + 1; v14 = v5 + 1; do { v15 = *(unsigned __int8 *)--v13; if ( v15 >> v7 ) *(_DWORD *)(result + 524) = 1; v7 = 0; } while ( v13 != v14 ); } break; case 1: if ( v5 < v6 ) { v16 = *(_DWORD *)(result + 524); v17 = (unsigned __int8 *)(v6 + 1); v18 = (unsigned __int8 *)(v5 + 1); do { v19 = *--v17; v20 = v19 >> v7; v21 = (v19 >> v7) & 3; if ( v21 > v16 ) { *(_DWORD *)(result + 524) = v21; v16 = v21; v20 = (int)*v17 >> v7; } v22 = (v20 >> 2) & 3; if ( v22 > v16 ) { *(_DWORD *)(result + 524) = v22; v16 = (v20 >> 2) & 3; v20 = (int)*v17 >> v7; } v23 = (v20 >> 4) & 3; if ( v23 > v16 ) { *(_DWORD *)(result + 524) = v23; v16 = (v20 >> 4) & 3; v20 = (int)*v17 >> v7; } v7 = 0; v24 = (int)v20 >> 6; if ( v24 > v16 ) { *(_DWORD *)(result + 524) = v24; v16 = v24; } } while ( v17 != v18 ); } break; case 3: if ( v5 < v6 ) { v25 = *(_DWORD *)(result + 524); v26 = (unsigned __int8 *)(v6 + 1); v27 = (unsigned __int8 *)(v5 + 1); do { v28 = *--v26; v29 = v28 >> v7; v30 = (v28 >> v7) & 0xF; if ( v30 > v25 ) { *(_DWORD *)(result + 524) = v30; v25 = v30; v29 = (int)*v26 >> v7; } v7 = 0; v31 = v29 >> 4; if ( v31 > v25 ) { *(_DWORD *)(result + 524) = v31; v25 = v31; } } while ( v26 != v27 ); } break; case 7: if ( v5 < v6 ) { v8 = *(_DWORD *)(result + 524); v9 = v6 + 1; v10 = v5 + 1; do { v12 = *(unsigned __int8 *)--v9; v11 = v12; if ( v12 > v8 ) { *(_DWORD *)(result + 524) = v11; v8 = v11; } } while ( v9 != v10 ); } break; default: return result; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source