// // sub_5A5DC from 0x5a5dc to 0x5a74c (368 bytes) // // 2 xrefs: // > sub_59CF0 @ 0x59d54 // > FMOD::Channel::getLoopPoints @ 0xcf204 // // 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 // __int64 __fastcall sub_5A5DC(__int64 a1, unsigned int *a2, unsigned int a3, unsigned int *a4, unsigned int a5) { __int64 v5; // x8 __int64 result; // x0 __int64 v9; // x22 unsigned int v11; // w8 unsigned int v12; // w8 v5 = *(_QWORD *)(a1 + 472); if ( !v5 ) return 30; result = 19; if ( a3 <= 4 && ((1 << a3) & 0x16) != 0 ) { result = 19; if ( a5 <= 4 && ((1 << a5) & 0x16) != 0 ) { v9 = *(_QWORD *)(v5 + 40); if ( !v9 ) return 31; if ( a2 ) { switch ( a3 ) { case 1u: v11 = (unsigned int)(float)((float)((float)((float)*(unsigned int *)(v5 + 88) * 1000.0) / *(float *)(v9 + 108)) + 0.5); goto LABEL_15; case 4u: sub_5C280(*(unsigned int *)(v5 + 88), a2, *(unsigned int *)(v9 + 104), *(unsigned int *)(v9 + 40), 1); if ( a4 ) goto LABEL_17; return 0; case 2u: v11 = *(_DWORD *)(v5 + 88); LABEL_15: *a2 = v11; break; } } if ( a4 ) { LABEL_17: v12 = *(_DWORD *)(*(_QWORD *)(a1 + 472) + 88LL) + *(_DWORD *)(*(_QWORD *)(a1 + 472) + 92LL) - 1; switch ( a5 ) { case 1u: result = 0; v12 = (unsigned int)(float)((float)((float)((float)v12 * 1000.0) / *(float *)(v9 + 108)) + 0.5); goto LABEL_24; case 4u: sub_5C280(v12, a4, *(unsigned int *)(v9 + 104), *(unsigned int *)(v9 + 40), 1); break; case 2u: result = 0; LABEL_24: *a4 = v12; return result; } } return 0; } } return result; }