//
// AccountLayer::onLogin from 0x1000cc420 to 0x1000cc493 (115 bytes)
//
// 1 xrefs:
// > AccountLayer::customSetup @ 0x1000cbf29
//
// 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 __fastcall AccountLayer::onLogin(AccountLayer *a1, cocos2d::CCObject *longStorage)
{
double v2; // xmm0_8
GJAccountManager *v3; // rax
std::string *p_m_username; // rax
__int64 v5; // rbx
__int128 v6; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
v3 = GJAccountManager::sharedState();
if ( (v3->m_username.m_data.m_short.sizex2 & 1) != 0 )
{
longStorage = (cocos2d::CCObject *)v3->m_username.m_data.m_long.longStorage;
sub_100006B70(&v6, longStorage, v3->m_username.m_data.m_long.size, v2);
}
else
{
p_m_username = &v3->m_username;
__p = p_m_username->m_data.m_long.longStorage;
v6 = *(_OWORD *)&p_m_username->m_data.m_short.sizex2;
}
v5 = AccountLoginLayer::create(&v6, longStorage);
if ( (v6 & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1288LL))(v5);
}