// // png_colorspace_set_rgb_coefficients from 0x64eef0 to 0x64efea (250 bytes) // // 1 xrefs: // > png_init_read_transformations @ 0x659a5e // // 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_colorspace_set_rgb_coefficients(int result) { int v1; // r4 int v2; // r2 int v3; // r3 int v4; // r5 bool v5; // cc int v6; // r3 int v7; // r1 int v8; // r2 int v9; // r5 int v10; // r5 int v11; // [sp+4h] [bp-1Ch] BYREF int v12; // [sp+8h] [bp-18h] BYREF int v13; // [sp+Ch] [bp-14h] BYREF if ( !*(_BYTE *)(result + 801) && (*(_WORD *)(result + 998) & 2) != 0 ) { v1 = result; v2 = *(_DWORD *)(result + 976); v3 = *(_DWORD *)(result + 988); v11 = *(_DWORD *)(result + 964); v4 = v11 + v2 + v3; v12 = v2; v5 = v11 <= 0; if ( v11 >= 0 ) v5 = v4 <= 0; v13 = v3; if ( v5 || !png_muldiv(&v11, v11, 0x8000, v4) || (unsigned int)v11 > 0x8000 || v12 < 0 || !png_muldiv(&v12, v12, 0x8000, v4) || (unsigned int)v12 > 0x8000 || v13 < 0 || !png_muldiv(&v13, v13, 0x8000, v4) || (v6 = v13, (unsigned int)v13 > 0x8000) || (LOWORD(v7) = v11, LOWORD(v8) = v12, result = v11 + v12, v9 = v13 + v11 + v12, v9 > 32769) ) { png_error(v1, "internal error handling cHRM->XYZ"); } if ( v9 == 32769 ) { v10 = -1; if ( v11 > v12 ) goto LABEL_18; } else { if ( v9 == 0x8000 ) { LABEL_21: *(_WORD *)(v1 + 802) = v7; *(_WORD *)(v1 + 804) = v8; return result; } v10 = 1; if ( v11 > v12 ) goto LABEL_18; } if ( v13 <= v12 ) { v8 = v12 + v10; v12 = v8; result = v11 + v8; goto LABEL_20; } if ( v11 < v12 ) goto LABEL_19; LABEL_18: if ( v13 > v11 ) { LABEL_19: v6 = v13 + v10; v13 += v10; goto LABEL_20; } v7 = v11 + v10; v11 = v7; result = v12 + v7; LABEL_20: if ( v6 + result != 0x8000 ) png_error(v1, "internal error handling cHRM coefficients"); goto LABEL_21; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source