// // png_handle_sRGB from 0x65cfd8 to 0x65d078 (160 bytes) // // 3 xrefs: // > png_push_read_chunk @ 0x652a50 // > png_read_info @ 0x6558ee // > png_read_end @ 0x657406 // // 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_handle_sRGB(int a1, int a2, unsigned int a3) { int v4; // r3 int result; // r0 int v7; // r3 unsigned __int8 v8; // [sp+7h] [bp-1h] BYREF v4 = *(_DWORD *)(a1 + 308); if ( (v4 & 1) == 0 ) png_chunk_error(a1, "missing IHDR"); if ( (v4 & 6) != 0 ) { png_crc_finish((_DWORD *)a1, a3); return png_chunk_benign_error(a1, "out of place"); } else if ( a3 == 1 ) { png_crc_read((_DWORD *)a1, (int)&v8, 1); result = png_crc_finish((_DWORD *)a1, 0); if ( !result ) { v7 = *(unsigned __int16 *)(a1 + 998); if ( (v7 & 0x8000) == 0 ) { if ( (v7 & 4) != 0 ) { *(_WORD *)(a1 + 998) = ~((unsigned int)~(v7 << 17) >> 17); png_colorspace_sync(a1, a2); return png_chunk_benign_error(a1, "too many profiles"); } else { png_colorspace_set_sRGB(a1, a1 + 924, v8); return png_colorspace_sync(a1, a2); } } } } else { png_crc_finish((_DWORD *)a1, a3); return png_chunk_benign_error(a1, "invalid"); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source