{"type": "func", "start": 12923316, "end": 12924032, "name": "AutoBackupPopup::onRestore", "pseudocode": "// \n// AutoBackupPopup::onRestore from 0xc531b4 to 0xc53480 (716 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0xc7d20\n// > AutoBackupPopup::buildRows @ 0xc57f84\n// > <???> @ 0x1545d78\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:05:10 +0000\n// \n\n__int64 __fastcall AutoBackupPopup::onRestore(AutoBackupPopup *this, cocos2d::CCObject *a2)\n{\n  int v3; // w0\n  __int64 v4; // x1\n  LocalLevelManager *v5; // x0\n  cocos2d::CCArray **v6; // x0\n  cocos2d::CCNotificationCenter *v7; // x0\n  int v8; // w22\n  cocos2d::CCNotificationCenter *v9; // x23\n  cocos2d::CCObject *v10; // x21\n  char *v11; // x20\n  char *v12; // x0\n  __int64 v14; // x0\n  char *v15; // x20\n  void *v16; // [xsp+48h] [xbp+48h] BYREF\n  char *v17; // [xsp+50h] [xbp+50h]\n  char *v18; // [xsp+58h] [xbp+58h]\n  __int64 v19[2]; // [xsp+60h] [xbp+60h] BYREF\n  void *v20; // [xsp+70h] [xbp+70h]\n\n  v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( (v3 & 0x80000000) == 0 )\n  {\n    v4 = *((_QWORD *)this + 106);\n    if ( v3 < (int)((*((_QWORD *)this + 107) - v4) >> 7) )\n    {\n      std::operator+<char>((__int64)this + 800, v4 + ((__int64)v3 << 7), (unsigned __int64 *)v19);\n      v16 = (void *)operator new(0x18u);\n      v18 = (char *)v16 + 24;\n      std::string::basic_string((unsigned __int64)v16, v19);\n      v5 = (LocalLevelManager *)((char *)v16 + 24);\n      v17 = (char *)v16 + 24;\n      if ( (v19[0] & 1) != 0 )\n        operator delete(v20);\n      v6 = (cocos2d::CCArray **)LocalLevelManager::sharedState(v5);\n      v7 = (cocos2d::CCNotificationCenter *)LocalLevelManager::importLevelsFromPaths(\n                                              v6,\n                                              (unsigned __int8 **)&v16,\n                                              *((_DWORD *)this + 198));\n      v8 = (int)v7;\n      if ( (int)v7 <= 0 )\n      {\n        v19[0] = 0;\n        v19[1] = 0;\n        v20 = nullptr;\n        std::string::__init(v19, \"Could not read this backup.\", 0x1Bu);\n        v14 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)\"Error\", (char *)v19, (ButtonSprite *)\"OK\", nullptr);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1312LL))(v14);\n        if ( (v19[0] & 1) != 0 )\n          operator delete(v20);\n        v15 = (char *)v16;\n        if ( v16 )\n        {\n          v12 = v17;\n          if ( v16 != v17 )\n          {\n            do\n            {\n              v17 = v12 - 24;\n              std::string::~string((__int64)(v12 - 24));\n              v12 = v17;\n            }\n            while ( v15 != v17 );\n            v12 = (char *)v16;\n          }\n          goto LABEL_10;\n        }\n      }\n      else\n      {\n        v9 = (cocos2d::CCNotificationCenter *)cocos2d::CCNotificationCenter::sharedNotificationCenter(v7);\n        v10 = (cocos2d::CCObject *)operator new(0x40u);\n        cocos2d::CCObject::CCObject(v10);\n        *((_DWORD *)v10 + 14) = v8;\n        *(_QWORD *)v10 = &off_1428350;\n        cocos2d::CCObject::autorelease(v10);\n        cocos2d::CCNotificationCenter::postNotification(v9, \"LevelsImportedNotification\", v10);\n        (*(void (__fastcall **)(AutoBackupPopup *, _QWORD))(*(_QWORD *)this + 1360LL))(this, 0);\n        v11 = (char *)v16;\n        if ( v16 )\n        {\n          v12 = v17;\n          if ( v16 != v17 )\n          {\n            do\n            {\n              v17 = v12 - 24;\n              std::string::~string((__int64)(v12 - 24));\n              v12 = v17;\n            }\n            while ( v11 != v17 );\n            v12 = (char *)v16;\n          }\nLABEL_10:\n          operator delete(v12);\n        }\n      }\n    }\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; AutoBackupPopup::onRestore from 0xc531b4 to 0xc53480 (716 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0xc7d20\n; > AutoBackupPopup::buildRows @ 0xc57f84\n; > <???> @ 0x1545d78\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:05:10 +0000\n; \nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0xc531b4\nMOV             X29, SP                                                ; +0x4, 0xc531b8\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x8, 0xc531bc\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0xc531c0\nSTR             X23, [SP,#0x80+var_50]                                 ; +0x10, 0xc531c4\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x14, 0xc531c8\nMOV             X20, X0                                                ; +0x18, 0xc531cc\nMOV             X0, X1                                                 ; +0x1c, 0xc531d0\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0xc531d4\nLDR             X1, [X1]                                               ; +0x24, 0xc531d8\nLDR             X2, [X2]                                               ; +0x28, 0xc531dc\nLDR             X1, [X1,#0x40]                                         ; +0x2c, 0xc531e0\nSTR             X2, [X29,#0x80+var_8]                                  ; +0x30, 0xc531e4\nBLR             X1                                                     ; +0x34, 0xc531e8\nTBNZ            W0, #0x1F, loc_C5330C                                  ; +0x38, 0xc531ec\nLDR             X1, [X20,#0x350]                                       ; +0x3c, 0xc531f0\nLDR             X2, [X20,#0x358]                                       ; +0x40, 0xc531f4\nSUB             X2, X2, X1                                             ; +0x44, 0xc531f8\nASR             X2, X2, #7                                             ; +0x48, 0xc531fc\nCMP             W0, W2                                                 ; +0x4c, 0xc53200\nB.GE            loc_C5330C                                             ; +0x50, 0xc53204\nSBFIZ           X3, X0, #7, #0x20 ; ' '                                ; +0x54, 0xc53208\nADD             X21, X29, #0x80+var_20                                 ; +0x58, 0xc5320c\nADD             X0, X20, #0x320                                        ; +0x5c, 0xc53210\nMOV             X8, X21                                                ; +0x60, 0xc53214\nADD             X1, X1, X3                                             ; +0x64, 0xc53218\nBL              _ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_SB_; std::operator+<char>(std::string const&,std::string const&) ; +0x68, 0xc5321c\nSTR             XZR, [X29,#0x80+var_38]                                ; +0x6c, 0xc53220\nMOV             X0, #0x18; unsigned __int64                            ; +0x70, 0xc53224\nSTR             XZR, [X29,#0x80+var_30]                                ; +0x74, 0xc53228\nSTR             XZR, [X29,#0x80+var_28]                                ; +0x78, 0xc5322c\nBL              _Znwm; operator new(ulong)                             ; +0x7c, 0xc53230\nADD             X3, X0, #0x18                                          ; +0x80, 0xc53234\nMOV             X1, X21                                                ; +0x84, 0xc53238\nSTR             X0, [X29,#0x80+var_30]                                 ; +0x88, 0xc5323c\nSTR             X0, [X29,#0x80+var_38]                                 ; +0x8c, 0xc53240\nSTR             X3, [X29,#0x80+var_28]                                 ; +0x90, 0xc53244\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x94, 0xc53248\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x98, 0xc5324c\nLDRB            W1, [X29,#0x80+var_20]                                 ; +0x9c, 0xc53250\nADD             X0, X0, #0x18; this                                    ; +0xa0, 0xc53254\nSTR             X0, [X29,#0x80+var_30]                                 ; +0xa4, 0xc53258\nTBNZ            W1, #0, loc_C53334                                     ; +0xa8, 0xc5325c\nBL              _ZN17LocalLevelManager11sharedStateEv; LocalLevelManager::sharedState(void) ; +0xac, 0xc53260\nLDR             W2, [X20,#0x318]                                       ; +0xb0, 0xc53264\nADD             X1, X29, #0x80+var_38                                  ; +0xb4, 0xc53268\nBL              _ZN17LocalLevelManager21importLevelsFromPathsERKNSt6__ndk16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEEi; LocalLevelManager::importLevelsFromPaths(std::vector<std::string> const&,int) ; +0xb8, 0xc5326c\nCMP             W0, WZR                                                ; +0xbc, 0xc53270\nMOV             W22, W0                                                ; +0xc0, 0xc53274\nB.LE            loc_C53340                                             ; +0xc4, 0xc53278\nBL              _ZN7cocos2d20CCNotificationCenter24sharedNotificationCenterEv; cocos2d::CCNotificationCenter::sharedNotificationCenter(void) ; +0xc8, 0xc5327c\nMOV             X23, X0                                                ; +0xcc, 0xc53280\nMOV             X0, #0x40 ; '@'; unsigned __int64                      ; +0xd0, 0xc53284\nBL              _Znwm; operator new(ulong)                             ; +0xd4, 0xc53288\nMOV             X21, X0                                                ; +0xd8, 0xc5328c\nBL              _ZN7cocos2d8CCObjectC1Ev; cocos2d::CCObject::CCObject(void) ; +0xdc, 0xc53290\nADRP            X1, #_ZTVN7cocos2d9CCIntegerE_ptr@PAGE                 ; +0xe0, 0xc53294\nMOV             X0, X21; this                                          ; +0xe4, 0xc53298\nLDR             X1, [X1,#_ZTVN7cocos2d9CCIntegerE_ptr@PAGEOFF]; `vtable for'cocos2d::CCInteger ... ; +0xe8, 0xc5329c\nSTR             W22, [X21,#0x38]                                       ; +0xec, 0xc532a0\nADD             X1, X1, #0x10                                          ; +0xf0, 0xc532a4\nSTR             X1, [X21]                                              ; +0xf4, 0xc532a8\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0xf8, 0xc532ac\nADRP            X1, #aLevelsimported@PAGE; \"LevelsImportedNotification\" ; +0xfc, 0xc532b0\nMOV             X0, X23; this                                          ; +0x100, 0xc532b4\nADD             X1, X1, #aLevelsimported@PAGEOFF; \"LevelsImportedNotification\" ; +0x104, 0xc532b8\nMOV             X2, X21; cocos2d::CCObject *                           ; +0x108, 0xc532bc\nBL              _ZN7cocos2d20CCNotificationCenter16postNotificationEPKcPNS_8CCObjectE; cocos2d::CCNotificationCenter::postNotification(char const*,cocos2d::CCObject *) ; +0x10c, 0xc532c0\nLDR             X2, [X20]                                              ; +0x110, 0xc532c4\nMOV             X0, X20                                                ; +0x114, 0xc532c8\nMOV             X1, #0                                                 ; +0x118, 0xc532cc\nLDR             X2, [X2,#0x550]                                        ; +0x11c, 0xc532d0\nBLR             X2                                                     ; +0x120, 0xc532d4\nLDR             X20, [X29,#0x80+var_38]                                ; +0x124, 0xc532d8\nCBZ             X20, loc_C5330C                                        ; +0x128, 0xc532dc\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x12c, 0xc532e0\nCMP             X20, X0                                                ; +0x130, 0xc532e4\nB.EQ            loc_C53308                                             ; +0x134, 0xc532e8\nSUB             X0, X0, #0x18                                          ; +0x138, 0xc532ec\nSTR             X0, [X29,#0x80+var_30]                                 ; +0x13c, 0xc532f0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x140, 0xc532f4\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x144, 0xc532f8\nCMP             X20, X0                                                ; +0x148, 0xc532fc\nB.NE            loc_C532EC                                             ; +0x14c, 0xc53300\nLDR             X0, [X29,#0x80+var_38]; void *                         ; +0x150, 0xc53304\nBL              _ZdlPv; operator delete(void *)                        ; +0x154, 0xc53308\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x158, 0xc5330c\nLDR             X1, [X29,#0x80+var_8]                                  ; +0x15c, 0xc53310\nLDR             X0, [X19]                                              ; +0x160, 0xc53314\nCMP             X1, X0                                                 ; +0x164, 0xc53318\nB.NE            loc_C533D4                                             ; +0x168, 0xc5331c\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x16c, 0xc53320\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x170, 0xc53324\nLDR             X23, [SP,#0x80+var_50]                                 ; +0x174, 0xc53328\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x178, 0xc5332c\nRET                                                                    ; +0x17c, 0xc53330\nLDR             X0, [X29,#0x80+var_10]; void *                         ; +0x180, 0xc53334\nBL              _ZdlPv; operator delete(void *)                        ; +0x184, 0xc53338\nB               loc_C53260                                             ; +0x188, 0xc5333c\nADRP            X1, #aCouldNotReadTh@PAGE; \"Could not read this backup.\" ; +0x18c, 0xc53340\nMOV             X0, X21                                                ; +0x190, 0xc53344\nADD             X1, X1, #aCouldNotReadTh@PAGEOFF; \"Could not read this backup.\" ; +0x194, 0xc53348\nMOV             X2, #0x1B                                              ; +0x198, 0xc5334c\nSTR             XZR, [X29,#0x80+var_20]                                ; +0x19c, 0xc53350\nSTR             XZR, [X29,#0x80+var_18]                                ; +0x1a0, 0xc53354\nSTR             XZR, [X29,#0x80+var_10]                                ; +0x1a4, 0xc53358\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0x1a8, 0xc5335c\nADRP            X1, #(aInternalServer+0x10)@PAGE; \"Error\"              ; +0x1ac, 0xc53360\nADRP            X3, #aOk@PAGE; \"OK\"                                    ; +0x1b0, 0xc53364\nMOV             X0, #0                                                 ; +0x1b4, 0xc53368\nADD             X1, X1, #(aInternalServer+0x10)@PAGEOFF; \"Error\"       ; +0x1b8, 0xc5336c\nMOV             X2, X21                                                ; +0x1bc, 0xc53370\nADD             X3, X3, #aOk@PAGEOFF; \"OK\"                             ; +0x1c0, 0xc53374\nMOV             X4, #0                                                 ; +0x1c4, 0xc53378\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*) ; +0x1c8, 0xc5337c\nLDR             X1, [X0]                                               ; +0x1cc, 0xc53380\nLDR             X1, [X1,#0x520]                                        ; +0x1d0, 0xc53384\nBLR             X1                                                     ; +0x1d4, 0xc53388\nLDRB            W0, [X29,#0x80+var_20]                                 ; +0x1d8, 0xc5338c\nTBNZ            W0, #0, loc_C533C8                                     ; +0x1dc, 0xc53390\nLDR             X20, [X29,#0x80+var_38]                                ; +0x1e0, 0xc53394\nCBZ             X20, loc_C5330C                                        ; +0x1e4, 0xc53398\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x1e8, 0xc5339c\nCMP             X20, X0                                                ; +0x1ec, 0xc533a0\nB.EQ            loc_C53308                                             ; +0x1f0, 0xc533a4\nSUB             X0, X0, #0x18                                          ; +0x1f4, 0xc533a8\nSTR             X0, [X29,#0x80+var_30]                                 ; +0x1f8, 0xc533ac\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x1fc, 0xc533b0\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x200, 0xc533b4\nCMP             X20, X0                                                ; +0x204, 0xc533b8\nB.NE            loc_C533A8                                             ; +0x208, 0xc533bc\nLDR             X0, [X29,#0x80+var_38]                                 ; +0x20c, 0xc533c0\nB               loc_C53308                                             ; +0x210, 0xc533c4\nLDR             X0, [X29,#0x80+var_10]; void *                         ; +0x214, 0xc533c8\nBL              _ZdlPv; operator delete(void *)                        ; +0x218, 0xc533cc\nB               loc_C53394                                             ; +0x21c, 0xc533d0\nBL              .__stack_chk_fail                                      ; +0x220, 0xc533d4\nLDRB            W1, [X29,#0x80+var_20]                                 ; +0x224, 0xc533d8\nMOV             X19, X0                                                ; +0x228, 0xc533dc\nTBZ             W1, #0, loc_C533EC                                     ; +0x22c, 0xc533e0\nLDR             X0, [X29,#0x80+var_10]; void *                         ; +0x230, 0xc533e4\nBL              _ZdlPv; operator delete(void *)                        ; +0x234, 0xc533e8\nLDR             X20, [X29,#0x80+var_38]                                ; +0x238, 0xc533ec\nCBZ             X20, loc_C53440                                        ; +0x23c, 0xc533f0\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x240, 0xc533f4\nCMP             X20, X0                                                ; +0x244, 0xc533f8\nB.EQ            loc_C53438                                             ; +0x248, 0xc533fc\nSUB             X0, X0, #0x18                                          ; +0x24c, 0xc53400\nSTR             X0, [X29,#0x80+var_30]                                 ; +0x250, 0xc53404\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x254, 0xc53408\nB               loc_C533F4                                             ; +0x258, 0xc5340c\nLDR             X19, [X29,#0x80+var_38]                                ; +0x25c, 0xc53410\nMOV             X20, X0                                                ; +0x260, 0xc53414\nCBZ             X19, loc_C53468                                        ; +0x264, 0xc53418\nLDR             X0, [X29,#0x80+var_30]                                 ; +0x268, 0xc5341c\nCMP             X19, X0                                                ; +0x26c, 0xc53420\nB.EQ            loc_C53460                                             ; +0x270, 0xc53424\nSUB             X0, X0, #0x18                                          ; +0x274, 0xc53428\nSTR             X0, [X29,#0x80+var_30]                                 ; +0x278, 0xc5342c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x27c, 0xc53430\nB               loc_C5341C                                             ; +0x280, 0xc53434\nLDR             X0, [X29,#0x80+var_38]; void *                         ; +0x284, 0xc53438\nBL              _ZdlPv; operator delete(void *)                        ; +0x288, 0xc5343c\nMOV             X0, X19                                                ; +0x28c, 0xc53440\nBL              _Unwind_Resume                                         ; +0x290, 0xc53444\nMOV             X19, X0                                                ; +0x294, 0xc53448\nB               loc_C533EC                                             ; +0x298, 0xc5344c\nMOV             X19, X0                                                ; +0x29c, 0xc53450\nMOV             X0, X21; void *                                        ; +0x2a0, 0xc53454\nBL              _ZdlPv; operator delete(void *)                        ; +0x2a4, 0xc53458\nB               loc_C533EC                                             ; +0x2a8, 0xc5345c\nLDR             X0, [X29,#0x80+var_38]; void *                         ; +0x2ac, 0xc53460\nBL              _ZdlPv; operator delete(void *)                        ; +0x2b0, 0xc53464\nLDRB            W0, [X29,#0x80+var_20]                                 ; +0x2b4, 0xc53468\nTBZ             W0, #0, loc_C53478                                     ; +0x2b8, 0xc5346c\nLDR             X0, [X29,#0x80+var_10]; void *                         ; +0x2bc, 0xc53470\nBL              _ZdlPv; operator delete(void *)                        ; +0x2c0, 0xc53474\nMOV             X0, X20                                                ; +0x2c4, 0xc53478\nBL              _Unwind_Resume                                         ; +0x2c8, 0xc5347c", "xrefs": ["<???> @ 0xc7d20", "AutoBackupPopup::buildRows @ 0xc57f84", "<???> @ 0x1545d78"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}