//
// AccountLoginLayer::onSubmit from 0x469fac to 0x46a0dc (304 bytes)
//
// 0 xrefs:
//
// 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 AccountLoginLayer::onSubmit(AccountLoginLayer *a1, cocos2d::CCObject *a2)
{
std::string *p_m_username; // r9
AccountLoginLayer *v4; // r0
AccountError v5; // r1
GJAccountManager *v6; // r10
int v7; // r7
cocos2d::CCObject *v8; // [sp+4h] [bp-Ch] BYREF
int v9; // [sp+8h] [bp-8h] BYREF
v8 = a2;
p_m_username = &a1->m_username;
AccountLoginLayer::resetLabels(a1);
AccountLoginLayer::disableNodes(a1);
CCTextInputNode::getString((CCTextInputNode *)&v9, (int)a1->m_usernameInput);
sub_774794(p_m_username, &v9);
sub_774008(&v9);
CCTextInputNode::getString((CCTextInputNode *)&v9, (int)a1->m_passwordInput);
sub_774794(&a1->m_password, &v9);
sub_774008(&v9);
if ( *((_DWORD *)a1->m_username.m_data.m_data - 3) <= 2u )
{
v4 = a1;
v5 = TooShortLessThan3;
LABEL_5:
AccountLoginLayer::updateLabel(v4, v5);
return;
}
if ( *((_DWORD *)a1->m_password.m_data.m_data - 3) <= 5u )
{
v4 = a1;
v5 = TooShortLessThan6;
goto LABEL_5;
}
GJAccountManager::sharedState()->m_accountLoginDelegate = &a1->GJAccountLoginDelegate;
sub_775C20(&v8);
GJAccountManager::getShaPassword((int)&v9);
sub_774794(&a1->m_password, &v9);
sub_774008(&v9);
sub_774008(&v8);
v6 = GJAccountManager::sharedState();
sub_775C20(&v8);
sub_775C20(&v9);
v7 = GJAccountManager::loginAccount(v6, &v8, &v9);
sub_774008(&v9);
sub_774008(&v8);
if ( v7 )
AccountLoginLayer::showLoadingUI(a1);
else
a1->loginAccountFailed(a1, AlreadyUsedUsername|0x1);
}