//
// AccountRegisterLayer::onSubmit from 0x588c54 to 0x588e44 (496 bytes)
//
// 0 xrefs:
//
// 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:53:00 +0000
//
int __fastcall AccountRegisterLayer::onSubmit(AccountRegisterLayer *this, cocos2d::CCObject *a2)
{
unsigned int v3; // r11
int v4; // r2
AccountRegisterLayer *v5; // r0
int v6; // r1
_BOOL4 v7; // r11
_BOOL4 v8; // r0
GJAccountManager *v9; // r0
_BOOL4 valid; // [sp+4h] [bp-98h]
int v12; // [sp+8h] [bp-94h]
int v13; // [sp+8h] [bp-94h]
_BYTE v14[12]; // [sp+10h] [bp-8Ch] BYREF
unsigned __int8 v15[12]; // [sp+1Ch] [bp-80h] BYREF
unsigned __int8 v16[12]; // [sp+28h] [bp-74h] BYREF
unsigned __int8 v17[12]; // [sp+34h] [bp-68h] BYREF
unsigned __int8 v18[12]; // [sp+40h] [bp-5Ch] BYREF
int v19[3]; // [sp+4Ch] [bp-50h] BYREF
int v20[3]; // [sp+58h] [bp-44h] BYREF
int v21[3]; // [sp+64h] [bp-38h] BYREF
unsigned __int8 v22[12]; // [sp+70h] [bp-2Ch] BYREF
unsigned __int8 v23[12]; // [sp+7Ch] [bp-20h] BYREF
int v24[3]; // [sp+88h] [bp-14h] BYREF
AccountRegisterLayer::resetLabels(this);
AccountRegisterLayer::disableNodes(this);
CCTextInputNode::getString((CCTextInputNode *)v14, *((_DWORD *)this + 132));
CCTextInputNode::getString((CCTextInputNode *)v15, *((_DWORD *)this + 133));
CCTextInputNode::getString((CCTextInputNode *)v16, *((_DWORD *)this + 134));
CCTextInputNode::getString((CCTextInputNode *)v17, *((_DWORD *)this + 135));
CCTextInputNode::getString((CCTextInputNode *)v18, *((_DWORD *)this + 136));
v3 = sub_587CFC(v15);
std::string::basic_string(v19, (int)v14);
valid = AccountRegisterLayer::validUser((int)this, (unsigned __int8 *)v19);
std::string::~string((int)v19);
if ( !valid )
{
v5 = this;
v6 = -9;
LABEL_11:
AccountRegisterLayer::updateLabel((_DWORD **)v5, v6, v4);
goto LABEL_15;
}
if ( v3 > 2 )
{
if ( !sub_5858BE(v15, v16) )
{
v5 = this;
v6 = -7;
goto LABEL_11;
}
std::string::basic_string(v21, (int)v17);
v7 = AccountRegisterLayer::validEmail((int)this, (int)v21);
std::string::~string((int)v21);
if ( !v7 )
{
v5 = this;
v6 = -6;
goto LABEL_11;
}
v8 = sub_5858BE(v17, v18);
if ( !v8 )
{
v5 = this;
v6 = -99;
goto LABEL_11;
}
v9 = (GJAccountManager *)GJAccountManager::sharedState((GJAccountManager *)v8);
*((_DWORD *)v9 + 76) = (char *)this + 520;
v12 = GJAccountManager::sharedState(v9);
std::string::basic_string(v24, (int)v14);
CCTextInputNode::getString((CCTextInputNode *)v22, *((_DWORD *)this + 133));
CCTextInputNode::getString((CCTextInputNode *)v23, *((_DWORD *)this + 135));
v13 = GJAccountManager::registerAccount(v12, (unsigned __int8 *)v24, v22, v23);
std::string::~string((int)v23);
std::string::~string((int)v22);
std::string::~string((int)v24);
if ( v13 )
AccountRegisterLayer::showLoadingUI(this);
else
(*(void (__fastcall **)(AccountRegisterLayer *, int))(*(_DWORD *)this + 696))(this, -1);
}
else
{
std::string::basic_string(v20, (int)v15);
AccountRegisterLayer::updatePasswordInfo((int)this, (unsigned __int8 *)v20);
std::string::~string((int)v20);
}
LABEL_15:
std::string::~string((int)v18);
std::string::~string((int)v17);
std::string::~string((int)v16);
std::string::~string((int)v15);
return std::string::~string((int)v14);
}