// // sub_C49930 from 0xc49930 to 0xc49ab0 (384 bytes) // // 2 xrefs: // > TIFFRGBAImageBegin @ 0xc528e4 // > TIFFRGBAImageBegin @ 0xc528ec // // 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_C49930( __int64 result, _DWORD *a2, __int64 a3, __int64 a4, unsigned int a5, int a6, int a7, int a8, unsigned __int8 *a9) { __int64 v11; // x8 int v12; // w9 __int64 v13; // x7 __int64 v14; // x11 unsigned __int8 *v15; // x6 _DWORD *v16; // x0 unsigned int v17; // t1 _DWORD *v18; // x2 unsigned int v19; // w3 _DWORD *v20; // x2 int *v21; // x3 _DWORD *v22; // x0 int v23; // w2 int v24; // w2 _DWORD *v25; // x0 int v26; // w2 int v27; // w0 v11 = *(_QWORD *)(result + 88); v12 = a6 - 1; if ( a6 ) { v13 = 4LL * a8; v14 = ((a5 - 8) >> 3) + 1LL; do { if ( a5 <= 7 ) { result = a5; v15 = a9; } else { v15 = &a9[v14]; v16 = a2; do { v17 = *a9++; v16 += 8; v18 = *(_DWORD **)(v11 + 8LL * v17); *(v16 - 8) = *v18; *(v16 - 7) = v18[1]; *(v16 - 6) = v18[2]; *(v16 - 5) = v18[3]; *(v16 - 4) = v18[4]; *(v16 - 3) = v18[5]; *(v16 - 2) = v18[6]; *(v16 - 1) = v18[7]; } while ( a9 != v15 ); a2 += 8 * v14; result = a5 & 7; } if ( (_DWORD)result ) { v19 = *v15++; v20 = a2; v21 = *(int **)(v11 + 8LL * v19); switch ( (int)result ) { case 2: goto LABEL_14; case 3: v25 = a2; goto LABEL_13; case 4: goto LABEL_12; case 5: v22 = a2; goto LABEL_11; case 6: goto LABEL_10; case 7: *a2++ = *v21++; LABEL_10: v22 = a2 + 1; *a2 = *v21++; LABEL_11: v23 = *v21; a2 = v22 + 1; ++v21; *v22 = v23; LABEL_12: v24 = *v21; v25 = a2 + 1; ++v21; *a2 = v24; LABEL_13: v26 = *v21; a2 = v25 + 1; ++v21; *v25 = v26; LABEL_14: v27 = *v21; v20 = a2 + 1; ++v21; *a2 = v27; break; default: break; } result = (unsigned int)*v21; a2 = v20 + 1; *v20 = result; } --v12; a2 = (_DWORD *)((char *)a2 + v13); a9 = &v15[a7 / 8]; } while ( v12 != -1 ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source