//
// AccountLayer::onLogin from 0x10009a870 to 0x10009a8e3 (115 bytes)
//
// 1 xrefs:
// > AccountLayer::customSetup @ 0x10009a37c
//
// This function is hookable on this platform (idp: pc, 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:20:11 +0000
//
__int64 __fastcall AccountLayer::onLogin(__int64 a1)
{
__int64 v1; // rax
__int64 v2; // rax
__int64 v3; // rbx
__int128 v5; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
v1 = GJAccountManager::sharedState(a1);
if ( (*(_BYTE *)(v1 + 328) & 1) != 0 )
{
sub_10001AD30(&v5, *(const void **)(v1 + 344), *(_QWORD *)(v1 + 336));
}
else
{
v2 = v1 + 328;
__p = *(void **)(v2 + 16);
v5 = *(_OWORD *)v2;
}
v3 = sub_100490E80(&v5);
if ( (v5 & 1) != 0 )
operator delete(__p);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 1312LL))(v3);
}