// // sub_4B174 from 0x4b174 to 0x4b274 (256 bytes) // // 3 xrefs: // > @ 0x4b172 // > sub_4ADB4 @ 0x4adec // > FMOD::Channel::setLoopPoints @ 0xad808 // // 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 sub_4B174(int a1, unsigned int a2, unsigned int a3, unsigned int a4, unsigned int a5) { int v7; // r3 int result; // r0 int v9; // r6 unsigned int v10; // [sp+0h] [bp-18h] BYREF unsigned int v11; // [sp+4h] [bp-14h] BYREF v10 = 0; v11 = 0; v7 = *(_DWORD *)(a1 + 332); if ( !v7 || !*(_DWORD *)(a1 + 16) ) return 30; result = 19; if ( a3 <= 4 && ((1 << a3) & 0x16) != 0 ) { result = 19; if ( a5 <= 4 && ((1 << a5) & 0x16) != 0 ) { v9 = *(_DWORD *)(v7 + 20); if ( !v9 ) return 31; switch ( a3 ) { case 1u: v11 = (unsigned int)(float)((float)((float)((float)a2 * 0.001) * *(float *)(v9 + 80)) + 0.5); break; case 4u: sub_4C6A4(a2, &v11, *(_DWORD *)(v9 + 76), *(_DWORD *)(v9 + 24)); break; case 2u: v11 = a2; break; } switch ( a5 ) { case 1u: v10 = (unsigned int)(float)((float)((float)((float)a4 * 0.001) * *(float *)(v9 + 80)) + 0.5); break; case 4u: sub_4C6A4(a4, &v10, *(_DWORD *)(v9 + 76), *(_DWORD *)(v9 + 24)); break; case 2u: v10 = a4; break; } if ( v10 > v11 ) return (*(int (__fastcall **)(_DWORD, unsigned int, unsigned int))(**(_DWORD **)(a1 + 332) + 72))( *(_DWORD *)(a1 + 332), v11, v10 - v11 + 1); else return 31; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source