//
// SetupSongTriggerPopup::onSavePlaybackPos from 0x1405f37b0 to 0x1405f3942 (402 bytes)
//
// 3 xrefs:
// > SetupSongTriggerPopup::init @ 0x1405f2e96
// > SetupSongTriggerPopup::init @ 0x1405f2f5b
// > ??> @ 0x14092f384
//
// 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:35:06 +0000
//
// Hidden C++ exception states: #wind=4
double __fastcall SetupSongTriggerPopup::onSavePlaybackPos(__int64 a1, __int64 a2)
{
_QWORD *v4; // rcx
_QWORD *v5; // rcx
__int64 v6; // rax
__int64 *v7; // r14
__int64 v8; // rcx
__int64 v9; // rbx
const struct cocos2d::CCPoint *v10; // rax
__int64 v11; // rax
double result; // xmm0_8
__int64 v13; // rdx
void *v14; // [rsp+58h] [rbp+10h] BYREF
v4 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v14 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v4 = (_QWORD *)qword_14090BF60;
}
if ( FMODAudioEngine::isMusicPlaying_1(v4, 0) )
{
v5 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v14 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v5 = (_QWORD *)qword_14090BF60;
}
FMODAudioEngine::getMusicTimeMS(v5);
}
else
{
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v14 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
v7 = *(__int64 **)(v6 + 568);
if ( v7 )
{
v8 = *(_QWORD *)(a1 + 680);
if ( v8 )
{
v9 = *v7;
v10 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 200LL))(v8);
result = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, v10);
*(float *)&result = (*(float (__fastcall **)(__int64 *, __int64, _QWORD, _QWORD, _BYTE, _DWORD))(v9 + 1256))(
v7,
v11,
0,
0,
0,
0)
* 1000.0;
}
}
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) )
{
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) != 1 )
return result;
v13 = 410;
}
else
{
v13 = 408;
}
return SetupTriggerPopup::updateValue(a1, v13);
}