//
// cocos2d::extension::CCControlSwitch::initWithMaskSprite from 0xd11530 to 0xd11704 (468 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0xd1170c
// > cocos2d::extension::CCControlSwitch::create @ 0xd11760
// > cocos2d::extension::CCControlSwitch::create @ 0xd11828
// > ??> @ 0xb5a20
//
// This function is hookable on this platform (idp: arm, 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 13:07:03 +0000
//
__int64 __fastcall cocos2d::extension::CCControlSwitch::initWithMaskSprite(
cocos2d::extension::CCControlSwitch *this,
cocos2d::CCSprite *a2,
cocos2d::CCSprite *a3,
cocos2d::CCSprite *a4,
cocos2d::CCSprite *a5,
cocos2d::CCLabelTTF *a6,
cocos2d::CCLabelTTF *a7)
{
unsigned __int8 v14; // w0
unsigned int v15; // w21
cocos2d::extension::CCControlSwitchSprite *v17; // x28
__int64 v18; // x23
void (__fastcall *v19)(__int64, _BYTE *); // x24
__int64 v20; // x0
void (__fastcall *v21)(cocos2d::extension::CCControlSwitch *, _BYTE *); // x23
void (__fastcall *v22)(cocos2d::extension::CCControlSwitch *, __int64); // x22
__int64 v23; // x0
float v24; // [xsp+70h] [xbp+70h]
_BYTE v25[8]; // [xsp+80h] [xbp+80h] BYREF
v14 = cocos2d::extension::CCControl::init(this);
v15 = v14;
if ( v14 )
{
(*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)this + 1000LL))(this, 1);
*((_BYTE *)this + 485) = 1;
v17 = (cocos2d::extension::CCControlSwitchSprite *)operator new(0x2A8u);
cocos2d::extension::CCControlSwitchSprite::CCControlSwitchSprite(v17);
*((_QWORD *)this + 59) = v17;
cocos2d::extension::CCControlSwitchSprite::initWithMaskSprite(v17, a2, a3, a4, a5, a6, a7);
v18 = *((_QWORD *)this + 59);
v19 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v18 + 184LL);
v24 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 328LL))(v18) * 0.5;
v20 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 328LL))(*((_QWORD *)this + 59));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, v24, *(float *)(v20 + 4) * 0.5);
v19(v18, v25);
(*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 456LL))(
this,
*((_QWORD *)this + 59));
(*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 440LL))(this, 0);
v21 = *(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _BYTE *))(*(_QWORD *)this + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 0.5, 0.5);
v21(this, v25);
v22 = *(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)this + 320LL);
v23 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 328LL))(*((_QWORD *)this + 59));
v22(this, v23);
}
return v15;
}