// // sub_8F8CDC from 0x8f8cdc to 0x8f9014 (824 bytes) // // 3 xrefs: // > sub_8F7960 @ 0x8f7b48 // > sub_8F7960 @ 0x8f7b4c // > @ 0x8f7c44 // // 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:15 +0000 // int __fastcall sub_8F8CDC(int a1, _BYTE *a2, unsigned int a3) { int result; // r0 int v6; // [sp+10h] [bp-24h] unsigned int v7; // [sp+14h] [bp-20h] int v8; // [sp+18h] [bp-1Ch] int v9; // [sp+1Ch] [bp-18h] int j; // [sp+1Ch] [bp-18h] _BYTE *v11; // [sp+20h] [bp-14h] int v12; // [sp+24h] [bp-10h] int i; // [sp+28h] [bp-Ch] unsigned int k; // [sp+2Ch] [bp-8h] v6 = *(_DWORD *)(*(_DWORD *)(a1 + 576) + 4); v7 = *(_WORD *)(a1 + 84) >> 3; v8 = a3 / v7; v9 = a3; v11 = a2; v12 = TIFFmalloc(a3); result = v9 / (v7 * v6); if ( v9 % (v7 * v6) ) result = _assert2(); if ( v12 ) { while ( v9 > v6 ) { switch ( v6 ) { case 0: goto LABEL_13; case 1: goto LABEL_12; case 2: goto LABEL_11; case 3: goto LABEL_10; case 4: goto LABEL_9; default: for ( i = v6 - 4; i > 0; --i ) { v11[v6] += *v11; ++v11; } LABEL_9: v11[v6] += *v11; ++v11; LABEL_10: v11[v6] += *v11; ++v11; LABEL_11: v11[v6] += *v11; ++v11; LABEL_12: v11[v6] += *v11; ++v11; LABEL_13: v9 -= v6; break; } } TIFFmemcpy(v12, a2, a3); for ( j = 0; j < v8; ++j ) { for ( k = 0; k < v7; ++k ) a2[v7 * j + k] = *(_BYTE *)(v12 + v8 * (v7 - k - 1) + j); } return TIFFfree(v12); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source