//
// AccountLayer::onSync from 0x4662f8 to 0x4663ba (194 bytes)
//
// 0 xrefs:
//
// 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::onSync(AccountLayer *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // r0
const char *TimeLeft; // r0
cocos2d::CCString *v5; // r0
char *CString; // r0
FLAlertLayer *v7; // r5
_BYTE v8[4]; // [sp+10h] [bp+4h] BYREF
v3 = GameLevelManager::sharedState();
TimeLeft = (const char *)GameLevelManager::getTimeLeft(v3, "sync_account", 30.0);
if ( (unsigned int)(TimeLeft - 1) > 0x1D )
{
sub_776584(
(int)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(
(int)&a1->FLAlertLayerProtocol,
(int)"Load Data",
(int)v8,
(int)"Cancel",
(int)"Load",
300.0);
sub_774008(v8);
v7->setTag(v7, 2);
}
else
{
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Please wait %i seconds before attempting to sync your account again.",
TimeLeft);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_776584((int)v8, CString);
v7 = FLAlertLayer::create(0, (int)"Too fast", (int)v8, (int)"OK", 0, 300.0);
sub_774008(v8);
}
v7->show(v7);
}