//
// cocos2d::extension::CCControlSwitch::setOn from 0x100392330 to 0x1003923e5 (181 bytes)
//
// 0 xrefs:
//
// 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 12:29:14 +0000
//
__int64 __fastcall cocos2d::extension::CCControlSwitch::setOn(
__int64 a1,
unsigned __int8 a2,
int a3,
double a4,
double a5,
double a6)
{
__int64 v6; // r14
double v7; // xmm1_8
double v8; // xmm0_8
__int64 v9; // rax
unsigned __int8 v10; // si
*(_BYTE *)(a1 + 485) = a2;
v6 = *(_QWORD *)(a1 + 472);
if ( a3 )
{
*(_QWORD *)&v7 = *(unsigned int *)(v6 + 608);
*(_QWORD *)&a6 = *(unsigned int *)(v6 + 4LL * (a2 ^ 1u) + 612);
*(_QWORD *)&v8 = 1045220557;
v9 = cocos2d::CCActionTween::create_1((std::string::value_type *)"sliderXPosition");
cocos2d::CCNode::runAction(v6, v9);
}
else
{
v10 = a2 ^ 1;
*(_QWORD *)&v7 = *(unsigned int *)(v6 + 4LL * v10 + 612);
*(_QWORD *)&v8 = *(unsigned int *)(v6 + 616);
if ( *(float *)&v8 < *(float *)&v7 )
{
*(_QWORD *)&a6 = *(unsigned int *)(v6 + 612);
*(_QWORD *)&v8 = *(unsigned int *)(v6 + 4LL * v10 + 612);
if ( *(float *)&v7 >= *(float *)&a6 )
*(_QWORD *)&v8 = *(unsigned int *)(v6 + 612);
}
*(_DWORD *)(v6 + 608) = LODWORD(v8);
sub_1003914D0((unsigned __int8 *)v6);
}
return (*(__int64 (__fastcall **)(__int64, __int64, double, double, double))(*(_QWORD *)a1 + 1320LL))(
a1,
256,
v8,
v7,
a6);
}