// // png_write_tEXt from 0x6652c8 to 0x66539c (212 bytes) // // 3 xrefs: // > png_write_info @ 0x661a56 // > png_write_end @ 0x661d06 // > png_write_zTXt @ 0x6654bc // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // int __fastcall png_write_tEXt(_DWORD *a1, char *a2, const char *a3) { unsigned int v5; // r0 unsigned int v6; // r5 size_t v7; // r0 int v8; // r9 int v9; // r5 int v10; // r1 _BYTE v12[4]; // [sp+0h] [bp-5Ch] BYREF _BYTE v13[4]; // [sp+4h] [bp-58h] BYREF _BYTE v14[84]; // [sp+8h] [bp-54h] BYREF v5 = sub_663DFC((int)a1, a2, v14); v6 = v5; if ( !v5 ) png_error((int)a1, "tEXt: invalid keyword"); if ( a3 && *a3 ) { v7 = strlen(a3); v8 = v7; if ( v7 > 2147483646 - v6 ) png_error((int)a1, "tEXt: text too long"); v9 = v6 + 1; if ( !a1 ) goto LABEL_8; v10 = v7 + v9; } else { v9 = v5 + 1; if ( !a1 ) { png_write_chunk_data(nullptr, (int)v14, v9); return png_write_chunk_end((int)a1); } v10 = v5 + 1; v8 = 0; } a1[225] = 34; png_save_uint_32(v12, v10); png_save_uint_32(v13, 1950701684); png_write_data((int)a1); a1[119] = 1950701684; png_reset_crc((int)a1); png_calculate_crc(a1, (int)v13, 4); a1[225] = 66; LABEL_8: png_write_chunk_data(a1, (int)v14, v9); if ( v8 ) png_write_chunk_data(a1, (int)a3, v8); return png_write_chunk_end((int)a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source