//
// AccountLayer::onLogin from 0x84a2f4 to 0x84a3ec (248 bytes)
//
// 3 xrefs:
// > ??> @ 0x9f600
// > AccountLayer::customSetup @ 0x84b8cc
// > ??> @ 0x122d780
//
// 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 AccountLayer::onLogin(AccountLayer *a1, cocos2d::CCObject *a2)
{
__int64 v2; // x20
void *v3; // x0
unsigned int *v4; // x2
int v5; // w1
__int64 v6; // [xsp+30h] [xbp+30h] BYREF
std::string v7; // 0:x1.8
GJAccountManager::sharedState();
sub_D18D28(&v6);
v2 = AccountLoginLayer::create((AccountLoginLayer *)&v6, v7);
v3 = (void *)(v6 - 24);
if ( (__int64 *)(v6 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v4 = (unsigned int *)(v6 - 8);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 - 1, v4) );
}
else
{
v5 = *(_DWORD *)(v6 - 8);
*(_DWORD *)(v6 - 8) = v5 - 1;
}
if ( v5 <= 0 )
operator delete(v3);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 1288LL))(v2);
}