//
// MusicBrowser::sliderEnded from 0x14047c160 to 0x14047c27e (286 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407b5f98
// > ??> @ 0x140928610
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:32:43 +0000
//
// Hidden C++ exception states: #wind=3
char __fastcall MusicBrowser::sliderEnded(__int64 a1, __int64 a2)
{
_QWORD *v3; // rcx
char result; // al
float Value; // xmm6_4
_QWORD *v6; // rcx
int v7; // ebx
__int64 v8; // rcx
void *v9; // [rsp+50h] [rbp+18h]
void *v10; // [rsp+50h] [rbp+18h]
void *v11; // [rsp+50h] [rbp+18h]
v3 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v9 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v3 = (_QWORD *)qword_14090BF60;
}
result = FMODAudioEngine::isMusicPlaying_1(v3, 0);
if ( result )
{
Value = SliderThumb::getValue(*(float **)(*(_QWORD *)(a2 + 408) + 456LL));
v6 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v10 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v6 = (_QWORD *)qword_14090BF60;
}
v7 = (int)(float)((float)(int)FMODAudioEngine::getMusicLengthMS(v6) * Value);
v8 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v11 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v8 = qword_14090BF60;
}
return FMODAudioEngine::setMusicTimeMS(v8, v7, 0, 0);
}
return result;
}