// // jinit_downsampler from 0x883894 to 0x883a3e (426 bytes) // // 1 xrefs: // > jinit_compress_master @ 0x87dbb2 // // 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:03:12 +0000 // int __fastcall jinit_downsampler(_DWORD *a1) { int result; // r0 _DWORD *v3; // r10 int v4; // r6 _DWORD *v5; // r5 _BYTE *v6; // r8 int v7; // r7 int v8; // r11 int v9; // r2 int v10; // r9 int v11; // r3 int v12; // [sp+8h] [bp-24h] char v13; // [sp+Ch] [bp-20h] result = (*(int (**)(void))a1[1])(); a1[104] = result; *(_DWORD *)result = nullsub_22; *(_DWORD *)(result + 4) = sub_882A68; *(_DWORD *)(result + 8) = 0; v12 = result; if ( a1[55] ) { *(_DWORD *)(*a1 + 20) = 26; result = (*(int (__fastcall **)(_DWORD *))*a1)(a1); } v3 = (_DWORD *)a1[21]; if ( (int)a1[19] > 0 ) { v4 = 0; v5 = (_DWORD *)(v12 + 12); v6 = (_BYTE *)(v12 + 92); v13 = 1; while ( 1 ) { v7 = v3[9] * v3[2] / a1[70]; v8 = a1[69]; v9 = a1[68]; v10 = v3[10] * v3[3] / a1[71]; v5[10] = v10; result = v9 == v7 && v8 == v10; if ( result ) { if ( a1[57] ) { *v5 = sub_8836C8; *(_DWORD *)(v12 + 8) = 1; } else { *v5 = sub_883838; } } else { if ( v9 != 2 * v7 ) goto LABEL_13; if ( v8 == v10 ) { v13 = 0; *v5 = sub_882E18; } else { if ( v8 != 2 * v10 ) { LABEL_13: if ( v9 % v7 || v8 % v10 ) { *(_DWORD *)(*a1 + 20) = 39; result = (*(int (__fastcall **)(_DWORD *))*a1)(a1); } else { v13 = 0; *v5 = sub_882AC0; *v6 = v9 / v7; result = v8 / v10; v6[10] = v8 / v10; } goto LABEL_7; } if ( a1[57] ) { *v5 = sub_882F6C; *(_DWORD *)(v12 + 8) = 1; } else { *v5 = sub_882EB4; } } } LABEL_7: ++v4; v3 += 22; ++v5; ++v6; if ( a1[19] <= v4 ) { if ( a1[57] ) v11 = ((unsigned __int8)v13 ^ 1) & 1; else v11 = 0; if ( v11 ) { *(_DWORD *)(*a1 + 20) = 101; return (*(int (__fastcall **)(_DWORD *, _DWORD))(*a1 + 4))(a1, 0); } return result; } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source