//
// ButtonSprite::setString from 0x3c2db0 to 0x3c30be (782 bytes)
//
// 30 xrefs:
// > ButtonSprite::updateBGImage @ 0x3c3154
// > ButtonSprite::init @ 0x3c3342
// > EditorUI::onResetSpecialFilter @ 0x481f10
// > EditorUI::onResetSpecialFilter @ 0x481f2c
// > EditorUI::setIDPopupClosed @ 0x488246
// > EditorUI::setIDPopupClosed @ 0x4882ee
// > CustomizeObjectLayer::updateCustomColorLabels @ 0x57ea5c
// > CustomizeObjectLayer::textChanged @ 0x57f304
// > CustomizeObjectLayer::init @ 0x580116
// > CustomizeObjectLayer::init @ 0x5802de
// > OptionsScrollLayer::onMatchToggle @ 0x6bdf6a
// > AccountReviewPopup::onToggleHistory @ 0x731fce
// > AccountReviewPopup::clearCard @ 0x7324e2
// > AccountReviewPopup::clearCard @ 0x7324ee
// > AccountReviewPopup::clearCard @ 0x7324fa
// > AccountReviewPopup::clearCard @ 0x732506
// > AccountReviewPopup::updateCard @ 0x739218
// > AccountReviewPopup::updateCard @ 0x739232
// > AccountReviewPopup::updateCard @ 0x73924c
// > AccountReviewPopup::updateCard @ 0x739270
// > ReportQueuePopup::onToggleSort @ 0x73afaa
// > LevelPickerPopup::refreshUseID @ 0x74cf6a
// > ThreadViewPopup::refreshLockNotice @ 0x752ab2
// > InvitesPopup::onToggleIgnored @ 0x759b5a
// > LevelPickerPopup::onToggleKind @ 0x75aa68
// > LevelPickerPopup::onToggleFavorites @ 0x75ab00
// > LevelPickerPopup::onOnlineMode @ 0x75ad60
// > LevelPickerPopup::onOnlineMode @ 0x75adf4
// > LevelPickerPopup::textChanged @ 0x75ae82
// > IDNameBrowserPopup::updateSortButtonLabel @ 0x78f9fe
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:46:32 +0000
//
int __fastcall ButtonSprite::setString(int this, char *a2)
{
int v2; // r4
float *v4; // r0
float v5; // s16
int v6; // r5
void (__fastcall *v7)(int, _DWORD); // r7
float v8; // r0
float v9; // s15
float v10; // s16
float v11; // s17
float v12; // s16
float v13; // s16
int v14; // r0
float v15; // s15
int v16; // r7
void (__fastcall *v17)(int, _BYTE *); // r8
void (__fastcall *v18)(int, _BYTE *); // r7
float v19; // r8
int v20; // r0
int v21; // r7
void (__fastcall *v22)(int, _BYTE *); // r8
float v23; // s17
int v24; // r0
int v25; // r7
void (__fastcall *v26)(int, _BYTE *); // r8
float v27; // s17
int v28; // r0
const void *v29; // r0
int v30; // r5
int (__fastcall *v31)(int, _DWORD); // r7
float v32; // r0
int v33; // r5
void (__fastcall *v34)(int, _DWORD); // r7
float *v35; // r0
int v36; // r7
void (__fastcall *v37)(int, int); // r8
int v38; // r0
void (__fastcall *v39)(int, _BYTE *); // r7
float v40; // s17
int v41; // r0
_BYTE v42[8]; // [sp+4h] [bp-Ch] BYREF
v2 = this;
if ( *(_DWORD *)(this + 508) == 1 )
{
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(this + 536) + 80))(*(_DWORD *)(this + 536), 1065353216);
(*(void (__fastcall **)(_DWORD, char *))(**(_DWORD **)(v2 + 536) + 464))(*(_DWORD *)(v2 + 536), a2);
std::string::assign((int *)(v2 + 568), a2);
if ( *(float *)(v2 + 512) > 0.0 )
{
v4 = (float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 536) + 164))(*(_DWORD *)(v2 + 536));
v5 = *(float *)(v2 + 512);
if ( *v4 > v5 )
{
v33 = *(_DWORD *)(v2 + 536);
v34 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v33 + 80);
v35 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v33 + 164))(v33);
v34(v33, v5 / *v35);
}
}
v6 = *(_DWORD *)(v2 + 536);
v7 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v6 + 80);
v8 = (*(float (__fastcall **)(int))(*(_DWORD *)v6 + 84))(v6);
v9 = *(float *)(v2 + 520);
if ( v8 <= v9 )
{
v6 = *(_DWORD *)(v2 + 536);
v9 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v6 + 84))(v6));
}
v7(v6, LODWORD(v9));
if ( *(_BYTE *)(v2 + 532) )
{
v10 = *(float *)(v2 + 512);
}
else
{
v11 = *(float *)(v2 + 516);
v12 = *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 536) + 164))(*(_DWORD *)(v2 + 536));
if ( v11 >= (float)(v12 * (*(float (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 536) + 84))(*(_DWORD *)(v2 + 536))) )
{
v10 = *(float *)(v2 + 516);
}
else
{
v13 = *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 536) + 164))(*(_DWORD *)(v2 + 536));
v10 = v13 * (*(float (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 536) + 84))(*(_DWORD *)(v2 + 536));
}
}
v14 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 536) + 164))(*(_DWORD *)(v2 + 536));
v15 = *(float *)(v2 + 524);
v16 = *(_DWORD *)(v2 + 548);
v17 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v16 + 160);
if ( v15 == 0.0 )
v15 = *(float *)(v14 + 4) + 4.0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v42, v10 + 16.0, v15);
v17(v16, v42);
v18 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v2 + 160);
v19 = *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 548) + 164))(*(_DWORD *)(v2 + 548));
v20 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 548) + 164))(*(_DWORD *)(v2 + 548));
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v42, v19, *(float *)(v20 + 4));
v18(v2, v42);
v21 = *(_DWORD *)(v2 + 536);
v22 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v21 + 92);
v23 = *(float *)(v2 + 552) + (float)(*(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2) * 0.5);
v24 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v23, *(float *)(v2 + 556) + (float)(*(float *)(v24 + 4) * 0.5));
v22(v21, v42);
v25 = *(_DWORD *)(v2 + 548);
v26 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v25 + 92);
v27 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2);
v28 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v27 * 0.5, *(float *)(v28 + 4) * 0.5);
v26(v25, v42);
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 256))(v2) )
{
v29 = (const void *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 256))(v2);
if ( v29 )
{
if ( _dynamic_cast(
v29,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'CCMenuItemSpriteExtra,
0) )
{
v36 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 256))(v2);
v37 = *(void (__fastcall **)(int, int))(*(_DWORD *)v36 + 160);
v38 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2);
v37(v36, v38);
v39 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v2 + 92);
v40 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2);
v41 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 164))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v40 * 0.5, *(float *)(v41 + 4) * 0.5);
v39(v2, v42);
}
}
}
v30 = *(_DWORD *)(v2 + 536);
v31 = *(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v30 + 80);
v32 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v30 + 84))(v30));
return v31(v30, v32 * *(float *)(v2 + 528));
}
return this;
}