// // png_write_sCAL_s from 0x665a4c to 0x665afc (176 bytes) // // 1 xrefs: // > png_write_info @ 0x661b5a // // 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 // void *__fastcall png_write_sCAL_s(_DWORD *a1, char a2, char *a3, const char *a4) { size_t v8; // r6 size_t v9; // r8 unsigned int v10; // r5 void *result; // r0 _BYTE v12[4]; // [sp+0h] [bp-48h] BYREF _BYTE v13[4]; // [sp+4h] [bp-44h] BYREF char v14; // [sp+8h] [bp-40h] BYREF _BYTE v15[63]; // [sp+9h] [bp-3Fh] BYREF v8 = strlen(a3); v9 = strlen(a4); v10 = v8 + v9 + 2; if ( v10 > 0x40 ) return (void *)png_warning((int)a1, "Can't write sCAL (buffer too small)"); v14 = a2; memcpy(v15, a3, v8 + 1); result = memcpy(v15 + v8 + 1, a4, v9); if ( a1 ) { a1[225] = 34; png_save_uint_32(v12, v10); png_save_uint_32(v13, 1933787468); png_write_data((int)a1); a1[119] = 1933787468; png_reset_crc((int)a1); png_calculate_crc(a1, (int)v13, 4); a1[225] = 66; png_write_chunk_data(a1, (int)&v14, v10); return (void *)png_write_chunk_end((int)a1); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source