//
// cocos2d::CCMenuItemToggle::createWithTarget from 0x1003a9db0 to 0x1003a9ef4 (324 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:23 +0000
//
char *__fastcall cocos2d::CCMenuItemToggle::createWithTarget(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
char *v5; // rbx
__int64 v6; // rax
unsigned int v7; // r15d
__int64 v8; // rax
float v10; // [rsp+8h] [rbp-38h] BYREF
__int64 v11; // [rsp+10h] [rbp-30h]
v11 = a3;
v5 = (char *)operator new(0x188u);
cocos2d::CCNodeRGBA::CCNodeRGBA((__int64)v5);
*((_WORD *)v5 + 169) = 0;
*(_OWORD *)(v5 + 344) = 0;
*(_OWORD *)(v5 + 360) = 0;
*(_QWORD *)v5 = off_100B33CA0;
*((_QWORD *)v5 + 40) = off_100B34100;
*((_DWORD *)v5 + 94) = 0;
*((_QWORD *)v5 + 48) = 0;
sub_100278250(&v10, 0.5, 0.5);
(*(void (__fastcall **)(char *, float *))(*(_QWORD *)v5 + 296LL))(v5, &v10);
*((_QWORD *)v5 + 43) = a1;
*((_QWORD *)v5 + 44) = a2;
*((_QWORD *)v5 + 45) = v11;
*((_WORD *)v5 + 169) = 256;
v6 = sub_1007FE900(v5);
*((_QWORD *)v5 + 48) = v6;
cocos2d::CCObject::retain(v6);
if ( (unsigned int)sub_1007FEF90(a4) )
{
v7 = 0;
do
{
v8 = sub_1007FEFE0(a4, v7);
sub_1007FEBF0(*((_QWORD *)v5 + 48), v8);
++v7;
}
while ( v7 < (unsigned int)sub_1007FEF90(a4) );
}
*((_DWORD *)v5 + 94) = -1;
(*(void (__fastcall **)(char *, _QWORD))(*(_QWORD *)v5 + 1080LL))(v5, 0);
return v5;
}