// // cocos2d::extension::CCControlSwitch::initWithMaskSprite from 0x18000cbc0 to 0x18000cdcc (524 bytes) // // 5 xrefs: // > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000cafa // > cocos2d::extension::CCControlSwitch::create @ 0x18000cb78 // > cocos2d::extension::CCControlSwitch::create @ 0x18000ce40 // > @ 0x18002fdf8 // > @ 0x180049d98 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // Hidden C++ exception states: #wind=1 char __fastcall cocos2d::extension::CCControlSwitch::initWithMaskSprite( cocos2d::extension::CCControlSwitch *this, struct cocos2d::CCSprite *a2, struct cocos2d::CCSprite *a3, struct cocos2d::CCSprite *a4, struct cocos2d::CCSprite *a5, struct cocos2d::CCLabelTTF *a6, struct cocos2d::CCLabelTTF *a7) { __int64 v11; // rdx char *v12; // rdi __int64 *v13; // rcx __int64 v14; // rbx float v15; // xmm6_4 float *v16; // rax __int64 v17; // rax __int64 v18; // rbx __int64 v19; // rax __int64 v20; // rbx __int64 v21; // rax _QWORD v23[2]; // [rsp+40h] [rbp-48h] BYREF if ( !cocos2d::extension::CCControl::init(this) ) return 0; LOBYTE(v11) = 1; (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)this + 904LL))(this, v11); *((_BYTE *)this + 485) = 1; v12 = (char *)operator new(0x2A8u); v23[0] = v12; cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v12); cocos2d::CCActionTweenDelegate::CCActionTweenDelegate((cocos2d::CCActionTweenDelegate *)(v12 + 600)); *(_QWORD *)v12 = &cocos2d::extension::CCControlSwitchSprite::`vftable'; *((_QWORD *)v12 + 40) = &cocos2d::extension::CCControlSwitchSprite::`vftable'; *((_QWORD *)v12 + 43) = &cocos2d::extension::CCControlSwitchSprite::`vftable'; *((_QWORD *)v12 + 75) = &cocos2d::extension::CCControlSwitchSprite::`vftable'; *((_QWORD *)v12 + 76) = 0; *((_DWORD *)v12 + 154) = 0; *((_QWORD *)v12 + 78) = 0; *((_QWORD *)v12 + 79) = 0; *((_QWORD *)v12 + 80) = 0; *((_QWORD *)v12 + 81) = 0; *((_QWORD *)v12 + 82) = 0; *((_QWORD *)v12 + 83) = 0; *((_QWORD *)v12 + 84) = 0; *((_QWORD *)this + 59) = v12; sub_18000C110((__int64 *)v12, (__int64)a2, a3, a4, a5, a6, a7); v13 = *((__int64 **)this + 59); v14 = *v13; v15 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v13 + 304))(v13) + 4); v16 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 304LL))(*((_QWORD *)this + 59)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, *v16 * 0.5, v15 * 0.5); (*(void (__fastcall **)(_QWORD, __int64))(v14 + 184))(*((_QWORD *)this + 59), v17); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 448LL))( this, *((_QWORD *)this + 59)); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 416LL))(this, 0); v18 = *(_QWORD *)this; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 0.5, 0.5); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(v18 + 272))(this, v19); v20 = *(_QWORD *)this; v21 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 304LL))(*((_QWORD *)this + 59)); (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(v20 + 296))(this, v21); return 1; }