//
// GameToolbox::createOnOffSprite from 0x69eed8 to 0x69f0e0 (520 bytes)
//
// 3 xrefs:
// > GameToolbox::createOnOffSprite @ 0x69f104
// > LevelBrowserLayer::init @ 0x7faac4
// > ??> @ 0xedca0
//
// 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 12:50:41 +0000
//
__int64 __fastcall GameToolbox::createOnOffSprite(
cocos2d::CCSprite *a1,
unsigned __int8 a2,
__int64 a3,
unsigned __int8 a4)
{
unsigned int v6; // w22
__int64 v7; // x21
size_t v8; // x0
CCSpriteWithHue *v9; // x20
cocos2d::CCNode *v10; // x0
__int64 v11; // x19
void (__fastcall *v12)(__int64, __int64); // x25
__int64 v13; // x0
__int64 v14; // x0
float v16; // [xsp+50h] [xbp+50h]
__int64 v17; // [xsp+68h] [xbp+68h] BYREF
_BYTE v18[8]; // [xsp+78h] [xbp+78h] BYREF
__int64 v19[2]; // [xsp+80h] [xbp+80h] BYREF
void *v20; // [xsp+90h] [xbp+90h]
v6 = a4;
v17 = a3;
v7 = cocos2d::CCSprite::createWithSpriteFrameName(a1, _stack_chk_guard);
v19[0] = 0;
v19[1] = 0;
v20 = nullptr;
v8 = strlen((const char *)a1);
std::string::__init(v19, a1, v8);
v9 = (CCSpriteWithHue *)CCSpriteGrayscale::createWithSpriteFrameName(v19);
if ( (v19[0] & 1) != 0 )
operator delete(v20);
(*(void (__fastcall **)(CCSpriteWithHue *, _QWORD))(*(_QWORD *)v9 + 912LL))(v9, v6);
(*(void (__fastcall **)(CCSpriteWithHue *, __int64 *))(*(_QWORD *)v9 + 960LL))(v9, &v17);
v10 = (cocos2d::CCNode *)CCSpriteWithHue::setLuminance(v9, 1.15);
v11 = cocos2d::CCNode::create(v10);
v12 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 320LL);
v13 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7);
v12(v11, v13);
v16 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 328LL))(v11) * 0.5;
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 328LL))(v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v16, *(float *)(v14 + 4) * 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 184LL))(v7, v18);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 456LL))(v11, v7);
(*(void (__fastcall **)(CCSpriteWithHue *, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v18);
(*(void (__fastcall **)(CCSpriteWithHue *, __int64))(*(_QWORD *)v9 + 72LL))(v9, 2);
(*(void (__fastcall **)(__int64, CCSpriteWithHue *))(*(_QWORD *)v11 + 456LL))(v11, v9);
GameToolbox::setOnOffSprite(v11, a2);
return v11;
}