//
// EditorUI::editGroup from 0x14011f260 to 0x14011f490 (560 bytes)
//
// 2 xrefs:
// > EditorUI::init @ 0x1400e0f45
// > ??> @ 0x1406c9534
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
void EditorUI::editGroup(EditorUI *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *m_selectedObjects; // rbx
GameObject *m_selectedObject; // rdi
char *v5; // rsi
__int64 v6; // r8
int NextFreeGroupID; // ebx
void (*v8)(FLAlertLayer *); // rdx
std::unordered_set v9; // [rsp+20h] [rbp-58h] BYREF
char *v10; // [rsp+80h] [rbp+8h] BYREF
if ( a1->m_selectedObject || cocos2d::CCArray::count(a1->m_selectedObjects) )
{
m_selectedObjects = a1->m_selectedObjects;
m_selectedObject = a1->m_selectedObject;
v5 = (char *)operator new(0x318u);
v10 = v5;
FLAlertLayer::FLAlertLayer((FLAlertLayer *)v5);
*(_QWORD *)v5 = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 40) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 41) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 42) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 43) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 44) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 51) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 54) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 79) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 80) = &SetGroupIDLayer::`vftable';
*((_QWORD *)v5 + 81) = 0;
*((_QWORD *)v5 + 82) = 0;
*((_QWORD *)v5 + 85) = 0;
*((_QWORD *)v5 + 86) = 0;
*((_QWORD *)v5 + 87) = 0;
*((_QWORD *)v5 + 88) = 0;
*((_QWORD *)v5 + 89) = 0;
*((_QWORD *)v5 + 90) = 0;
v5[728] = 0;
*((_DWORD *)v5 + 183) = 0;
v5[736] = 0;
*(_QWORD *)(v5 + 740) = 0;
*((_DWORD *)v5 + 187) = 0;
*((_DWORD *)v5 + 188) = -1000;
*(_QWORD *)(v5 + 756) = 0;
*((_WORD *)v5 + 382) = 0;
v5[766] = 0;
*((_WORD *)v5 + 386) = 0;
*(_WORD *)(v5 + 775) = 0;
*((_DWORD *)v5 + 195) = 0;
*((_QWORD *)v5 + 98) = 0;
if ( SetGroupIDLayer::init((SetGroupIDLayer *)v5, m_selectedObject, m_selectedObjects) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v5);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v5 + 8LL))(v5, 1);
v5 = nullptr;
}
LODWORD(v10) = 0;
sub_14005E660((__int64)&v9, &v10, v6);
NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(a1->m_editorLayer, &v9);
sub_14005D100((__int64)&v9._Vec);
sub_14005D870((void **)&v9._List._Mypair._Myval2._Myhead);
*((_DWORD *)v5 + 195) = NextFreeGroupID;
v8 = *(void (**)(FLAlertLayer *))(*(_QWORD *)v5 + 1040LL);
if ( v8 == FLAlertLayer::show )
FLAlertLayer::show((FLAlertLayer *)v5);
else
v8((FLAlertLayer *)v5);
}
}