//
// MenuLayer::updateUserProfileButton from 0x30a1a0 to 0x30a246 (166 bytes)
//
// 2 xrefs:
// > MenuLayer::init @ 0x30b3c6
// > GameManager::accountStatusChanged @ 0x32332a
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void MenuLayer::updateUserProfileButton(MenuLayer *a1)
{
GJAccountManager *v2; // r0
_BOOL4 v3; // r4
cocos2d::CCSprite *m_viewProfileSprite; // r0
cocos2d::CCLabelBMFont *m_profileLabel; // r7
void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r8
GJAccountManager *v7; // r0
MenuLayer *v8; // [sp+0h] [bp-8h] BYREF
v8 = a1;
v2 = GJAccountManager::sharedState();
v3 = v2->m_accountID - v2->m_unkInt1 > 0;
a1->m_profileButton->setVisible(a1->m_profileButton, v3);
a1->m_profileLabel->setVisible(a1->m_profileLabel, v3);
m_viewProfileSprite = a1->m_viewProfileSprite;
if ( m_viewProfileSprite )
m_viewProfileSprite->setVisible(m_viewProfileSprite, v3);
if ( v3 )
{
m_profileLabel = a1->m_profileLabel;
setString = m_profileLabel->setString;
v7 = GJAccountManager::sharedState();
sub_775C20(&v8, &v7->m_username);
setString(m_profileLabel, (const unsigned __int8 *)v8);
sub_774008(&v8);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_profileLabel, 70.0, 0.7, 0.0);
}
}