// // sub_C5D078 from 0xc5d078 to 0xc5d294 (540 bytes) // // 2 xrefs: // > TIFFPredictorInit @ 0xc5d320 // > TIFFPredictorInit @ 0xc5d328 // // 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_C5D078(__int64 a1) { __int64 v1; // x20 __int64 result; // x0 int *v4; // x21 int v5; // w3 __int64 v6; // x1 int v7; // w3 __int64 v8; // x0 int v9; // w1 __int64 v10; // x0 __int64 (__fastcall *v11)(__int64, __int64, __int64, unsigned __int16); // x2 __int64 v12; // x2 __int64 v13; // x2 int v14; // w3 int v15; // w0 __int64 (__fastcall *v16)(__int64, __int64, __int64, unsigned __int16); // x1 v1 = *(_QWORD *)(a1 + 848); result = (*(__int64 (**)(void))(v1 + 120))(); if ( (_DWORD)result ) { v4 = *(int **)(a1 + 848); v5 = *v4; if ( *v4 == 2 ) { v6 = a1 + 56; v14 = *(unsigned __int16 *)(a1 + 116); if ( (((_WORD)v14 - 8) & 0xFFF7) == 0 || v14 == 32 ) goto LABEL_8; TIFFErrorExt( *(_QWORD *)(a1 + 952), (__int64)"PredictorSetup", "Horizontal differencing \"Predictor\" not supported with %d-bit samples", v14); return 0; } else { if ( v5 != 3 ) { if ( v5 != 1 ) { TIFFErrorExt(*(_QWORD *)(a1 + 952), (__int64)"PredictorSetup", "\"Predictor\" value %d not supported", v5); return 0; } LABEL_13: if ( *(_DWORD *)v1 == 2 ) { v15 = *(unsigned __int16 *)(a1 + 116); switch ( v15 ) { case 16: *(_QWORD *)(v1 + 48) = sub_C5B260; break; case 32: *(_QWORD *)(v1 + 48) = sub_C5B5F0; break; case 8: *(_QWORD *)(v1 + 48) = sub_C5AC50; break; } v16 = *(__int64 (__fastcall **)(__int64, __int64, __int64, unsigned __int16))(a1 + 768); if ( v16 != sub_C5B890 ) { *(_QWORD *)(v1 + 24) = v16; goto LABEL_18; } } else if ( *(_DWORD *)v1 == 3 ) { v11 = *(__int64 (__fastcall **)(__int64, __int64, __int64, unsigned __int16))(a1 + 768); *(_QWORD *)(v1 + 48) = sub_C5B9F0; if ( v11 != sub_C5B890 ) { *(_QWORD *)(v1 + 24) = v11; LABEL_18: v12 = *(_QWORD *)(a1 + 784); *(_QWORD *)(a1 + 768) = sub_C5B890; *(_QWORD *)(v1 + 32) = v12; v13 = *(_QWORD *)(a1 + 800); *(_QWORD *)(a1 + 784) = sub_C5CF7C; *(_QWORD *)(v1 + 40) = v13; *(_QWORD *)(a1 + 800) = sub_C5CF7C; return 1; } } return 1; } v6 = a1 + 56; v7 = *(unsigned __int16 *)(a1 + 118); if ( v7 == 3 ) { LABEL_8: v8 = 1; if ( *(_WORD *)(v6 + 114) == 1 ) v8 = *(unsigned __int16 *)(v6 + 74); v9 = *(_DWORD *)(a1 + 16); *((_QWORD *)v4 + 1) = v8; if ( (v9 & 0x400) != 0 ) v10 = TIFFTileRowSize(a1); else v10 = TIFFScanlineSize(a1); *((_QWORD *)v4 + 2) = v10; if ( !v10 ) return 0; goto LABEL_13; } TIFFErrorExt( *(_QWORD *)(a1 + 952), (__int64)"PredictorSetup", "Floating point \"Predictor\" not supported with %d data format", v7); return 0; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source