//
// EditorUI::recreateButtonTabs from 0x1001880a8 to 0x100188244 (412 bytes)
//
// 1 xrefs:
// > EditorPauseLayer::onResume @ 0x1004443ac
//
// 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 10:59:51 +0000
//
__int64 __fastcall EditorUI::recreateButtonTabs(__int64 a1)
{
__int64 v2; // x0
__int64 IntGameVariable; // x20
__int64 v4; // x0
__int64 v5; // x21
__int64 v6; // x0
__int64 v7; // x22
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__n128 GameVariable; // q0
int v12; // w22
__int64 v13; // x23
__int64 v14; // x0
int v15; // w0
_BOOL4 v16; // w8
__int64 v18; // x0
_DWORD *v19; // x0
_DWORD *v20; // x0
__int64 v21; // x0
_DWORD *v22; // x0
__int64 result; // x0
*(_BYTE *)(a1 + 1591) = 0;
v2 = GameManager::sharedState(a1);
IntGameVariable = GameManager::getIntGameVariable(v2, "0049");
v4 = GameManager::sharedState(IntGameVariable);
v5 = GameManager::getIntGameVariable(v4, "0050");
v6 = sub_1002E757C(*(_QWORD *)(a1 + 1192));
if ( (_DWORD)v6 )
{
v7 = 0;
do
{
v8 = sub_1002E75A0(*(_QWORD *)(a1 + 1192), v7);
EditButtonBar::reloadItems(v8, IntGameVariable, v5);
v7 = (unsigned int)(v7 + 1);
v6 = sub_1002E757C(*(_QWORD *)(a1 + 1192));
}
while ( (unsigned int)v7 < (unsigned int)v6 );
}
v9 = GameManager::sharedState(v6);
GameVariable = GameManager::getGameVariable(v9, "0191");
v12 = v10;
v13 = *(_QWORD *)(a1 + 1592);
if ( v13 )
{
v14 = GameManager::sharedState(v10);
GameVariable = GameManager::getGameVariable(v14, "0247");
v16 = *(unsigned __int8 *)(a1 + 1604) != v15;
}
else
{
v16 = 0;
}
if ( (v12 ^ (v13 != 0)) == 1 && !v16 )
{
result = *(_QWORD *)(a1 + 832);
if ( result )
return EditButtonBar::reloadItems(result, IntGameVariable, v5);
}
else
{
v18 = *(_QWORD *)(a1 + 1592);
if ( v18 )
{
(*(void (__fastcall **)(__int64, __n128))(*(_QWORD *)v18 + 520LL))(v18, GameVariable);
*(_QWORD *)(a1 + 1592) = 0;
}
v19 = *(_DWORD **)(a1 + 1608);
if ( v19 )
cocos2d::CCObject::release(v19);
*(_QWORD *)(a1 + 1608) = 0;
v20 = *(_DWORD **)(a1 + 1616);
if ( v20 )
cocos2d::CCObject::release(v20);
*(_QWORD *)(a1 + 1616) = 0;
*(_QWORD *)(a1 + 1624) = 0;
v21 = *(_QWORD *)(a1 + 832);
if ( v21 )
{
(*(void (__fastcall **)(__int64, __n128))(*(_QWORD *)v21 + 520LL))(v21, GameVariable);
*(_QWORD *)(a1 + 832) = 0;
}
v22 = *(_DWORD **)(a1 + 816);
if ( v22 )
cocos2d::CCObject::release(v22);
*(_QWORD *)(a1 + 816) = 0;
EditorUI::createMoveMenu(a1);
EditorUI::updateEditMenu(a1);
return EditorUI::updateButtons(a1);
}
return result;
}