//
// EditorUI::onUpdateDeleteFilter from 0x1400e7500 to 0x1400e767e (382 bytes)
//
// 5 xrefs:
// > EditorUI::setupDeleteMenu @ 0x1400e5501
// > EditorUI::setupDeleteMenu @ 0x1400e55aa
// > EditorUI::setupDeleteMenu @ 0x1400e5634
// > EditorUI::setupDeleteMenu @ 0x1400e5749
// > ??> @ 0x1406c8dd8
//
// 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=4
void EditorUI::onUpdateDeleteFilter(EditorUI *a1, cocos2d::CCObject *a2)
{
unsigned int v3; // eax
unsigned int v4; // ebx
GameObject *m_selectedObject; // rbx
GameManager *v6; // rcx
int m_objectID; // r8d
const char *v8; // rdx
void *v9; // [rsp+38h] [rbp+10h]
void *v10; // [rsp+38h] [rbp+10h]
void *v11; // [rsp+38h] [rbp+10h]
void *v12; // [rsp+38h] [rbp+10h]
v3 = a2->getTag(a2);
v4 = v3;
if ( v3 <= 2 )
{
v6 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v12 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v12);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = (GameManager *)qword_1406C2ED8;
}
m_objectID = v4;
goto LABEL_15;
}
if ( v3 == 3 )
{
m_selectedObject = a1->m_selectedObject;
v6 = (GameManager *)qword_1406C2ED8;
if ( m_selectedObject )
{
if ( !qword_1406C2ED8 )
{
v9 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = (GameManager *)qword_1406C2ED8;
}
GameManager::setIntGameVariable(v6, "0005", 3);
v6 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v10 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = (GameManager *)qword_1406C2ED8;
}
m_objectID = m_selectedObject->m_objectID;
v8 = "0006";
goto LABEL_16;
}
if ( !qword_1406C2ED8 )
{
v11 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = (GameManager *)qword_1406C2ED8;
}
m_objectID = 0;
LABEL_15:
v8 = "0005";
LABEL_16:
GameManager::setIntGameVariable(v6, v8, m_objectID);
}
EditorUI::updateDeleteButtons(a1);
}