// // TIFFFillStrip from 0x8fe14c to 0x8fe628 (1244 bytes) // // 3 xrefs: // > sub_8FD564 @ 0x8fd6d0 // > TIFFReadEncodedStrip @ 0x8fdb5c // > @ 0x6b7dc // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:04:16 +0000 // int __fastcall TIFFFillStrip(_DWORD *a1, int a2) { __int64 v3; // r2 _DWORD *v7; // [sp+1Ch] [bp-28h] __int64 v8; // [sp+20h] [bp-24h] v7 = a1 + 10; if ( TIFFFillStriles() && a1[44] ) { if ( (a1[3] & 0x20000) == 0 ) { v8 = *(_QWORD *)(v7[34] + 8 * a2); if ( !v8 ) { TIFFErrorExt(a1[157], (int)"TIFFFillStrip", "Invalid strip byte count %llu, strip %lu", 0LL, a2); return 0; } if ( (a1[3] & 0x800) != 0 && ((a1[3] & *((unsigned __int16 *)v7 + 27)) != 0 || (a1[3] & 0x100) != 0) ) { if ( (a1[3] & 0x200) != 0 && a1[147] ) { TIFFfree(a1[147]); a1[147] = 0; a1[148] = 0; } a1[3] &= ~0x200u; v3 = (int)a1[154]; if ( HIDWORD(v8) > (int)v3 >> 31 || HIDWORD(v8) == HIDWORD(v3) && (unsigned int)v8 > (unsigned int)v3 || *(_QWORD *)(v7[33] + 8 * a2) > (unsigned __int64)((int)a1[154] - v8) ) { TIFFErrorExt( a1[157], (int)"TIFFFillStrip", "Read error on strip %lu; got %llu bytes, expected %llu", a2, (int)a1[154] - *(_QWORD *)(v7[33] + 8 * a2), v8); a1[113] = -1; return 0; } a1[148] = v8; a1[147] = a1[153] + *(_DWORD *)(v7[33] + 8 * a2); a1[149] = 0; a1[150] = v8; a1[3] |= 0x800000u; } else { if ( HIDWORD(v8) != (int)v8 >> 31 ) { TIFFErrorExt(a1[157], (int)"TIFFFillStrip", "Integer overflow"); return 0; } if ( a1[148] < (int)v8 ) { a1[113] = -1; if ( (a1[3] & 0x200) == 0 ) { TIFFErrorExt(a1[157], (int)"TIFFFillStrip", "Data buffer too small to hold strip %lu", a2); return 0; } if ( !TIFFReadBufferSetup(a1, 0, v8) ) return 0; } if ( (a1[3] & 0x800000) != 0 ) { a1[113] = -1; if ( !TIFFReadBufferSetup(a1, 0, v8) ) return 0; } if ( sub_8FDBDC((int)a1, a2, a1[147], v8, (int)"TIFFFillStrip") != (_DWORD)v8 ) return 0; a1[149] = 0; a1[150] = v8; if ( (a1[3] & *((unsigned __int16 *)v7 + 27)) == 0 && (a1[3] & 0x100) == 0 ) TIFFReverseBits(a1[147], v8); } } return sub_8FF46C(a1, a2); } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source