//
// AccountLayer::onLogin from 0x98d55c to 0x98d628 (204 bytes)
//
// 3 xrefs:
// > ??> @ 0xd1b18
// > AccountLayer::customSetup @ 0x98ddec
// > ??> @ 0x1546358
//
// 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 AccountLayer::onLogin(AccountLayer *this, cocos2d::CCObject *a2)
{
__int64 v2; // x2
char v3; // w0
__int64 v4; // x0
__int64 v5; // x1
__int64 v6; // x20
__int64 v8; // [xsp+20h] [xbp+20h] BYREF
__int64 v9; // [xsp+28h] [xbp+28h]
void *v10; // [xsp+30h] [xbp+30h]
v2 = GJAccountManager::sharedState(_stack_chk_guard) + 328;
v3 = *(_BYTE *)v2;
v8 = 0;
v9 = 0;
v10 = nullptr;
if ( (v3 & 1) != 0 )
{
std::string::__init(&v8, *(void **)(v2 + 16), *(_QWORD *)(v2 + 8));
}
else
{
v4 = *(_QWORD *)v2;
v5 = *(_QWORD *)(v2 + 8);
v10 = *(void **)(v2 + 16);
v8 = v4;
v9 = v5;
}
v6 = AccountLoginLayer::create(&v8);
if ( (v8 & 1) != 0 )
operator delete(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
return _stack_chk_guard;
}