// // jinit_downsampler from 0x673814 to 0x6739be (426 bytes) // // 1 xrefs: // > jinit_compress_master @ 0x66db32 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // 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_21; *(_DWORD *)(result + 4) = sub_6729E8; *(_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_673648; *(_DWORD *)(v12 + 8) = 1; } else { *v5 = sub_6737B8; } } else { if ( v9 != 2 * v7 ) goto LABEL_13; if ( v8 == v10 ) { v13 = 0; *v5 = sub_672D98; } 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_672A40; *v6 = v9 / v7; result = v8 / v10; v6[10] = v8 / v10; } goto LABEL_7; } if ( a1[57] ) { *v5 = sub_672EEC; *(_DWORD *)(v12 + 8) = 1; } else { *v5 = sub_672E34; } } } 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