//
// EditorUI::updateDeleteButtons from 0xbdf4a4 to 0xbdfab4 (1552 bytes)
//
// 4 xrefs:
// > EditorUI::updateDeleteMenu @ 0x7c1ae8
// > EditorUI::onUpdateDeleteFilter @ 0x7c20d0
// > EditorUI::onUpdateDeleteFilter @ 0x7c20f8
// > ??> @ 0xb4b20
//
// 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 13:03:45 +0000
//
__int64 __fastcall EditorUI::updateDeleteButtons(EditorUI *this)
{
GameManager *v2; // x0
int IntGameVariable; // w22
ButtonSprite *v4; // x0
ButtonSprite *v5; // x0
const char *v6; // x1
ButtonSprite *v7; // x0
const char *v8; // x1
ButtonSprite *v9; // x1
GameObject *v10; // x0
_BOOL8 isSpecialObject; // x0
long double v12; // q0
float *v13; // x0
float v14; // s1
float v15; // s2
__int64 v16; // x20
void (__fastcall *v17)(__int64, long double); // x23
long double v18; // q0
long double v19; // q0
float *v20; // x0
float v21; // s1
float v22; // s2
__int64 v23; // x20
void (__fastcall *v24)(__int64, long double); // x23
long double v25; // q0
__int64 v26; // x1
__int16 *v27; // x0
_QWORD *v28; // x0
__int64 v29; // x1
__int16 *v30; // x0
_QWORD *v31; // x0
__int64 v32; // x1
__int16 *v33; // x20
_QWORD *v34; // x0
ObjectToolbox *v36; // x0
char *v37; // x0
size_t v38; // x0
cocos2d::CCSpriteFrameCache **v39; // x23
void (__fastcall *v40)(cocos2d::CCSpriteFrameCache **, __int64); // x24
cocos2d::CCSpriteFrameCache *v41; // x0
char *v42; // x1
__int64 v43; // x0
ButtonSprite *v44; // x0
GameManager *updated; // x0
GameManager *v46; // x0
ObjectToolbox *v47; // x0
ObjectToolbox *v48; // x0
size_t v49; // x0
_BOOL8 v50; // x0
ObjectToolbox *v51; // x0
char *v52; // x0
size_t v53; // x0
cocos2d::CCSpriteFrameCache **v54; // x23
void (__fastcall *v55)(cocos2d::CCSpriteFrameCache **, __int64); // x24
cocos2d::CCSpriteFrameCache *v56; // x0
char *v57; // x1
__int64 v58; // x0
char *v59; // [xsp+48h] [xbp+48h]
int v60; // [xsp+48h] [xbp+48h]
char *v61; // [xsp+48h] [xbp+48h]
char *v62; // [xsp+48h] [xbp+48h]
__int64 v63; // [xsp+58h] [xbp+58h]
__int64 v64; // [xsp+60h] [xbp+60h] BYREF
__int64 v65; // [xsp+68h] [xbp+68h]
char *v66; // [xsp+70h] [xbp+70h]
v2 = (GameManager *)GameManager::sharedState(_stack_chk_guard);
IntGameVariable = GameManager::getIntGameVariable(v2, "0005");
v4 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 156) + 1072LL))(*((_QWORD *)this + 156));
if ( !IntGameVariable )
{
ButtonSprite::updateBGImage(v4, "GJ_button_02.png");
v5 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 157) + 1072LL))(*((_QWORD *)this + 157));
v6 = "GJ_button_04.png";
goto LABEL_5;
}
ButtonSprite::updateBGImage(v4, "GJ_button_04.png");
v5 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 157) + 1072LL))(*((_QWORD *)this + 157));
if ( IntGameVariable == 2 )
{
v6 = "GJ_button_02.png";
LABEL_5:
ButtonSprite::updateBGImage(v5, v6);
v7 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 158) + 1072LL))(*((_QWORD *)this + 158));
v8 = "GJ_button_04.png";
LABEL_6:
ButtonSprite::updateBGImage(v7, v8);
v9 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 159) + 1072LL))(*((_QWORD *)this + 159));
goto LABEL_7;
}
ButtonSprite::updateBGImage(v5, "GJ_button_04.png");
v7 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 158) + 1072LL))(*((_QWORD *)this + 158));
v8 = "GJ_button_02.png";
if ( IntGameVariable == 1 )
goto LABEL_6;
ButtonSprite::updateBGImage(v7, "GJ_button_04.png");
v44 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 159) + 1072LL))(*((_QWORD *)this + 159));
v9 = v44;
if ( IntGameVariable == 3 )
{
updated = (GameManager *)ButtonSprite::updateBGImage(v44, "GJ_button_02.png");
v46 = (GameManager *)GameManager::sharedState(updated);
v47 = (ObjectToolbox *)GameManager::getIntGameVariable(v46, "0006");
v60 = (int)v47;
v48 = (ObjectToolbox *)ObjectToolbox::sharedState(v47);
v64 = 0;
v61 = ObjectToolbox::intKeyToFrame(v48, v60);
v65 = 0;
v66 = nullptr;
v49 = strlen(v61);
std::string::__init(&v64, v61, v49);
v39 = *((cocos2d::CCSpriteFrameCache ***)this + 153);
v40 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v39 + 145);
v41 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v39);
v42 = (char *)&v64 + 1;
if ( (v64 & 1) != 0 )
v42 = v66;
goto LABEL_36;
}
LABEL_7:
ButtonSprite::updateBGImage(v9, "GJ_button_04.png");
v10 = *((GameObject **)this + 187);
if ( !v10 || (isSpecialObject = GameObject::isSpecialObject(v10)) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 153) + 344LL))(*((_QWORD *)this + 153), 0);
goto LABEL_10;
}
v36 = (ObjectToolbox *)ObjectToolbox::sharedState((ObjectToolbox *)isSpecialObject);
v37 = ObjectToolbox::intKeyToFrame(v36, *(_DWORD *)(*((_QWORD *)this + 187) + 1028LL));
v64 = 0;
v59 = v37;
v65 = 0;
v66 = nullptr;
v38 = strlen(v37);
std::string::__init(&v64, v59, v38);
v39 = *((cocos2d::CCSpriteFrameCache ***)this + 153);
v40 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v39 + 145);
v41 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v39);
v42 = (char *)&v64 + 1;
if ( (v64 & 1) != 0 )
v42 = v66;
LABEL_36:
v43 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v41, v42);
v40(v39, v43);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 153) + 344LL))(*((_QWORD *)this + 153), 1);
if ( (v64 & 1) != 0 )
operator delete(v66);
LABEL_10:
v13 = *((float **)this + 153);
v14 = v13[108];
v15 = v13[109];
if ( v14 >= v15 )
*(float *)&v12 = 20.0 / v14;
else
*(float *)&v12 = 20.0 / v15;
(*(void (__fastcall **)(float *, long double))(*(_QWORD *)v13 + 160LL))(v13, v12);
v16 = *((_QWORD *)this + 153);
v17 = *(void (__fastcall **)(__int64, long double))(*(_QWORD *)v16 + 160LL);
if ( (*(float (__fastcall **)(__int64))(*(_QWORD *)v16 + 168LL))(v16) < 1.0 )
{
v16 = *((_QWORD *)this + 153);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v16 + 168LL))(v16);
}
else
{
LODWORD(v18) = 1.0;
}
v17(v16, v18);
if ( !*((_QWORD *)this + 187)
|| (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112))
|| (v50 = GameObject::isSpecialObject(*((GameObject **)this + 187))) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 152) + 344LL))(*((_QWORD *)this + 152), 0);
}
else
{
v51 = (ObjectToolbox *)ObjectToolbox::sharedState((ObjectToolbox *)v50);
v52 = ObjectToolbox::intKeyToFrame(v51, *(_DWORD *)(*((_QWORD *)this + 187) + 1028LL));
v64 = 0;
v62 = v52;
v65 = 0;
v66 = nullptr;
v53 = strlen(v52);
std::string::__init(&v64, v62, v53);
v54 = *((cocos2d::CCSpriteFrameCache ***)this + 152);
v55 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v54 + 145);
v56 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v54);
v57 = (char *)&v64 + 1;
if ( (v64 & 1) != 0 )
v57 = v66;
v58 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v56, v57);
v55(v54, v58);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 152) + 344LL))(*((_QWORD *)this + 152), 1);
if ( (v64 & 1) != 0 )
operator delete(v66);
}
v20 = *((float **)this + 152);
v21 = v20[108];
v22 = v20[109];
if ( v21 >= v22 )
*(float *)&v19 = 15.0 / v21;
else
*(float *)&v19 = 15.0 / v22;
(*(void (__fastcall **)(float *, long double))(*(_QWORD *)v20 + 160LL))(v20, v19);
v23 = *((_QWORD *)this + 152);
v24 = *(void (__fastcall **)(__int64, long double))(*(_QWORD *)v23 + 160LL);
if ( (*(float (__fastcall **)(__int64))(*(_QWORD *)v23 + 168LL))(v23) < 1.0 )
{
v23 = *((_QWORD *)this + 152);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v23 + 168LL))(v23);
}
else
{
LODWORD(v25) = 1.0;
}
v24(v23, v25);
if ( *((_QWORD *)this + 187) || (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)) )
{
v26 = 1;
v27 = &word_119A228;
}
else
{
v26 = 0;
v27 = &word_119A230;
}
LOWORD(v63) = *v27;
BYTE2(v63) = *((_BYTE *)v27 + 2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 154) + 1056LL))(*((_QWORD *)this + 154), v26);
v28 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 154) + 1072LL))(*((_QWORD *)this + 154));
ButtonSprite::setColor(v28, v63);
if ( *((_QWORD *)this + 187) && !(unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)) )
{
v29 = 1;
v30 = &word_119A228;
}
else
{
v29 = 0;
v30 = &word_119A230;
}
LOWORD(v63) = *v30;
BYTE2(v63) = *((_BYTE *)v30 + 2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 155) + 1056LL))(*((_QWORD *)this + 155), v29);
v31 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 155) + 1072LL))(*((_QWORD *)this + 155));
ButtonSprite::setColor(v31, v63);
if ( IntGameVariable == 3
|| *((_QWORD *)this + 187) && !(unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)) )
{
v32 = 1;
v33 = &word_119A228;
}
else
{
v32 = 0;
v33 = &word_119A230;
}
LOWORD(v63) = *v33;
BYTE2(v63) = *((_BYTE *)v33 + 2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 159) + 1056LL))(*((_QWORD *)this + 159), v32);
v34 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 159) + 1072LL))(*((_QWORD *)this + 159));
ButtonSprite::setColor(v34, v63);
return _stack_chk_guard;
}