{"type": "func", "start": 7588944, "end": 7589258, "name": "AutoBackupPopup::onRestore", "pseudocode": "// \n// AutoBackupPopup::onRestore from 0x73cc50 to 0x73cd8a (314 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:58:31 +0000\n// \n\nint __fastcall AutoBackupPopup::onRestore(AutoBackupPopup *this, cocos2d::CCObject *a2)\n{\n  int result; // r0\n  int v4; // r2\n  LocalLevelManager *v5; // r0\n  cocos2d::CCArray **v6; // r0\n  cocos2d::CCNotificationCenter *v7; // r0\n  cocos2d::CCNotificationCenter *v8; // r8\n  int *v9; // r0\n  cocos2d::CCNotificationCenter *v10; // r9\n  cocos2d::CCObject *v11; // r4\n  int *v12; // [sp+Ch] [bp-20h] BYREF\n  int *v13; // [sp+10h] [bp-1Ch]\n  int *v14; // [sp+14h] [bp-18h]\n  int v15[3]; // [sp+18h] [bp-14h] BYREF\n\n  result = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n  if ( result >= 0 )\n  {\n    v4 = *((_DWORD *)this + 158);\n    if ( result < (*((_DWORD *)this + 159) - v4) >> 6 )\n    {\n      std::operator+<char>(v15, (unsigned __int8 *)this + 608, (unsigned __int8 *)(v4 + (result << 6)));\n      v13 = (int *)operator new(0xCu);\n      v12 = v13;\n      v14 = v13 + 3;\n      std::string::basic_string(v13, (int)v15);\n      v13 += 3;\n      v5 = (LocalLevelManager *)std::string::~string((int)v15);\n      v6 = (cocos2d::CCArray **)LocalLevelManager::sharedState(v5);\n      v7 = (cocos2d::CCNotificationCenter *)LocalLevelManager::importLevelsFromPaths(v6, &v12, *((_DWORD *)this + 151));\n      v8 = v7;\n      if ( (int)v7 > 0 )\n      {\n        v10 = (cocos2d::CCNotificationCenter *)cocos2d::CCNotificationCenter::sharedNotificationCenter(v7);\n        v11 = (cocos2d::CCObject *)operator new(0x38u);\n        cocos2d::CCObject::CCObject(v11);\n        *((_DWORD *)v11 + 13) = v8;\n        *(_DWORD *)v11 = &off_C8DBE0;\n        cocos2d::CCObject::autorelease(v11);\n        cocos2d::CCNotificationCenter::postNotification(v10, \"LevelsImportedNotification\", v11);\n        (*(void (__fastcall **)(AutoBackupPopup *, _DWORD))(*(_DWORD *)this + 680))(this, 0);\n      }\n      else\n      {\n        memset(v15, 0, sizeof(v15));\n        std::string::__init(v15, \"Could not read this backup.\", 0x1Bu);\n        v9 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)\"Error\", (int)v15, (ButtonSprite *)\"OK\", nullptr);\n        (*(void (__fastcall **)(int *))(*v9 + 656))(v9);\n        std::string::~string((int)v15);\n      }\n      return std::__vector_base<std::string>::~__vector_base((int)&v12);\n    }\n  }\n  return result;\n}", "assembly": "; \n; AutoBackupPopup::onRestore from 0x73cc50 to 0x73cd8a (314 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:58:31 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x73cc50\nSUB             SP, SP, #0x2C                                          ; +0x4, 0x73cc54\nLDR             R5, =(__stack_chk_guard_ptr - 0x73CC60)                ; +0x6, 0x73cc56\nMOV             R6, R0                                                 ; +0x8, 0x73cc58\nMOV             R0, R1                                                 ; +0xa, 0x73cc5a\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xc, 0x73cc5c\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xe, 0x73cc5e\nLDR             R3, [R5]                                               ; +0x10, 0x73cc60\nSTR             R3, [SP,#0x2C+var_8]                                   ; +0x12, 0x73cc62\nLDR             R3, [R1]                                               ; +0x14, 0x73cc64\nLDR             R3, [R3,#0x20]                                         ; +0x16, 0x73cc66\nBLX             R3                                                     ; +0x18, 0x73cc68\nSUBS            R7, R0, #0                                             ; +0x1a, 0x73cc6a\nBLT.W           loc_73CD78                                             ; +0x1c, 0x73cc6c\nLDR.W           R2, [R6,#0x278]                                        ; +0x20, 0x73cc70\nLDR.W           R3, [R6,#0x27C]                                        ; +0x24, 0x73cc74\nSUBS            R3, R3, R2                                             ; +0x28, 0x73cc78\nCMP.W           R7, R3,ASR#6                                           ; +0x2a, 0x73cc7a\nBGE             loc_73CD78                                             ; +0x2e, 0x73cc7e\nADD             R4, SP, #0x2C+var_14                                   ; +0x30, 0x73cc80\nADD.W           R2, R2, R7,LSL#6                                       ; +0x32, 0x73cc82\nADD.W           R1, R6, #0x260                                         ; +0x36, 0x73cc86\nADD             R7, SP, #0x2C+var_20                                   ; +0x3a, 0x73cc8a\nMOV             R0, R4                                                 ; +0x3c, 0x73cc8c\nBL              _ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_SB_; std::operator+<char>(std::string const&,std::string const&) ; +0x3e, 0x73cc8e\nMOVS            R0, #0xC; unsigned int                                 ; +0x42, 0x73cc92\nMOVS            R3, #0                                                 ; +0x44, 0x73cc94\nSTR             R3, [SP,#0x2C+var_20]                                  ; +0x46, 0x73cc96\nSTR             R3, [SP,#0x2C+var_1C]                                  ; +0x48, 0x73cc98\nSTR             R3, [SP,#0x2C+var_18]                                  ; +0x4a, 0x73cc9a\nBL              _Znwj; operator new(uint)                              ; +0x4c, 0x73cc9c\nB               loc_73CCC0                                             ; +0x50, 0x73cca0\nMOV             R0, R7                                                 ; +0x52, 0x73cca2\nBL              _ZNSt6__ndk113__vector_baseINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEED2Ev; std::__vector_base<std::string>::~__vector_base() ; +0x54, 0x73cca4\nMOV             R0, R4                                                 ; +0x58, 0x73cca8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x5a, 0x73ccaa\nB               loc_73CCBC                                             ; +0x5e, 0x73ccae\nMOV             R0, R4; void *                                         ; +0x60, 0x73ccb0\nBL              _ZdlPv; operator delete(void *)                        ; +0x62, 0x73ccb2\nMOV             R0, R7                                                 ; +0x66, 0x73ccb6\nBL              _ZNSt6__ndk113__vector_baseINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEED2Ev; std::__vector_base<std::string>::~__vector_base() ; +0x68, 0x73ccb8\nBL              __cxa_end_cleanup                                      ; +0x6c, 0x73ccbc\nMOV             R1, R4                                                 ; +0x70, 0x73ccc0\nMOV             R3, R0                                                 ; +0x72, 0x73ccc2\nSTR             R0, [SP,#0x2C+var_1C]                                  ; +0x74, 0x73ccc4\nADDS            R3, #0xC                                               ; +0x76, 0x73ccc6\nSTR             R0, [SP,#0x2C+var_20]                                  ; +0x78, 0x73ccc8\nSTR             R3, [SP,#0x2C+var_18]                                  ; +0x7a, 0x73ccca\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x7c, 0x73cccc\nLDR             R3, [SP,#0x2C+var_1C]                                  ; +0x80, 0x73ccd0\nMOV             R0, R4                                                 ; +0x82, 0x73ccd2\nADDS            R3, #0xC                                               ; +0x84, 0x73ccd4\nSTR             R3, [SP,#0x2C+var_1C]                                  ; +0x86, 0x73ccd6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x88, 0x73ccd8\nBL              _ZN17LocalLevelManager11sharedStateEv; LocalLevelManager::sharedState(void) ; +0x8c, 0x73ccdc\nMOV             R1, R7                                                 ; +0x90, 0x73cce0\nLDR.W           R2, [R6,#0x25C]                                        ; +0x92, 0x73cce2\nBL              _ZN17LocalLevelManager21importLevelsFromPathsERKNSt6__ndk16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEEi; LocalLevelManager::importLevelsFromPaths(std::vector<std::string> const&,int) ; +0x96, 0x73cce6\nSUBS.W          R8, R0, #0                                             ; +0x9a, 0x73ccea\nBGT             loc_73CD28                                             ; +0x9e, 0x73ccee\nLDR             R1, =(aCouldNotReadTh - 0x73CCFC); \"Could not read this backup.\" ; +0xa0, 0x73ccf0\nMOVS            R3, #0                                                 ; +0xa2, 0x73ccf2\nMOV             R0, R4                                                 ; +0xa4, 0x73ccf4\nMOVS            R2, #0x1B                                              ; +0xa6, 0x73ccf6\nADD             R1, PC; \"Could not read this backup.\"                  ; +0xa8, 0x73ccf8\nSTR             R3, [SP,#0x2C+var_14]                                  ; +0xaa, 0x73ccfa\nSTR             R3, [SP,#0x2C+var_10]                                  ; +0xac, 0x73ccfc\nMOV             R6, R3                                                 ; +0xae, 0x73ccfe\nSTR             R3, [SP,#0x2C+var_C]                                   ; +0xb0, 0x73cd00\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xb2, 0x73cd02\nLDR             R1, =(aError - 0x73CD14); \"Error\"                      ; +0xb6, 0x73cd06\nMOV             R0, R6                                                 ; +0xb8, 0x73cd08\nLDR             R3, =(aOk - 0x73CD16); \"OK\"                            ; +0xba, 0x73cd0a\nMOV             R2, R4                                                 ; +0xbc, 0x73cd0c\nSTR             R6, [SP,#0x2C+var_2C]                                  ; +0xbe, 0x73cd0e\nADD             R1, PC; \"Error\"                                        ; +0xc0, 0x73cd10\nADD             R3, PC; \"OK\"                                           ; +0xc2, 0x73cd12\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*) ; +0xc4, 0x73cd14\nLDR             R3, [R0]                                               ; +0xc8, 0x73cd18\nLDR.W           R3, [R3,#0x290]                                        ; +0xca, 0x73cd1a\nBLX             R3                                                     ; +0xce, 0x73cd1e\nMOV             R0, R4                                                 ; +0xd0, 0x73cd20\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xd2, 0x73cd22\nB               loc_73CD66                                             ; +0xd6, 0x73cd26\nBL              _ZN7cocos2d20CCNotificationCenter24sharedNotificationCenterEv; cocos2d::CCNotificationCenter::sharedNotificationCenter(void) ; +0xd8, 0x73cd28\nMOV             R9, R0                                                 ; +0xdc, 0x73cd2c\nMOVS            R0, #0x38 ; '8'; unsigned int                          ; +0xde, 0x73cd2e\nBL              _Znwj; operator new(uint)                              ; +0xe0, 0x73cd30\nMOV             R4, R0                                                 ; +0xe4, 0x73cd34\nBL              _ZN7cocos2d8CCObjectC2Ev; cocos2d::CCObject::CCObject(void) ; +0xe6, 0x73cd36\nLDR             R3, =(_ZTVN7cocos2d9CCIntegerE_ptr - 0x73CD46)         ; +0xea, 0x73cd3a\nMOV             R0, R4; this                                           ; +0xec, 0x73cd3c\nSTR.W           R8, [R4,#0x34]                                         ; +0xee, 0x73cd3e\nADD             R3, PC; _ZTVN7cocos2d9CCIntegerE_ptr                   ; +0xf2, 0x73cd42\nLDR             R3, [R3]; `vtable for'cocos2d::CCInteger ...           ; +0xf4, 0x73cd44\nADDS            R3, #8                                                 ; +0xf6, 0x73cd46\nSTR             R3, [R4]                                               ; +0xf8, 0x73cd48\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0xfa, 0x73cd4a\nLDR             R1, =(aLevelsimported - 0x73CD58); \"LevelsImportedNotification\" ; +0xfe, 0x73cd4e\nMOV             R0, R9; this                                           ; +0x100, 0x73cd50\nMOV             R2, R4; cocos2d::CCObject *                            ; +0x102, 0x73cd52\nADD             R1, PC; \"LevelsImportedNotification\"                   ; +0x104, 0x73cd54\nBL              _ZN7cocos2d20CCNotificationCenter16postNotificationEPKcPNS_8CCObjectE; cocos2d::CCNotificationCenter::postNotification(char const*,cocos2d::CCObject *) ; +0x106, 0x73cd56\nLDR             R3, [R6]                                               ; +0x10a, 0x73cd5a\nMOV             R0, R6                                                 ; +0x10c, 0x73cd5c\nMOVS            R1, #0                                                 ; +0x10e, 0x73cd5e\nLDR.W           R3, [R3,#0x2A8]                                        ; +0x110, 0x73cd60\nBLX             R3                                                     ; +0x114, 0x73cd64\nMOV             R0, R7                                                 ; +0x116, 0x73cd66\nBL              _ZNSt6__ndk113__vector_baseINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEED2Ev; std::__vector_base<std::string>::~__vector_base() ; +0x118, 0x73cd68\nB               loc_73CD78                                             ; +0x11c, 0x73cd6c\nMOV             R0, R4                                                 ; +0x11e, 0x73cd6e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x120, 0x73cd70\nB               loc_73CCB6                                             ; +0x124, 0x73cd74\nB               loc_73CCB6                                             ; +0x126, 0x73cd76\nLDR             R2, [SP,#0x2C+var_8]                                   ; +0x128, 0x73cd78\nLDR             R3, [R5]                                               ; +0x12a, 0x73cd7a\nCMP             R2, R3                                                 ; +0x12c, 0x73cd7c\nBEQ             loc_73CD84                                             ; +0x12e, 0x73cd7e\nBLX             __stack_chk_fail                                       ; +0x130, 0x73cd80\nADD             SP, SP, #0x2C ; ','                                    ; +0x134, 0x73cd84\nPOP.W           {R4-R9,PC}                                             ; +0x136, 0x73cd86", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}