//
// LevelEditorLayer::updateObjectLabel from 0x1003ff12c to 0x1003ff4cc (928 bytes)
//
// 3 xrefs:
// > sub_1001AD6E0 @ 0x1001ad734
// > LevelEditorLayer::addSpecial @ 0x1003f9ba4
// > EditorUI::dynamicGroupUpdate @ 0x10047a5b8
//
// 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 11:04:38 +0000
//
void __fastcall LevelEditorLayer::updateObjectLabel(unsigned int *a1)
{
int v2; // w8
bool v3; // zf
bool v4; // zf
bool v5; // zf
bool v6; // zf
unsigned int v7; // w9
__int64 v8; // x0
float v9; // s8
const std::string::value_type *v10; // x1
void *v11; // x0
const std::string::value_type *CString; // x0
void *v13; // x0
void *v14; // x0
const std::string::value_type *v15; // x0
__int64 v16; // x0
void *v17; // x20
std::string *p_p; // x1
float v19; // s9
__int64 v20; // x0
std::string v21; // [xsp+18h] [xbp-58h] BYREF
std::string __p; // [xsp+30h] [xbp-40h] BYREF
v2 = a1[257];
if ( v2 <= 1810 )
{
if ( v2 > 1267 )
{
v6 = (unsigned int)(v2 - 1585) > 0x1F || ((1 << (v2 - 49)) & 0x84000401) == 0;
if ( !v6 || (unsigned int)(v2 - 1346) < 2 || v2 == 1268 )
goto LABEL_38;
}
else
{
v4 = (unsigned int)(v2 - 1006) > 0x2B || ((1LL << ((unsigned __int8)v2 + 18)) & 0x80000000003LL) == 0;
if ( !v4 || v2 == 899 || v2 == 901 )
goto LABEL_38;
}
}
else
{
if ( v2 <= 2061 )
{
v3 = (unsigned int)(v2 - 1811) > 6 || v2 == 1813;
if ( v3 && v2 != 1912 )
return;
LABEL_38:
v7 = a1[366];
if ( v2 > 1815 )
{
if ( v2 == 1816 )
{
memset(&__p, 0, sizeof(__p));
v9 = 0.0;
if ( *((_BYTE *)a1 + 1677) )
v11 = sub_1003065B0("%i.");
else
v11 = sub_1003065B0("%i");
CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v11);
std::string::assign(&__p, CString);
goto LABEL_62;
}
v8 = a1[366];
if ( v2 != 1817 )
goto LABEL_45;
}
else
{
if ( v2 == 899 )
{
v8 = a1[256];
memset(&__p, 0, sizeof(__p));
if ( (int)v8 <= 999 )
{
LABEL_50:
GameToolbox::intToString(v8, &v21);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
__p = v21;
v9 = -5.0;
goto LABEL_62;
}
goto LABEL_54;
}
v8 = a1[366];
if ( v2 != 1811 )
{
LABEL_45:
memset(&__p, 0, sizeof(__p));
if ( v2 == 3640 )
{
v14 = sub_1003065B0("%i\n%i", v7, a1[367]);
v15 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v14);
v9 = 0.0;
std::string::assign(&__p, v15);
goto LABEL_62;
}
if ( v2 == 1912 )
{
v13 = sub_1003065B0("%i/%i", v7, a1[367]);
v10 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v13);
goto LABEL_60;
}
if ( (int)v8 <= 999 || v2 != 1006 || a1[402] )
goto LABEL_50;
LABEL_54:
v10 = GJSpecialColorSelect::textForColorIdx(v8);
LABEL_60:
v9 = -5.0;
std::string::assign(&__p, v10);
LABEL_62:
v16 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)a1 + 1704LL))(a1);
v17 = (void *)v16;
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
if ( v16 )
{
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v16 + 928LL))(v16, p_p);
}
else
{
v17 = cocos2d::CCLabelBMFont::create_1((const char *)p_p, "bigFont.fnt");
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v17 + 160LL))(v17, 0.5);
(*(void (__fastcall **)(unsigned int *, void *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v17, 1);
(*(void (__fastcall **)(unsigned int *, void *))(*(_QWORD *)a1 + 1712LL))(a1, v17);
}
v19 = *(float *)(*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)a1 + 328LL))(a1);
v20 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)a1 + 328LL))(a1);
sub_1000262BC((float *)&v21, v19 * 0.5, v9 + (float)(*(float *)(v20 + 4) * 0.5));
(*(void (__fastcall **)(void *, std::string *))(*(_QWORD *)v17 + 184LL))(v17, &v21);
cocos2d::CCLabelBMFont::limitLabelWidth((__int64)v17, 30.0, 0.5, 0.0);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
return;
}
}
v8 = a1[420];
goto LABEL_45;
}
if ( v2 <= 3032 )
{
if ( v2 != 2062 && v2 != 2067 && v2 != 3016 )
return;
goto LABEL_38;
}
v5 = (unsigned int)(v2 - 3609) > 0x33 || ((1LL << ((unsigned __int8)v2 - 25)) & 0x8000080000001LL) == 0;
if ( !v5 || v2 == 3033 )
goto LABEL_38;
}
}