//
// LevelEditorLayer::addToGroup from 0x1000c43d0 to 0x1000c447d (173 bytes)
//
// 1 xrefs:
// > ??> @ 0x100ac3e58
//
// 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:20:35 +0000
//
__int64 __fastcall LevelEditorLayer::addToGroup(__int64 a1, __int64 a2, __int64 a3, unsigned __int8 a4)
{
int v5; // r12d
__int64 result; // rax
__int64 v7; // r13
__int64 v8; // r12
if ( (int)a3 <= 9999 )
{
v5 = a3;
result = GJBaseGameLayer::addToGroup(a1, a2, a3, a4);
if ( *(_BYTE *)(a2 + 1253) == 1 )
{
v7 = v5;
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 14384) + 8LL * v5);
if ( v8 )
{
if ( a4 )
goto LABEL_8;
}
else
{
v8 = sub_1007FE900(a1);
*(_QWORD *)(*(_QWORD *)(a1 + 14384) + 8 * v7) = v8;
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 14376), v8, v7);
if ( a4 )
{
LABEL_8:
result = sub_1007FEBF0(v8, a2);
goto LABEL_9;
}
}
result = sub_1007FF080(v8, a2);
if ( !(_BYTE)result )
goto LABEL_8;
}
LABEL_9:
*(_BYTE *)(a1 + 14938) = 1;
}
return result;
}