//
// GJBaseGameLayer::addToGroup from 0x14032bc50 to 0x14032bd34 (228 bytes)
//
// 5 xrefs:
// > ??> @ 0x14076b808
// > ??> @ 0x1407d5e68
// > ??> @ 0x1408b5f7c
// > ??> @ 0x1408b5f8c
// > ??> @ 0x14091f1e4
//
// 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 11:30:29 +0000
//
void __fastcall GJBaseGameLayer::addToGroup(__int64 a1, struct cocos2d::CCObject *a2, int a3)
{
cocos2d::CCArray *Group; // rax
__int64 v7; // rcx
int v8; // eax
__int64 v9; // rbp
struct cocos2d::CCObject *v10; // rbx
__int64 v11; // rax
if ( a3 <= 9999 )
{
Group = (cocos2d::CCArray *)GJBaseGameLayer::getGroup(a1, (unsigned int)a3);
cocos2d::CCArray::addObject(Group, a2);
v8 = 0;
if ( *((_BYTE *)a2 + 1298) )
{
if ( a3 >= 0 )
v8 = a3;
v9 = v8;
v10 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3944) + 8LL * v8);
if ( v10 )
goto LABEL_12;
v10 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v7);
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 3888), v10, v9);
v11 = *(_QWORD *)(a1 + 3944);
}
else
{
if ( a3 >= 0 )
v8 = a3;
v9 = v8;
v10 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3920) + 8LL * v8);
if ( v10 )
goto LABEL_12;
v10 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v7);
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 3880), v10, v9);
v11 = *(_QWORD *)(a1 + 3920);
}
*(_QWORD *)(v11 + 8 * v9) = v10;
LABEL_12:
cocos2d::CCArray::addObject(v10, a2);
}
}