// // png_icc_set_sRGB from 0xbca050 to 0xbca2e8 (664 bytes) // // 3 xrefs: // > png_colorspace_set_ICC @ 0xbca388 // > png_handle_iCCP @ 0xbe009c // > @ 0x956b8 // // 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 // __int64 __fastcall png_icc_set_sRGB(__int64 result, __int64 a2, unsigned __int8 *a3, __int64 a4) { __int64 v5; // x21 unsigned int *v7; // x1 int v8; // w8 unsigned int v9; // w24 unsigned int v10; // w19 _DWORD *v11; // x25 __int64 v12; // x0 __int64 v13; // x0 _DWORD *v14; // x25 v5 = result; if ( ((*(_BYTE *)(result + 1024) >> 4) & 3) != 3 ) { v7 = (unsigned int *)&unk_F2C458; v8 = 0x10000; v9 = 0; v10 = 0; while ( 1 ) { if ( v7[1] == (a3[85] << 16) + (a3[84] << 24) + a3[87] + (a3[86] << 8) && (a3[89] << 16) + (a3[88] << 24) + a3[91] + (a3[90] << 8) == v7[2] ) { result = a3[95]; if ( (a3[93] << 16) + (a3[92] << 24) + (_DWORD)result + (a3[94] << 8) == v7[3] ) { result = (a3[97] << 16) + (a3[96] << 24) + a3[99] + (a3[98] << 8); if ( (_DWORD)result == v7[4] ) { if ( !v9 ) { v9 = (a3[1] << 16) + (*a3 << 24) + a3[3] + (a3[2] << 8); v8 = (a3[65] << 16) + (a3[64] << 24) + a3[67] + (a3[66] << 8); } result = *v7; if ( (_DWORD)result == v9 ) { result = *((unsigned __int16 *)v7 + 11); if ( (_DWORD)result == v8 ) break; } } } } ++v10; v7 += 8; if ( v10 == 7 ) return result; } if ( !a4 ) { v12 = adler32(0, 0, 0); a4 = adler32(v12, a3, v9); } v11 = (_DWORD *)((char *)&unk_F2C450 + 32 * v10); if ( *v11 == a4 && (v13 = crc32(0, 0, 0), crc32(v13, a3, v9) == v11[1]) ) { v14 = v11 + 4; if ( *((_BYTE *)v14 + 13) ) { png_chunk_report(v5, "known incorrect sRGB profile", 2); } else if ( !*((_BYTE *)v14 + 12) ) { png_chunk_report(v5, "out-of-date sRGB profile with no signature", 0); } return png_colorspace_set_sRGB(v5, a2, (a3[65] << 16) + (a3[64] << 24) + a3[67] + (a3[66] << 8)); } else { return png_chunk_report(v5, "Not recognizing known sRGB profile that has been edited", 0); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source