// // png_handle_zTXt from 0xe57788 to 0xe579d0 (584 bytes) // // 4 xrefs: // > png_push_read_chunk @ 0xe45b30 // > png_read_info @ 0xe498b0 // > png_read_end @ 0xe4be5c // > @ 0xe2be8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 13:10:19 +0000 // __int64 __fastcall png_handle_zTXt( __int64 a1, __int64 a2, size_t byte_count, int a4, int a5, int a6, int a7, int a8, char a9) { int v10; // w1 unsigned int v11; // w20 int v13; // w1 int v14; // w0 unsigned __int8 *v15; // x22 size_t v16; // x19 __int64 result; // x0 unsigned __int8 *v18; // x1 unsigned int i; // w0 __int64 v21; // x19 const char *v22; // x1 unsigned __int8 *v23; // x0 __int64 v24; // x5 unsigned __int64 v25; // [xsp+40h] [xbp+40h] BYREF int v26; // [xsp+48h] [xbp+48h] BYREF __int64 v27; // [xsp+50h] [xbp+50h] __int64 v28; // [xsp+58h] [xbp+58h] unsigned __int64 v29; // [xsp+60h] [xbp+60h] __int64 v30; // [xsp+68h] [xbp+68h] __int64 v31; // [xsp+70h] [xbp+70h] __int64 v32; // [xsp+78h] [xbp+78h] v10 = *(_DWORD *)(a1 + 1180); v11 = byte_count; if ( v10 ) { if ( v10 == 1 ) return png_crc_finish((_DWORD *)a1, byte_count); v13 = v10 - 1; *(_DWORD *)(a1 + 1180) = v13; if ( v13 == 1 ) { png_crc_finish((_DWORD *)a1, byte_count); return png_chunk_benign_error(a1, "no space in chunk cache"); } } v14 = *(_DWORD *)(a1 + 356); if ( (v14 & 1) == 0 ) png_chunk_error(a1, "missing IHDR"); if ( (v14 & 4) != 0 ) { v15 = *(unsigned __int8 **)(a1 + 1232); *(_DWORD *)(a1 + 356) = v14 | 8; v16 = (unsigned int)byte_count; if ( !v15 ) goto LABEL_24; } else { v15 = *(unsigned __int8 **)(a1 + 1232); v16 = (unsigned int)byte_count; if ( !v15 ) goto LABEL_24; } if ( v16 <= *(_QWORD *)(a1 + 1240) ) goto LABEL_8; *(_QWORD *)(a1 + 1232) = 0; *(_QWORD *)(a1 + 1240) = 0; png_free(a1, v15); LABEL_24: v23 = (unsigned __int8 *)png_malloc_base(a1, v16); v15 = v23; if ( !v23 ) { png_crc_finish((_DWORD *)a1, v11); return png_chunk_benign_error(a1, "out of memory"); } *(_QWORD *)(a1 + 1232) = v23; *(_QWORD *)(a1 + 1240) = v16; LABEL_8: png_crc_read(a1, (__int64)v15, v11); result = png_crc_finish((_DWORD *)a1, 0); if ( (_DWORD)result ) return result; if ( !v11 || !*v15 ) goto LABEL_20; v18 = v15 + 1; for ( i = 0; ; ++i ) { v21 = i + 1; if ( (_DWORD)v21 == v11 ) break; if ( !*v18++ ) goto LABEL_16; } v21 = v11; LABEL_16: if ( i > 0x4E ) { LABEL_20: v22 = "bad keyword"; return png_chunk_benign_error(a1, v22); } if ( v11 < (int)v21 + 3 ) { v22 = "truncated"; return png_chunk_benign_error(a1, v22); } if ( v15[(unsigned int)(v21 + 1)] ) { v22 = "unknown compression type"; return png_chunk_benign_error(a1, v22); } v25 = -1; result = sub_E54B1C(a1, v11, (int)v21 + 2, &v25); if ( (_DWORD)result == 1 ) { v24 = *(_QWORD *)(a1 + 1232); *(_BYTE *)(v24 + (unsigned int)(v21 + 2) + v25) = 0; v28 = v24 + v21 + 2; v26 = 0; v27 = v24; v29 = v25; v30 = 0; v31 = 0; v32 = 0; result = png_set_text_2(a1, a2, &v26, 1); if ( (_DWORD)result ) { v22 = "insufficient memory"; return png_chunk_benign_error(a1, v22); } } else { v22 = *(const char **)(a1 + 424); if ( v22 ) return png_chunk_benign_error(a1, v22); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source