//
// LevelEditorLayer::removeFromGroup from 0x1403fd4a0 to 0x1403fd600 (352 bytes)
//
// 4 xrefs:
// > ??> @ 0x14078b288
// > ??> @ 0x1408c6688
// > ??> @ 0x1408c6698
// > ??> @ 0x140925850
//
// 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:31:53 +0000
//
void __fastcall LevelEditorLayer::removeFromGroup(__int64 a1, struct cocos2d::CCObject *a2, unsigned int a3)
{
__int64 v3; // rbp
struct cocos2d::CCObject *Group; // rax
int v7; // eax
__int64 v8; // r14
struct cocos2d::CCObject *v9; // rsi
__int64 v10; // rax
cocos2d::CCArray *v11; // rax
cocos2d::CCArray *TriggerGroup; // rax
v3 = (int)a3;
Group = GJBaseGameLayer::getGroup(a1, a3);
cocos2d::CCArray::removeObject(Group, a2, 1);
v7 = v3;
if ( *((_BYTE *)a2 + 1298) )
{
if ( (int)v3 > 9999 )
v7 = 9999;
if ( v7 < 0 )
v7 = 0;
v8 = (unsigned int)v7;
v9 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3944) + 8LL * (unsigned int)v7);
if ( !v9 )
{
v9 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(0);
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 3888), v9, (unsigned int)v8);
v10 = *(_QWORD *)(a1 + 3944);
LABEL_14:
*(_QWORD *)(v10 + 8 * v8) = v9;
}
}
else
{
if ( (int)v3 > 9999 )
v7 = 9999;
if ( v7 < 0 )
v7 = 0;
v8 = (unsigned int)v7;
v9 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3920) + 8LL * (unsigned int)v7);
if ( !v9 )
{
v9 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(0);
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 3880), v9, (unsigned int)v8);
v10 = *(_QWORD *)(a1 + 3920);
goto LABEL_14;
}
}
cocos2d::CCArray::removeObject(v9, a2, 1);
if ( *((_BYTE *)a2 + 1178) )
{
v11 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 3968), v3);
if ( v11 )
{
if ( cocos2d::CCArray::containsObject(v11, a2) )
GJBaseGameLayer::removeGroupParent(a1, (__int64)a2, v3);
}
}
if ( *((_BYTE *)a2 + 1261) )
{
TriggerGroup = (cocos2d::CCArray *)LevelEditorLayer::getTriggerGroup(a1, (unsigned int)v3);
cocos2d::CCArray::removeObject(TriggerGroup, a2, 1);
}
*(_BYTE *)(a1 + 15666) = 1;
}