//
// TimeSpeedControl::timeSliderChanged from 0x14066dc50 to 0x14066ddc4 (372 bytes)
//
// 2 xrefs:
// > TimeSpeedControl::init @ 0x14066d8fc
// > ??> @ 0x1409321c8
//
// 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:53 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall TimeSpeedControl::timeSliderChanged(__int64 a1, float *a2)
{
float Value; // xmm0_4
float v4; // xmm0_4
float v5; // xmm7_4
__int64 v6; // rcx
float v7; // xmm0_4
__int64 result; // rax
__int64 v9; // rcx
__int64 v10; // rdi
__int64 (__fastcall **v11)(__int64, const char *); // rdi
__int64 v12; // rbx
cocos2d::CCString *v13; // rax
const char *CString; // rax
void *v15; // [rsp+40h] [rbp+8h]
void *v16; // [rsp+40h] [rbp+8h]
Value = SliderThumb::getValue(a2);
v4 = roundf((float)((float)(Value * 1.9) + 0.1) * 10.0);
v5 = v4 / 10.0;
*(float *)(*(_QWORD *)(a1 + 320) + 13664LL) = v4 / 10.0;
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v15 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v6, "0183") )
v7 = 1.0;
else
v7 = v4 / 10.0;
*(float *)(*(_QWORD *)(a1 + 320) + 13668LL) = v7;
result = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v16 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
result = qword_14090BFD0;
}
v9 = *(_QWORD *)(result + 560);
if ( *(_QWORD *)(a1 + 320) == v9 && v5 != 1.0 )
*(_BYTE *)(v9 + 14842) = 1;
v10 = *(_QWORD *)(a1 + 336);
if ( v10 )
{
v11 = *(__int64 (__fastcall ***)(__int64, const char *))(v10 + 360);
v12 = *(_QWORD *)(a1 + 336);
v13 = cocos2d::CCString::createWithFormat("%.01fx", v5);
CString = cocos2d::CCString::getCString(v13);
return (*v11)(v12 + 360, CString);
}
return result;
}