//
// AccountRegisterLayer::updateLabel from 0x84f298 to 0x84f418 (384 bytes)
//
// 12 xrefs:
// > AccountRegisterLayer::registerAccountFailed @ 0x84f858
// > AccountRegisterLayer::onSubmit @ 0x84f968
// > AccountRegisterLayer::onSubmit @ 0x84fba4
// > AccountRegisterLayer::onSubmit @ 0x84fbf8
// > AccountRegisterLayer::onSubmit @ 0x84fc74
// > AccountRegisterLayer::onSubmit @ 0x84fd54
// > AccountRegisterLayer::textInputClosed @ 0x850190
// > AccountRegisterLayer::textInputClosed @ 0x8503ec
// > AccountRegisterLayer::textInputClosed @ 0x850448
// > AccountRegisterLayer::textInputClosed @ 0x8504a4
// > AccountRegisterLayer::textInputClosed @ 0x8506a0
// > ??> @ 0x8b998
//
// 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 AccountRegisterLayer::updateLabel(AccountRegisterLayer *a1, AccountError a2)
{
cocos2d::CCLabelBMFont *m_usernameLabel; // x2
const char *v4; // x1
cocos2d::CCLabelBMFont *m_verifyEmailLabel; // x2
cocos2d::CCLabelBMFont *m_passwordLabel; // x2
const char *v7; // x1
cocos2d::CCLabelBMFont *m_emailLabel; // x2
const char *v9; // x1
if ( a2 == InvalidEmail )
{
m_emailLabel = a1->m_emailLabel;
v9 = "Email is invalid";
goto LABEL_17;
}
if ( a2 <= InvalidEmail )
{
if ( a2 == TooShortLessThan3 )
{
m_usernameLabel = a1->m_usernameLabel;
v4 = "Too short. Minimum 3 characters";
goto LABEL_8;
}
if ( a2 <= TooShortLessThan3 )
{
if ( a2 == EmailsDoNotMatch )
{
a1->m_verifyEmailLabel->setString(a1->m_verifyEmailLabel, "Emails do not match");
m_verifyEmailLabel = a1->m_verifyEmailLabel;
goto LABEL_9;
}
goto LABEL_24;
}
if ( a2 != TooShortLessThan6 )
{
a1->m_confirmPasswordLabel->setString(a1->m_confirmPasswordLabel, "Passwords do not match");
m_verifyEmailLabel = a1->m_confirmPasswordLabel;
goto LABEL_9;
}
m_passwordLabel = a1->m_passwordLabel;
v7 = "Too short. Minimum 6 characters";
LABEL_15:
m_passwordLabel->setString(m_passwordLabel, (const unsigned __int8 *)v7);
m_verifyEmailLabel = a1->m_passwordLabel;
goto LABEL_9;
}
if ( a2 == InvalidUsername )
{
m_usernameLabel = a1->m_usernameLabel;
v4 = "Username is invalid";
goto LABEL_8;
}
if ( a2 < InvalidUsername )
{
m_passwordLabel = a1->m_passwordLabel;
v7 = "Password is invalid";
goto LABEL_15;
}
if ( a2 == AlreadyUsedEmail )
{
m_emailLabel = a1->m_emailLabel;
v9 = "Email is already in use";
LABEL_17:
m_emailLabel->setString(m_emailLabel, (const unsigned __int8 *)v9);
m_verifyEmailLabel = a1->m_emailLabel;
goto LABEL_9;
}
if ( a2 != AlreadyUsedUsername )
{
LABEL_24:
m_usernameLabel = a1->m_usernameLabel;
v4 = "Something went wrong.";
goto LABEL_8;
}
m_usernameLabel = a1->m_usernameLabel;
v4 = "Username is already in use";
LABEL_8:
m_usernameLabel->setString(m_usernameLabel, (const unsigned __int8 *)v4);
m_verifyEmailLabel = a1->m_usernameLabel;
LABEL_9:
m_verifyEmailLabel->setColor(m_verifyEmailLabel, (const cocos2d::ccColor3B *)&unk_EEC890);
}