// // png_set_unknown_chunks from 0x8706d8 to 0x8707fc (292 bytes) // // 1 xrefs: // > png_handle_unknown @ 0x86e8be // // 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:57 +0000 // void __fastcall png_set_unknown_chunks(int a1, int a2, int *a3, signed int a4) { bool v4; // zf bool v6; // cc int *v7; // r5 signed int v8; // r6 char *v10; // r4 int v11; // r1 char *v12; // r10 int v13; // r2 int v14; // r4 int i; // r2 size_t v16; // r1 void *v17; // r0 size_t v18; // r4 v4 = a2 == 0; if ( a2 ) v4 = a1 == 0; if ( !v4 ) { v6 = (int)a3 <= 0; if ( a3 ) v6 = a4 <= 0; v7 = a3; v8 = a4; if ( !v6 ) { v10 = png_realloc_array(a1, *(const void **)(a2 + 236), *(_DWORD *)(a2 + 240), a4, 20); if ( v10 ) { png_free(a1, *(void **)(a2 + 236)); v11 = *(_DWORD *)(a2 + 232) | 0x200; v12 = &v10[20 * *(_DWORD *)(a2 + 240)]; *(_DWORD *)(a2 + 236) = v10; *(_DWORD *)(a2 + 232) = v11; while ( 1 ) { v13 = *v7; v14 = v7[4] & 0xB; v12[4] = 0; *(_DWORD *)v12 = v13; if ( !v14 ) { if ( (*(_DWORD *)(a1 + 308) & 0x8000) != 0 || (png_app_warning(a1, "png_set_unknown_chunks now expects a valid location"), v14 = *(_BYTE *)(a1 + 308) & 0xB, (*(_BYTE *)(a1 + 308) & 0xB) == 0) ) { png_error(a1, "invalid location in png_set_unknown_chunks"); } } for ( i = -v14 & v14; i != v14; i = -v14 & v14 ) v14 &= ~i; v16 = v7[3]; v12[16] = v14; if ( v16 ) { v17 = png_malloc_base(a1, v16); *((_DWORD *)v12 + 2) = v17; if ( !v17 ) { png_chunk_report(a1, "unknown chunk: out of memory", 1); goto LABEL_20; } v18 = v7[3]; memcpy(v17, (const void *)v7[2], v18); *((_DWORD *)v12 + 3) = v18; } else { *((_DWORD *)v12 + 2) = 0; *((_DWORD *)v12 + 3) = 0; } v12 += 20; ++*(_DWORD *)(a2 + 240); LABEL_20: --v8; v7 += 5; if ( !v8 ) return; } } png_chunk_report(a1, "too many unknown chunks", 1); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source