// // sub_EBBB40 from 0xebbb40 to 0xebbea4 (868 bytes) // // 6 xrefs: // > TIFFInitCCITTFax3 @ 0xebed98 // > TIFFInitCCITTFax3 @ 0xebeda0 // > TIFFInitCCITTFax4 @ 0xebef70 // > TIFFInitCCITTFax4 @ 0xebef78 // > TIFFInitCCITTRLE @ 0xebf170 // > TIFFInitCCITTRLEW @ 0xebf300 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:11:29 +0000 // __int64 __fastcall sub_EBBB40(_QWORD *a1, unsigned __int8 *a2, __int64 a3) { __int64 v3; // x28 __int64 v5; // x22 int v7; // w0 int v8; // w0 __int64 v9; // x0 int v11; // w0 _DWORD *v12; // x23 int v13; // w0 int v14; // w1 int v15; // w27 unsigned int v16; // w20 __int64 v17; // x0 _BYTE *v18; // x0 int v19; // w0 unsigned int v20; // w20 unsigned int v21; // w25 __int64 v22; // x0 _BYTE *v23; // x0 int v24; // w26 int v25; // w1 unsigned int v26; // w20 _BYTE *v27; // x0 _BYTE *v28; // x0 int v29; // w1 v3 = a1[106]; v5 = a3; if ( !(a3 % *(_QWORD *)(v3 + 8)) ) { if ( a3 <= 0 ) return 1; while ( 1 ) { if ( (*(_DWORD *)(v3 + 4) & 2) != 0 ) goto LABEL_4; v12 = (_DWORD *)a1[106]; v13 = v12[8]; v14 = v12[19]; v15 = v12[18]; if ( (v13 & 4) != 0 && v14 != 4 ) { v16 = v14 + 4; if ( v14 > 3 ) v16 = v14 - 4; if ( v14 < v16 ) { v17 = a1[114]; do { v16 -= v14; if ( a1[110] <= v17 ) TIFFFlushData1(a1); v18 = (_BYTE *)a1[113]; v14 = 8; a1[113] = v18 + 1; *v18 = v15; v15 = 0; v17 = a1[114] + 1LL; a1[114] = v17; } while ( v16 > 8 ); } v14 -= v16; if ( !v14 ) { if ( a1[114] >= a1[110] ) TIFFFlushData1(a1); v28 = (_BYTE *)a1[113]; a1[113] = v28 + 1; *v28 = v15; v29 = v12[8]; v22 = a1[114] + 1LL; a1[114] = v22; if ( (v29 & 1) == 0 ) { v20 = 12; v21 = 1; v15 = 0; v14 = 8; goto LABEL_32; } v19 = 0; v15 = 0; v14 = 8; goto LABEL_41; } v13 = v12[8]; } if ( (v13 & 1) == 0 ) { v19 = v15; v20 = 12; v21 = 1; goto LABEL_29; } v19 = v15; LABEL_41: v20 = 13; v21 = (v12[30] == 0) | 2; LABEL_29: if ( v20 > v14 ) { v22 = a1[114]; do { LABEL_32: v20 -= v14; v24 = (v21 >> v20) | v15; v15 = 0; if ( a1[110] <= v22 ) TIFFFlushData1(a1); v23 = (_BYTE *)a1[113]; v14 = 8; a1[113] = v23 + 1; *v23 = v24; v22 = a1[114] + 1LL; a1[114] = v22; } while ( v20 > 8 ); v19 = 0; } v25 = v14 - v20; v26 = ((v21 & dword_11C5DE0[v20]) << v25) | v19; if ( !v25 ) { if ( a1[114] >= a1[110] ) TIFFFlushData1(a1); v27 = (_BYTE *)a1[113]; v25 = 8; a1[113] = v27 + 1; *v27 = v26; v26 = 0; ++a1[114]; } v12[18] = v26; v12[19] = v25; LABEL_4: if ( (*(_DWORD *)(v3 + 32) & 1) != 0 ) { if ( *(_DWORD *)(v3 + 120) ) { if ( !(unsigned int)sub_EBA940(a1, a2, *(_BYTE **)(v3 + 128), *(_DWORD *)(v3 + 16)) ) return 0; v11 = *(_DWORD *)(v3 + 136) - 1; *(_DWORD *)(v3 + 136) = v11; if ( v11 ) { LABEL_13: TIFFmemcpy(*(void **)(v3 + 128), a2, *(_QWORD *)(v3 + 8)); goto LABEL_9; } } else { if ( !(unsigned int)sub_EBA20C(a1, a2, *(_DWORD *)(v3 + 16)) ) return 0; v7 = *(_DWORD *)(v3 + 136); *(_DWORD *)(v3 + 120) = 1; if ( v7 ) goto LABEL_13; } v8 = *(_DWORD *)(v3 + 140); *(_DWORD *)(v3 + 120) = 0; *(_DWORD *)(v3 + 136) = v8 - 1; } else if ( !(unsigned int)sub_EBA20C(a1, a2, *(_DWORD *)(v3 + 16)) ) { return 0; } LABEL_9: v9 = *(_QWORD *)(v3 + 8); v5 -= v9; a2 += v9; if ( v5 <= 0 ) return 1; } } TIFFErrorExt(a1[119], (__int64)&dword_11C5DE0[156], "Fractional scanlines cannot be written"); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source