//
// EditorUI::onAssignNewGroupID from 0x7d2168 to 0x7d22e8 (384 bytes)
//
// 1 xrefs:
// > ??> @ 0xcc238
//
// 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:54:16 +0000
//
__int64 __fastcall EditorUI::onAssignNewGroupID(EditorUI *this)
{
cocos2d::CCArray *v2; // x0
cocos2d::CCArray *v3; // x20
LevelEditorLayer *v5; // x0
unsigned int NextFreeGroupID; // w23
_QWORD *v7; // x0
_QWORD *v8; // x19
void *v9; // x0
unsigned int i; // w19
__int64 v11; // x21
void *v12[2]; // [xsp+40h] [xbp+40h] BYREF
void *v13; // [xsp+50h] [xbp+50h]
__int64 v14; // [xsp+58h] [xbp+58h]
float v15; // [xsp+60h] [xbp+60h]
v2 = *((cocos2d::CCArray **)this + 187);
if ( v2 )
v3 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(v2, _stack_chk_guard);
else
v3 = *((cocos2d::CCArray **)this + 112);
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
v5 = *((LevelEditorLayer **)this + 180);
v12[0] = nullptr;
v12[1] = nullptr;
v13 = nullptr;
v14 = 0;
v15 = 1.0;
NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(v5, (__int64)v12);
v7 = v13;
if ( v13 )
{
do
{
v8 = (_QWORD *)*v7;
operator delete(v7);
v7 = v8;
}
while ( v8 );
}
v9 = v12[0];
v12[0] = nullptr;
if ( v9 )
operator delete(v9);
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v3); ++i )
{
v11 = cocos2d::CCArray::objectAtIndex(v3, i);
if ( (*(unsigned int (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 1600LL))(v11, NextFreeGroupID) == 1 )
(*(void (__fastcall **)(_QWORD, __int64, _QWORD, _QWORD))(**((_QWORD **)this + 180) + 1352LL))(
*((_QWORD *)this + 180),
v11,
NextFreeGroupID,
0);
}
EditorUI::updateObjectInfoLabel(this);
}
return _stack_chk_guard;
}