// // sub_8F6A54 from 0x8f6a54 to 0x8f6de0 (908 bytes) // // 9 xrefs: // > TIFFInitPixarLog @ 0x8f75f4 // > TIFFInitPixarLog @ 0x8f75f8 // > TIFFInitPixarLog @ 0x8f7604 // > TIFFInitPixarLog @ 0x8f7608 // > TIFFInitPixarLog @ 0x8f7614 // > TIFFInitPixarLog @ 0x8f7618 // > @ 0x8f7728 // > @ 0x8f772c // > @ 0x8f7730 // // 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:14 +0000 // int __fastcall sub_8F6A54(_DWORD *a1, unsigned __int8 *a2, unsigned int a3) { int v3; // r3 _DWORD *v8; // [sp+18h] [bp-1Ch] int v9; // [sp+1Ch] [bp-18h] int v10; // [sp+20h] [bp-14h] signed int v11; // [sp+24h] [bp-10h] int v12; // [sp+28h] [bp-Ch] __int16 *v13; // [sp+2Ch] [bp-8h] v8 = a1 + 10; v9 = a1[144]; switch ( *(_DWORD *)(v9 + 132) ) { case 0: case 1: v11 = a3; goto LABEL_5; case 2: case 3: case 4: v11 = a3 >> 1; goto LABEL_5; case 5: v11 = a3 >> 2; LABEL_5: v12 = a1[14] * *(unsigned __int16 *)(v9 + 124); v10 = 0; v13 = *(__int16 **)(v9 + 120); break; default: goto LABEL_9; } while ( v10 < v11 ) { v3 = *(_DWORD *)(v9 + 132); if ( v3 == 4 ) { sub_8F5DF0(a2, v12, *(unsigned __int16 *)(v9 + 124), v13, *(_DWORD *)(v9 + 164)); a2 += 2 * v12; } else if ( v3 == 5 ) { sub_8F46C4( COERCE_DOUBLE(__PAIR64__(v12, (unsigned int)a2)), *(unsigned __int16 *)(v9 + 124), v13, *(_DWORD *)(v9 + 160)); a2 += 4 * v12; } else { if ( v3 ) { LABEL_9: TIFFErrorExt( a1[157], (int)"PixarLogEncode", "%d bit input not supported in PixarLog", *((unsigned __int16 *)v8 + 22)); return 0; } sub_8F6454(a2, v12, *(unsigned __int16 *)(v9 + 124), v13, *(_DWORD *)(v9 + 168)); a2 += v12; } v10 += v12; v13 += v12; } *(_DWORD *)(v9 + 64) = *(_DWORD *)(v9 + 120); *(_DWORD *)(v9 + 68) = 2 * v11; if ( *(_DWORD *)(v9 + 68) >> 1 == v11 ) { do { if ( j_deflate(v9 + 64, 0) ) { TIFFErrorExt(a1[157], (int)"PixarLogEncode", "Encoder error: %s", *(const char **)(v9 + 88)); return 0; } if ( !*(_DWORD *)(v9 + 80) ) { a1[152] = a1[148]; TIFFFlushData1(a1); *(_DWORD *)(v9 + 76) = a1[147]; *(_DWORD *)(v9 + 80) = a1[148]; } } while ( *(_DWORD *)(v9 + 68) ); return 1; } else { TIFFErrorExt(a1[157], (int)"PixarLogEncode", "ZLib cannot deal with buffers this size"); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source