// // sub_C4A67C from 0xc4a67c to 0xc4b160 (2788 bytes) // // 2 xrefs: // > TIFFRGBAImageBegin @ 0xc52d9c // > TIFFRGBAImageBegin @ 0xc52da4 // // 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 sub_C4A67C( __int64 result, unsigned int *a2, __int64 a3, __int64 a4, unsigned int a5, int a6, int a7, int a8, unsigned __int8 *a9) { int v9; // w9 int v11; // w6 __int64 v12; // x25 __int64 v13; // x23 __int64 v14; // x3 __int64 v15; // x13 unsigned __int8 *v16; // x20 unsigned __int8 *v17; // x18 unsigned __int8 *v18; // x14 unsigned __int8 *v19; // x12 unsigned __int8 *v20; // x19 unsigned __int8 *v21; // x17 unsigned __int8 *v22; // x16 unsigned __int8 *v23; // x15 unsigned int *v24; // x22 int v25; // w0 int v26; // w0 int v27; // w0 int v28; // w4 int v29; // w21 int v30; // w21 int v31; // w21 int v32; // w3 int v33; // w0 int v34; // w3 int v35; // w2 int v36; // w0 unsigned int v37; // w0 unsigned int *v38; // x3 int v39; // w0 int v40; // w4 int v41; // w3 int v42; // w0 int v43; // w0 unsigned int *v44; // x6 int v45; // w3 int v46; // w0 unsigned int *v47; // x6 int v48; // w0 unsigned int v49; // w0 int v50; // w4 int v51; // w4 int v52; // [xsp+64h] [xbp-5Ch] __int64 v53; // [xsp+70h] [xbp-50h] __int64 v54; // [xsp+78h] [xbp-48h] __int64 v55; // [xsp+88h] [xbp-38h] __int64 v56; // [xsp+A8h] [xbp-18h] int v58; // [xsp+B4h] [xbp-Ch] unsigned __int8 *v59; // [xsp+C0h] [xbp+0h] v9 = *(unsigned __int16 *)(result + 30); v52 = a6 - 1; v11 = a7 * v9; if ( a6 ) { v12 = 8LL * *(unsigned __int16 *)(result + 30); v13 = 2LL * (unsigned __int16)v9; v14 = ((a5 - 8) >> 3) + 1LL; v15 = 8LL * (unsigned __int16)v9; v55 = v12 - (unsigned __int16)v9; v53 = v11; v54 = 8 * v14; v56 = v14 * v15; v58 = a5 & 7; do { if ( a5 <= 7 ) { v37 = a5; v24 = a2; } else { v16 = &a9[v13]; v17 = &a9[4 * (unsigned __int16)v9]; v18 = &a9[(unsigned __int16)v9]; v19 = a9; v59 = a9; v20 = &a9[3 * (unsigned __int16)v9 + 1]; v21 = &a9[5 * (unsigned __int16)v9 + 1]; v22 = &a9[v12 - v13 + 1]; v23 = &a9[v55 + 1]; v24 = &a2[v54]; do { v25 = (unsigned __int16)(255 - v19[3]); *a2 = (v25 * (255 - *v19) / 255) | 0xFF000000 | ((v25 * (255 - v19[1]) / 255) << 8) | ((v25 * (255 - v19[2]) / 255) << 16); v26 = (unsigned __int16)(255 - v18[3]); a2[1] = (v26 * (255 - *v18) / 255) | 0xFF000000 | ((v26 * (255 - v18[1]) / 255) << 8) | ((v26 * (255 - v18[2]) / 255) << 16); v27 = (unsigned __int16)(255 - v16[3]); a2[2] = (v27 * (255 - v19[2 * (unsigned __int16)v9]) / 255) | 0xFF000000 | ((v27 * (255 - v16[1]) / 255) << 8) | ((v27 * (255 - v16[2]) / 255) << 16); v28 = (unsigned __int16)(255 - v20[2]); a2[3] = (v28 * (255 - v19[3 * (unsigned __int16)v9]) / 255) | 0xFF000000 | ((v28 * (255 - *v20) / 255) << 8) | ((v28 * (255 - v20[1]) / 255) << 16); v29 = (unsigned __int16)(255 - v17[3]); a2[4] = (v29 * (255 - v19[4 * (unsigned __int16)v9]) / 255) | 0xFF000000 | ((v29 * (255 - v17[1]) / 255) << 8) | ((v29 * (255 - v17[2]) / 255) << 16); v30 = (unsigned __int16)(255 - v21[2]); a2 += 8; *(a2 - 3) = (v30 * (255 - v19[5 * (unsigned __int16)v9]) / 255) | 0xFF000000 | ((v30 * (255 - *v21) / 255) << 8) | ((v30 * (255 - v21[1]) / 255) << 16); v31 = (unsigned __int16)(255 - v22[2]); v18 += v15; *(a2 - 2) = (v31 * (255 - v19[v12 - v13]) / 255) | 0xFF000000 | ((v31 * (255 - *v22) / 255) << 8) | ((v31 * (255 - v22[1]) / 255) << 16); v16 += v15; v20 += v15; v17 += v15; v21 += v15; v32 = 255 - v19[v55]; v33 = (unsigned __int16)(255 - v23[2]); v19 += v12; v34 = v33 * v32; v35 = v33 * (255 - *v23); v36 = v33 * (255 - v23[1]); v22 += v15; v23 += v15; *(a2 - 1) = (v34 / 255) | 0xFF000000 | ((v35 / 255) << 8) | ((v36 / 255) << 16); } while ( a2 != v24 ); a9 = &v59[v56]; v37 = v58; } if ( v37 ) { v38 = v24; switch ( v37 ) { case 2u: goto LABEL_14; case 3u: v47 = v24; goto LABEL_13; case 4u: goto LABEL_12; case 5u: v44 = v24; goto LABEL_11; case 6u: goto LABEL_10; case 7u: v39 = (unsigned __int16)(255 - a9[3]); v40 = v39 * (255 - *a9); v41 = v39 * (255 - a9[1]); v42 = v39 * (255 - a9[2]); a9 += (unsigned __int16)v9; *v24++ = (v40 / 255) | 0xFF000000 | ((v41 / 255) << 8) | ((v42 / 255) << 16); LABEL_10: v43 = (unsigned __int16)(255 - a9[3]); v44 = v24 + 1; *v24 = (v43 * (255 - *a9) / 255) | 0xFF000000 | ((v43 * (255 - a9[1]) / 255) << 8) | ((v43 * (255 - a9[2]) / 255) << 16); a9 += (unsigned __int16)v9; LABEL_11: v45 = (unsigned __int16)(255 - a9[3]); v24 = v44 + 1; *v44 = (v45 * (255 - *a9) / 255) | 0xFF000000 | ((v45 * (255 - a9[1]) / 255) << 8) | ((v45 * (255 - a9[2]) / 255) << 16); a9 += (unsigned __int16)v9; LABEL_12: v46 = (unsigned __int16)(255 - a9[3]); v47 = v24 + 1; *v24 = (v46 * (255 - *a9) / 255) | 0xFF000000 | ((v46 * (255 - a9[1]) / 255) << 8) | ((v46 * (255 - a9[2]) / 255) << 16); a9 += (unsigned __int16)v9; LABEL_13: v48 = (unsigned __int16)(255 - a9[3]); v24 = v47 + 1; v49 = (v48 * (255 - *a9) / 255) | 0xFF000000 | ((v48 * (255 - a9[1]) / 255) << 8) | ((v48 * (255 - a9[2]) / 255) << 16); a9 += (unsigned __int16)v9; *v47 = v49; LABEL_14: v50 = (unsigned __int16)(255 - a9[3]); v38 = v24 + 1; *v24 = (v50 * (255 - *a9) / 255) | 0xFF000000 | ((v50 * (255 - a9[1]) / 255) << 8) | ((v50 * (255 - a9[2]) / 255) << 16); a9 += (unsigned __int16)v9; break; default: break; } v51 = (unsigned __int16)(255 - a9[3]); v24 = v38 + 1; *v38 = (v51 * (255 - *a9) / 255) | 0xFF000000 | ((v51 * (255 - a9[1]) / 255) << 8) | ((v51 * (255 - a9[2]) / 255) << 16); a9 += (unsigned __int16)v9; } --v52; result = v53; a2 = &v24[a8]; a9 += v53; } while ( v52 != -1 ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source