{"type": "func", "start": 4296433560, "end": 4296433840, "name": "AccountLayer::onSync", "pseudocode": "// \n// AccountLayer::onSync from 0x100165f98 to 0x1001660b0 (280 bytes)\n// \n// 1 xrefs:\n// > AccountLayer::customSetup @ 0x100165948\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall AccountLayer::onSync(AccountLayer *a1, cocos2d::CCObject *a2)\n{\n  GameLevelManager *v3; // x0\n  int TimeLeft; // w0\n  cocos2d::CCString *v5; // x0\n  char *CString; // x0\n  __int64 v7; // x19\n  void *v8[2]; // [xsp+10h] [xbp-40h] BYREF\n  char v9; // [xsp+27h] [xbp-29h]\n  void *__p[2]; // [xsp+28h] [xbp-28h] BYREF\n  char v11; // [xsp+3Fh] [xbp-11h]\n\n  v3 = GameLevelManager::sharedState();\n  TimeLeft = GameLevelManager::getTimeLeft(v3, \"sync_account\", 30.0);\n  if ( (unsigned int)(TimeLeft - 1) > 0x1D )\n  {\n    sub_100009900(\n      v8,\n      \"Do you want to <cg>download</c> your account data from the <cl>cloud</c>?\\n\"\n      \"<cy>This will merge current data with the saved data.</c>\");\n    v7 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, \"Load Data\", v8, \"Cancel\", \"Load\", 300.0);\n    if ( v9 < 0 )\n      operator delete(v8[0]);\n    (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 2);\n  }\n  else\n  {\n    v5 = (cocos2d::CCString *)sub_100268F4C(\n                                \"Please wait %i seconds before attempting to sync your account again.\",\n                                TimeLeft);\n    CString = (char *)cocos2d::CCString::getCString(v5);\n    sub_100009900(__p, CString);\n    v7 = FLAlertLayer::create_1(0, \"Too fast\", __p, \"OK\", 0, 300.0);\n    if ( v11 < 0 )\n      operator delete(__p[0]);\n  }\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1288LL))(v7);\n}", "assembly": "; \n; AccountLayer::onSync from 0x100165f98 to 0x1001660b0 (280 bytes)\n; \n; 1 xrefs:\n; > AccountLayer::customSetup @ 0x100165948\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x60                                          ; +0x0, 0x100165f98\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0x4, 0x100165f9c\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x8, 0x100165fa0\nADD             X29, SP, #0x50                                         ; +0xc, 0x100165fa4\nMOV             X19, X0                                                ; +0x10, 0x100165fa8\nBL              GameLevelManager__sharedState                          ; +0x14, 0x100165fac\nADRL            X1, aSyncAccount; \"sync_account\"                       ; +0x18, 0x100165fb0\nFMOV            S0, #30.0                                              ; +0x20, 0x100165fb8\nBL              GameLevelManager__getTimeLeft                          ; +0x24, 0x100165fbc\nSUB             W8, W0, #1                                             ; +0x28, 0x100165fc0\nCMP             W8, #0x1D                                              ; +0x2c, 0x100165fc4\nB.HI            loc_10016602C                                          ; +0x30, 0x100165fc8\nSTR             X0, [SP,#0x50+var_50]                                  ; +0x34, 0x100165fcc\nADRL            X0, aPleaseWaitISec_0; \"Please wait %i seconds before attemptin\"... ; +0x38, 0x100165fd0\nBL              sub_100268F4C                                          ; +0x40, 0x100165fd8\nBL              cocos2d__CCString__getCString                          ; +0x44, 0x100165fdc\nMOV             X1, X0; __s                                            ; +0x48, 0x100165fe0\nADD             X0, SP, #0x50+__p; int                                 ; +0x4c, 0x100165fe4\nBL              sub_100009900                                          ; +0x50, 0x100165fe8\nADRL            X1, aTooFast_0; \"Too fast\"                             ; +0x54, 0x100165fec\nADRL            X3, aOk; \"OK\"                                          ; +0x5c, 0x100165ff4\nMOV             W8, #0x43960000                                        ; +0x64, 0x100165ffc\nFMOV            S0, W8                                                 ; +0x68, 0x100166000\nADD             X2, SP, #0x50+__p                                      ; +0x6c, 0x100166004\nMOV             X0, #0                                                 ; +0x70, 0x100166008\nMOV             X4, #0                                                 ; +0x74, 0x10016600c\nBL              FLAlertLayer__create_1                                 ; +0x78, 0x100166010\nMOV             X19, X0                                                ; +0x7c, 0x100166014\nLDRSB           W8, [SP,#0x50+var_11]                                  ; +0x80, 0x100166018\nTBZ             W8, #0x1F, loc_100166090                               ; +0x84, 0x10016601c\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x88, 0x100166020\nBL              __ZdlPv; operator delete(void *)                       ; +0x8c, 0x100166024\nB               loc_100166090                                          ; +0x90, 0x100166028\nADRL            X1, aDoYouWantToCgD; \"Do you want to <cg>download</c> your ac\"... ; +0x94, 0x10016602c\nADD             X0, SP, #0x50+var_40; int                              ; +0x9c, 0x100166034\nBL              sub_100009900                                          ; +0xa0, 0x100166038\nADRL            X1, aLoadData; \"Load Data\"                             ; +0xa4, 0x10016603c\nADRL            X3, aCancel; \"Cancel\"                                  ; +0xac, 0x100166044\nADRL            X4, aLoad; \"Load\"                                      ; +0xb4, 0x10016604c\nMOV             W8, #0x43960000                                        ; +0xbc, 0x100166054\nFMOV            S0, W8                                                 ; +0xc0, 0x100166058\nADD             X0, X19, #0x278                                        ; +0xc4, 0x10016605c\nADD             X2, SP, #0x50+var_40                                   ; +0xc8, 0x100166060\nBL              FLAlertLayer__create_1                                 ; +0xcc, 0x100166064\nMOV             X19, X0                                                ; +0xd0, 0x100166068\nLDRSB           W8, [SP,#0x50+var_29]                                  ; +0xd4, 0x10016606c\nTBZ             W8, #0x1F, loc_10016607C                               ; +0xd8, 0x100166070\nLDR             X0, [SP,#0x50+var_40]; __p                             ; +0xdc, 0x100166074\nBL              __ZdlPv; operator delete(void *)                       ; +0xe0, 0x100166078\nLDR             X8, [X19]                                              ; +0xe4, 0x10016607c\nLDR             X8, [X8,#0x48]                                         ; +0xe8, 0x100166080\nMOV             X0, X19                                                ; +0xec, 0x100166084\nMOV             W1, #2                                                 ; +0xf0, 0x100166088\nBLR             X8                                                     ; +0xf4, 0x10016608c\nLDR             X8, [X19]                                              ; +0xf8, 0x100166090\nLDR             X8, [X8,#0x508]                                        ; +0xfc, 0x100166094\nMOV             X0, X19                                                ; +0x100, 0x100166098\nBLR             X8                                                     ; +0x104, 0x10016609c\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x108, 0x1001660a0\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x10c, 0x1001660a4\nADD             SP, SP, #0x60 ; '`'                                    ; +0x110, 0x1001660a8\nRET                                                                    ; +0x114, 0x1001660ac", "xrefs": ["AccountLayer::customSetup @ 0x100165948"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}