//
// AccountHelpLayer::updatePage from 0x98e48c to 0x98e7d8 (844 bytes)
//
// 3 xrefs:
// > AccountHelpLayer::accountStatusChanged @ 0x98e7d8
// > AccountHelpLayer::customSetup @ 0x98eb70
// > ??> @ 0x7aa58
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:57:57 +0000
//
__int64 __fastcall AccountHelpLayer::updatePage(AccountHelpLayer *this)
{
__int64 v2; // x0
int v3; // w1
GJAccountManager *v4; // x0
__int64 v5; // x0
__int64 v6; // x1
_BOOL4 v7; // w22
GJAccountManager *v8; // x0
GJAccountManager **v9; // x22
void (__fastcall *v10)(GJAccountManager **, __int64); // x23
__int64 v11; // x0
__int64 v12; // x1
char *v13; // x1
cocos2d::CCString *v14; // x0
__int64 CString; // x0
__int64 *v16; // x22
GJAccountManager **v17; // x20
void (__fastcall *v18)(GJAccountManager **, bool); // x21
__int64 v19; // x1
__int64 v21; // x0
GJAccountManager **v22; // x22
void (__fastcall *v23)(GJAccountManager **, __int64); // x23
__int64 v24; // x0
__int64 v25; // x1
char *v26; // x1
cocos2d::CCString *v27; // x0
__int64 v28; // x0
__int64 *v29; // x22
__int64 *v30; // x22
__int64 v31; // [xsp+40h] [xbp+40h] BYREF
__int64 v32; // [xsp+48h] [xbp+48h]
char *v33; // [xsp+50h] [xbp+50h]
v2 = GJAccountManager::sharedState(_stack_chk_guard);
v3 = *(_DWORD *)(v2 + 352);
v4 = (GJAccountManager *)*(unsigned int *)(v2 + 356);
if ( v3 == (_DWORD)v4 )
{
v8 = (GJAccountManager *)TextArea::colorAllCharactersTo(*((_QWORD *)this + 79), 0xFFFFFF);
}
else
{
v5 = GJAccountManager::sharedState(v4);
v31 = 0;
v32 = 0;
v33 = nullptr;
if ( (*(_BYTE *)(v5 + 368) & 1) != 0 )
{
std::string::__init(&v31, *(void **)(v5 + 384), *(_QWORD *)(v5 + 376));
}
else
{
v6 = *(_QWORD *)(v5 + 376);
v31 = *(_QWORD *)(v5 + 368);
v32 = v6;
v33 = *(char **)(v5 + 384);
}
if ( (v31 & 1) != 0 )
{
v7 = v32 != 0;
operator delete(v33);
}
else
{
v7 = (int)(unsigned __int8)v31 >> 1 != 0;
}
v8 = (GJAccountManager *)TextArea::colorAllCharactersTo(*((_QWORD *)this + 79), 0xFFFFFF);
if ( v7 )
{
v9 = *((GJAccountManager ***)this + 78);
v10 = *((void (__fastcall **)(GJAccountManager **, __int64))*v9 + 116);
v11 = GJAccountManager::sharedState(*v9);
v31 = 0;
v32 = 0;
v33 = nullptr;
if ( (*(_BYTE *)(v11 + 328) & 1) != 0 )
{
std::string::__init(&v31, *(void **)(v11 + 344), *(_QWORD *)(v11 + 336));
}
else
{
v12 = *(_QWORD *)(v11 + 336);
v31 = *(_QWORD *)(v11 + 328);
v32 = v12;
v33 = *(char **)(v11 + 344);
}
v13 = (char *)&v31 + 1;
if ( (v31 & 1) != 0 )
v13 = v33;
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Linked to account: %s", v13);
CString = cocos2d::CCString::getCString(v14);
v10(v9, CString);
if ( (v31 & 1) != 0 )
operator delete(v33);
v16 = *((__int64 **)this + 79);
v31 = 0;
v32 = 0;
v33 = nullptr;
std::string::__init(&v31, &byte_11B8890, 0);
TextArea::setString(v16, (char *)&v31);
goto LABEL_14;
}
}
v21 = GJAccountManager::sharedState(v8);
if ( *(_DWORD *)(v21 + 352) == *(_DWORD *)(v21 + 356) )
{
(*(void (__fastcall **)(_QWORD, const char *))(**((_QWORD **)this + 78) + 928LL))(
*((_QWORD *)this + 78),
"Not logged in");
v30 = *((__int64 **)this + 79);
v31 = 0;
v32 = 0;
v33 = nullptr;
std::string::__init(&v31, "Create an account to backup\nand sync your data", 0x2Eu);
TextArea::setString(v30, (char *)&v31);
}
else
{
v22 = *((GJAccountManager ***)this + 78);
v23 = *((void (__fastcall **)(GJAccountManager **, __int64))*v22 + 116);
v24 = GJAccountManager::sharedState(*v22);
v31 = 0;
v32 = 0;
v33 = nullptr;
if ( (*(_BYTE *)(v24 + 328) & 1) != 0 )
{
std::string::__init(&v31, *(void **)(v24 + 344), *(_QWORD *)(v24 + 336));
}
else
{
v25 = *(_QWORD *)(v24 + 336);
v31 = *(_QWORD *)(v24 + 328);
v32 = v25;
v33 = *(char **)(v24 + 344);
}
v26 = (char *)&v31 + 1;
if ( (v31 & 1) != 0 )
v26 = v33;
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Linked to account: %s", v26);
v28 = cocos2d::CCString::getCString(v27);
v23(v22, v28);
if ( (v31 & 1) != 0 )
operator delete(v33);
v29 = *((__int64 **)this + 79);
v31 = 0;
v32 = 0;
v33 = nullptr;
std::string::__init(&v31, "Login required", 0xEu);
TextArea::setString(v29, (char *)&v31);
}
LABEL_14:
if ( (v31 & 1) != 0 )
operator delete(v33);
v17 = *((GJAccountManager ***)this + 81);
v18 = *((void (__fastcall **)(GJAccountManager **, bool))*v17 + 43);
v19 = GJAccountManager::sharedState(*v17);
v18(v17, *(_DWORD *)(v19 + 352) != *(_DWORD *)(v19 + 356));
return _stack_chk_guard;
}