// // sub_C5C614 from 0xc5c614 to 0xc5c8a4 (656 bytes) // // 2 xrefs: // > TIFFPredictorInit @ 0xc5d308 // > TIFFPredictorInit @ 0xc5d310 // // 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_C5C614(__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); // x2 __int64 v12; // x2 __int64 v13; // x0 int v14; // w3 int v15; // w0 __int64 (__fastcall *v16)(__int64, __int64, __int64); // x1 __int64 v17; // x2 __int64 v18; // x0 __int64 (__fastcall *v19)(__int64, _DWORD *, __int64); // x1 v1 = *(_QWORD *)(a1 + 848); result = (*(__int64 (**)(void))(v1 + 112))(); 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 ) { if ( *(_DWORD *)v1 == 3 ) { v11 = *(__int64 (__fastcall **)(__int64, __int64, __int64))(a1 + 760); *(_QWORD *)(v1 + 80) = sub_C5C020; if ( v11 != sub_C5AB7C ) { *(_QWORD *)(v1 + 56) = v11; v12 = *(_QWORD *)(a1 + 776); *(_QWORD *)(a1 + 760) = sub_C5AB7C; *(_QWORD *)(v1 + 64) = v12; v13 = *(_QWORD *)(a1 + 792); *(_QWORD *)(a1 + 776) = sub_C5ABD0; *(_QWORD *)(v1 + 72) = v13; *(_QWORD *)(a1 + 792) = sub_C5ABD0; } if ( (*(_DWORD *)(a1 + 16) & 0x80) != 0 ) goto LABEL_19; } return 1; } v15 = *(unsigned __int16 *)(a1 + 116); switch ( v15 ) { case 16: *(_QWORD *)(v1 + 80) = sub_C5A60C; break; case 32: *(_QWORD *)(v1 + 80) = sub_C5A940; break; case 8: *(_QWORD *)(v1 + 80) = sub_C5A02C; break; } v16 = *(__int64 (__fastcall **)(__int64, __int64, __int64))(a1 + 760); if ( v16 != sub_C5AB7C ) { *(_QWORD *)(v1 + 56) = v16; v17 = *(_QWORD *)(a1 + 776); *(_QWORD *)(a1 + 760) = sub_C5AB7C; *(_QWORD *)(v1 + 64) = v17; v18 = *(_QWORD *)(a1 + 792); *(_QWORD *)(a1 + 776) = sub_C5ABD0; *(_QWORD *)(v1 + 72) = v18; *(_QWORD *)(a1 + 792) = sub_C5ABD0; } if ( (*(_DWORD *)(a1 + 16) & 0x80) == 0 ) return 1; v19 = *(__int64 (__fastcall **)(__int64, _DWORD *, __int64))(v1 + 80); if ( (char *)v19 == (char *)sub_C5A60C ) { *(_QWORD *)(v1 + 80) = sub_C5CB18; } else { if ( v19 != sub_C5A940 ) return 1; *(_QWORD *)(v1 + 80) = sub_C5C8A4; } LABEL_19: *(_QWORD *)(a1 + 1000) = TIFFNoPostDecode; 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