// // sub_8F3D8C from 0x8f3d8c to 0x8f4334 (1448 bytes) // // 9 xrefs: // > TIFFInitPixarLog @ 0x8f7594 // > TIFFInitPixarLog @ 0x8f7598 // > TIFFInitPixarLog @ 0x8f75a4 // > TIFFInitPixarLog @ 0x8f75a8 // > TIFFInitPixarLog @ 0x8f75b4 // > TIFFInitPixarLog @ 0x8f75b8 // > @ 0x8f7710 // > @ 0x8f7714 // > @ 0x8f7718 // // 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_8F3D8C(int a1, __int16 *a2, unsigned int a3) { int v7; // [sp+1Ch] [bp-20h] int v8; // [sp+20h] [bp-1Ch] int v9; // [sp+24h] [bp-18h] signed int v10; // [sp+28h] [bp-14h] int v11; // [sp+2Ch] [bp-10h] unsigned __int16 *v12; // [sp+30h] [bp-Ch] int v13; // [sp+34h] [bp-8h] v7 = a1 + 40; v8 = *(_DWORD *)(a1 + 576); switch ( *(_DWORD *)(v8 + 132) ) { case 0: case 1: v10 = a3; goto LABEL_6; case 2: case 3: case 4: v10 = a3 >> 1; goto LABEL_6; case 5: v10 = a3 >> 2; LABEL_6: v11 = *(_DWORD *)(a1 + 56) * *(unsigned __int16 *)(v8 + 124); if ( !v8 ) _assert2(); *(_DWORD *)(v8 + 76) = *(_DWORD *)(v8 + 120); *(_DWORD *)(v8 + 80) = 2 * v10; if ( *(_DWORD *)(v8 + 80) != 2 * v10 ) { TIFFErrorExt(*(_DWORD *)(a1 + 628), (int)"PixarLogDecode", "ZLib cannot deal with buffers this size"); return 0; } break; default: TIFFErrorExt( *(_DWORD *)(a1 + 628), (int)"PixarLogDecode", "%d bit input not supported in PixarLog", *(unsigned __int16 *)(a1 + 84)); return 0; } do { v13 = j_inflate(v8 + 64, 1); if ( v13 == 1 ) break; if ( v13 == -3 ) { TIFFErrorExt( *(_DWORD *)(a1 + 628), (int)"PixarLogDecode", "Decoding error at scanline %lu, %s", *(_DWORD *)(a1 + 444), *(const char **)(v8 + 88)); if ( j_inflateSync(v8 + 64) ) return 0; } else if ( v13 ) { TIFFErrorExt(*(_DWORD *)(a1 + 628), (int)"PixarLogDecode", "ZLib error: %s", *(const char **)(v8 + 88)); return 0; } } while ( *(_DWORD *)(v8 + 80) ); if ( *(_DWORD *)(v8 + 80) ) { TIFFErrorExt( *(_DWORD *)(a1 + 628), (int)"PixarLogDecode", "Not enough data at scanline %lu (short %llu bytes)", *(_DWORD *)(a1 + 444), (unsigned __int64)*(unsigned int *)(v8 + 80)); return 0; } else { v12 = *(unsigned __int16 **)(v8 + 120); if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 ) TIFFSwabArrayOfShort(v12, v10); if ( v10 % v11 ) { TIFFWarningExt( *(_DWORD *)(a1 + 628), "PixarLogDecode", "stride %lu is not a multiple of sample count, %lu, data truncated.", v11, v10); v10 -= v10 % v11; } v9 = 0; while ( 2 ) { if ( v9 < v10 ) { switch ( *(_DWORD *)(v8 + 132) ) { case 0: sub_8F27DC(v12, v11, *(unsigned __int16 *)(v8 + 124), a2, *(_DWORD *)(v8 + 156)); a2 = (__int16 *)((char *)a2 + v11); goto LABEL_32; case 1: sub_8F2BFC(v12, v11, *(unsigned __int16 *)(v8 + 124), a2, *(_DWORD *)(v8 + 156)); a2 = (__int16 *)((char *)a2 + v11); goto LABEL_32; case 2: sub_8F23FC(v12, v11, *(unsigned __int16 *)(v8 + 124), a2); a2 += v11; goto LABEL_32; case 3: sub_8F1760(v12, v11, *(unsigned __int16 *)(v8 + 124), a2, *(_DWORD *)(v8 + 148)); a2 += v11; goto LABEL_32; case 4: sub_8F1F9C(v12, v11, *(unsigned __int16 *)(v8 + 124), a2, *(_DWORD *)(v8 + 152)); a2 += v11; goto LABEL_32; case 5: sub_8F12F8(v12, v11, *(unsigned __int16 *)(v8 + 124), a2, *(_DWORD *)(v8 + 148)); a2 += 2 * v11; LABEL_32: v9 += v11; v12 += v11; continue; default: TIFFErrorExt( *(_DWORD *)(a1 + 628), (int)"PixarLogDecode", "Unsupported bits/sample: %d", *(unsigned __int16 *)(v7 + 44)); return 0; } } return 1; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source