// // png_read_IDAT_data from 0x65f190 to 0x65f314 (388 bytes) // // 2 xrefs: // > png_read_row @ 0x655ae0 // > png_read_finish_IDAT @ 0x65f348 // // 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_read_IDAT_data(_DWORD *a1, int a2, int a3) { int v3; // r5 size_t v7; // r1 int chunk_header; // r0 int v9; // r3 void *v10; // r10 size_t v11; // r9 int v12; // r1 int result; // r0 void *v14; // r0 int v15; // r3 int v16; // r2 int v17; // r1 _DWORD *v18; // r0 const char *v19; // r1 int v20; // [sp+0h] [bp-400h] BYREF LOWORD(v3) = 16724; if ( !a2 ) a3 = 0; HIWORD(v3) = 18756; a1[84] = a2; a1[85] = 0; while ( 1 ) { if ( a1[82] ) goto LABEL_15; v7 = a1[127]; while ( !v7 ) { png_crc_finish(a1, 0); chunk_header = png_read_chunk_header(a1); v9 = a1[119]; v7 = chunk_header; a1[127] = chunk_header; if ( v9 != v3 ) goto LABEL_9; } v10 = (void *)a1[222]; if ( v7 >= a1[224] ) v7 = a1[224]; v11 = v7; if ( !v10 ) goto LABEL_21; if ( v7 > a1[223] ) { a1[222] = 0; a1[223] = 0; png_free((int)a1, v10); LABEL_21: v14 = png_malloc_base((int)a1, v11); v10 = v14; if ( !v14 ) png_chunk_error((int)a1, "insufficient memory to read chunk"); a1[222] = v14; a1[223] = v11; } png_crc_read(a1, (int)v10, v11); v12 = a1[127]; a1[81] = v10; a1[82] = v11; a1[127] = v12 - v11; LABEL_15: if ( !a2 ) break; a1[85] = a3; result = inflate(a1 + 81, 0); a3 = a1[85]; a1[85] = 0; if ( result == 1 ) goto LABEL_24; LABEL_17: if ( result ) { png_zstream_error((int)a1, result); v18 = a1; v19 = (const char *)a1[87]; if ( a2 ) png_chunk_error((int)a1, v19); return png_chunk_benign_error((int)v18, v19); } if ( !a3 ) return result; } a1[84] = &v20; a1[85] = 1024; result = inflate(a1 + 81, 0); v15 = a1[85]; a1[85] = 0; a3 += 1024 - v15; if ( result != 1 ) goto LABEL_17; LABEL_24: result = a1[82]; v16 = a1[78]; v17 = a1[77] | 8; a1[84] = 0; a1[77] = v17; a1[78] = v16 | 8; if ( result || a1[127] ) result = png_chunk_benign_error((int)a1, "Extra compressed data"); if ( a3 ) { if ( a2 ) LABEL_9: png_error((int)a1, "Not enough image data"); v18 = a1; v19 = "Too much image data"; return png_chunk_benign_error((int)v18, v19); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source