//
// EditorUI::updateDpadStepLabel from 0xbe04bc to 0xbe06f4 (568 bytes)
//
// 3 xrefs:
// > EditorUI::setCustomMoveStep @ 0x7c16cc
// > EditorUI::setDpadStep @ 0xbe07dc
// > ??> @ 0xb5000
//
// 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::updateDpadStepLabel(EditorUI *this)
{
__int64 v2; // x22
char *v3; // x1
void (*v4)(void); // x3
__int64 v5; // x23
void (__fastcall *v6)(__int64, __int16 *); // x19
unsigned __int64 v7; // x0
cocos2d::CCString *v9; // x0
char *CString; // x0
char *v11; // x1
__int64 v12; // x0
char *v13; // x0
int v14; // w2
char *v15; // x0
int v16; // t1
unsigned __int64 v17; // x1
unsigned __int64 v18; // x2
__int16 v19; // [xsp+48h] [xbp+48h] BYREF
char v20; // [xsp+4Ah] [xbp+4Ah]
__int64 v21; // [xsp+50h] [xbp+50h] BYREF
__int64 v22; // [xsp+58h] [xbp+58h]
void *v23; // [xsp+60h] [xbp+60h]
if ( !*((_QWORD *)this + 203) )
return _stack_chk_guard;
v2 = *((int *)this + 400);
v21 = 0;
v22 = 0;
v23 = nullptr;
v3 = *((char **)&unk_13FAF90 + 4 * v2 + 1);
if ( v3 )
{
std::string::assign(&v21, v3);
LABEL_4:
v4 = *(void (**)(void))(**((_QWORD **)this + 203) + 928LL);
goto LABEL_5;
}
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%.3f",
nullptr,
*((float *)this + 408));
CString = (char *)cocos2d::CCString::getCString(v9);
std::string::assign(&v21, CString);
if ( (v21 & 1) != 0 )
{
v11 = (char *)v23;
v12 = v22;
}
else
{
v12 = (unsigned __int8)v21 >> 1;
v11 = (char *)&v21 + 1;
}
v13 = &v11[v12];
if ( v13 == v11 )
goto LABEL_15;
v14 = (unsigned __int8)*(v13 - 1);
v15 = v13 - 1;
if ( v14 == 48 )
{
while ( v15 != v11 )
{
v16 = (unsigned __int8)*--v15;
if ( v16 != 48 )
goto LABEL_22;
}
LABEL_15:
v17 = 0;
goto LABEL_16;
}
LABEL_22:
v17 = v15 - v11 + 1;
LABEL_16:
std::string::erase((char *)&v21, v17, 0xFFFFFFFFFFFFFFFFLL);
if ( (v21 & 1) != 0 )
{
v18 = v22 - 1;
if ( *((_BYTE *)v23 + v22 - 1) != 46 )
{
v4 = *(void (**)(void))(**((_QWORD **)this + 203) + 928LL);
goto LABEL_5;
}
LABEL_23:
std::string::erase((char *)&v21, v18, 0xFFFFFFFFFFFFFFFFLL);
goto LABEL_4;
}
v18 = ((unsigned __int8)v21 >> 1) - 1LL;
if ( *((_BYTE *)&v21 + v18 + 1) == 46 )
goto LABEL_23;
v4 = *(void (**)(void))(**((_QWORD **)this + 203) + 928LL);
LABEL_5:
v4();
v5 = *((_QWORD *)this + 203);
v6 = *(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v5 + 1072LL);
v7 = sub_BDDBD0(*((_DWORD *)&unk_13FAF90 + 8 * v2 + 7));
v19 = v7;
v20 = BYTE2(v7);
v6(v5, &v19);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 203), 26.0, 0.45, 0.1);
if ( (v21 & 1) != 0 )
operator delete(v23);
return _stack_chk_guard;
}