//
// AccountLayer::onSync from 0x100165f98 to 0x1001660b0 (280 bytes)
//
// 1 xrefs:
// > AccountLayer::customSetup @ 0x100165948
//
// 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::onSync(AccountLayer *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
int TimeLeft; // w0
cocos2d::CCString *v5; // x0
char *CString; // x0
__int64 v7; // x19
void *v8[2]; // [xsp+10h] [xbp-40h] BYREF
char v9; // [xsp+27h] [xbp-29h]
void *__p[2]; // [xsp+28h] [xbp-28h] BYREF
char v11; // [xsp+3Fh] [xbp-11h]
v3 = GameLevelManager::sharedState();
TimeLeft = GameLevelManager::getTimeLeft(v3, "sync_account", 30.0);
if ( (unsigned int)(TimeLeft - 1) > 0x1D )
{
sub_100009900(
v8,
"Do you want to download your account data from the cloud?\n"
"This will merge current data with the saved data.");
v7 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Load Data", v8, "Cancel", "Load", 300.0);
if ( v9 < 0 )
operator delete(v8[0]);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 2);
}
else
{
v5 = (cocos2d::CCString *)sub_100268F4C(
"Please wait %i seconds before attempting to sync your account again.",
TimeLeft);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_100009900(__p, CString);
v7 = FLAlertLayer::create_1(0, "Too fast", __p, "OK", 0, 300.0);
if ( v11 < 0 )
operator delete(__p[0]);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1288LL))(v7);
}