{"type": "func", "start": 4613096, "end": 4613366, "name": "AccountLayer::onBackup", "pseudocode": "// \n// AccountLayer::onBackup from 0x4663e8 to 0x4664f6 (270 bytes)\n// \n// 0 xrefs:\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 AccountLayer::onBackup(AccountLayer *a1, cocos2d::CCObject *a2)\n{\n  GameStatsManager *v3; // r0\n  cocos2d::CCString *v4; // r0\n  char *v5; // r0\n  FLAlertLayer *v6; // r0\n  GameLevelManager *v7; // r0\n  const char *TimeLeft; // r0\n  cocos2d::CCString *v9; // r0\n  char *CString; // r0\n  FLAlertLayer *v11; // r5\n  _BYTE v12[4]; // [sp+10h] [bp+4h] BYREF\n\n  v3 = GameStatsManager::sharedState();\n  if ( GameStatsManager::getStat(v3, \"6\") > 9 )\n  {\n    v7 = GameLevelManager::sharedState();\n    TimeLeft = (const char *)GameLevelManager::getTimeLeft(v7, \"bak_account\", 30.0);\n    if ( (unsigned int)(TimeLeft - 1) > 0x1D )\n    {\n      sub_776584(\n        (int)v12,\n        \"Do you want to <cg>save</c> your account data on the <cl>cloud</c>?\\n\"\n        \"<cy>This will overwrite previously saved data.</c>\");\n      v11 = FLAlertLayer::create(\n              (int)&a1->FLAlertLayerProtocol,\n              (int)\"Save Data\",\n              (int)v12,\n              (int)\"Cancel\",\n              (int)\"Save\",\n              300.0);\n      sub_774008(v12);\n      ButtonSprite::updateBGImage(v11->m_button1, \"GJ_button_06.png\");\n      v11->setTag(v11, 1);\n      goto LABEL_7;\n    }\n    v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"Please wait %i seconds before attempting to back up your account again.\",\n                                TimeLeft);\n    CString = (char *)cocos2d::CCString::getCString(v9);\n    sub_776584((int)v12, CString);\n    v6 = FLAlertLayer::create(0, (int)\"Too Fast\", (int)v12, (int)\"OK\", 0, 300.0);\n  }\n  else\n  {\n    v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"You need to <cl>collect</c> atleast <cy>%i stars</c> to enable <cg>saving</c>.\",\n                                &byte_9[1]);\n    v5 = (char *)cocos2d::CCString::getCString(v4);\n    sub_776584((int)v12, v5);\n    v6 = FLAlertLayer::create(0, (int)\"Collect more\", (int)v12, (int)\"OK\", 0, 300.0);\n  }\n  v11 = v6;\n  sub_774008(v12);\nLABEL_7:\n  v11->show(v11);\n}", "assembly": "; \n; AccountLayer::onBackup from 0x4663e8 to 0x4664f6 (270 bytes)\n; \n; 0 xrefs:\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\nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x4663e8\nSUB             SP, SP, #0x18                                          ; +0x4, 0x4663ec\nLDR             R6, =(__stack_chk_guard_ptr - 0x4663FA)                ; +0x6, 0x4663ee\nMOV             R8, R0                                                 ; +0x8, 0x4663f0\nADD             R4, SP, #0x18+var_8                                    ; +0xa, 0x4663f2\nADD             R7, SP, #0xC                                           ; +0xc, 0x4663f4\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x4663f6\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x4663f8\nLDR             R5, =0x43960000                                        ; +0x12, 0x4663fa\nLDR             R3, [R6]                                               ; +0x14, 0x4663fc\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x16, 0x4663fe\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x18, 0x466400\nLDR             R1, =(a6 - 0x46640A); \"6\"                              ; +0x1c, 0x466404\nADD             R1, PC; \"6\"                                            ; +0x1e, 0x466406\nBL              _ZN16GameStatsManager7getStatEPKc; GameStatsManager::getStat(char const*) ; +0x20, 0x466408\nCMP             R0, #9                                                 ; +0x24, 0x46640c\nBGT             loc_46643E                                             ; +0x26, 0x46640e\nLDR             R0, =(aYouNeedToClCol - 0x466418); \"You need to <cl>collect</c> atleast <cy\"... ; +0x28, 0x466410\nMOVS            R1, #(byte_9+1); char *                                ; +0x2a, 0x466412\nADD             R0, PC; \"You need to <cl>collect</c> atleast <cy\"...   ; +0x2c, 0x466414\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x2e, 0x466416\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x32, 0x46641a\nMOV             R2, R7                                                 ; +0x36, 0x46641e\nMOV             R1, R0; char *                                         ; +0x38, 0x466420\nMOV             R0, R4; int                                            ; +0x3a, 0x466422\nBL              sub_776584                                             ; +0x3c, 0x466424\nLDR             R1, =(aCollectMore - 0x466434); \"Collect more\"         ; +0x40, 0x466428\nLDR             R3, =(aOk - 0x46643A); \"OK\"                            ; +0x42, 0x46642a\nMOVS            R0, #0; int                                            ; +0x44, 0x46642c\nSTR             R5, [SP,#0x18+var_14]; float                           ; +0x46, 0x46642e\nADD             R1, PC; \"Collect more\"                                 ; +0x48, 0x466430\nSTR             R0, [SP,#0x18+var_18]; int                             ; +0x4a, 0x466432\nMOV             R2, R4; int                                            ; +0x4c, 0x466434\nADD             R3, PC; \"OK\"                                           ; +0x4e, 0x466436\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x50, 0x466438\nB               loc_46647E                                             ; +0x54, 0x46643c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x56, 0x46643e\nLDR             R1, =(aBakAccount - 0x46644A); \"bak_account\"           ; +0x5a, 0x466442\nLDR             R2, flt_4664FC; float                                  ; +0x5c, 0x466444\nADD             R1, PC; \"bak_account\"                                  ; +0x5e, 0x466446\nBL              _ZN16GameLevelManager11getTimeLeftEPKcf; GameLevelManager::getTimeLeft(char const*,float) ; +0x60, 0x466448\nSUBS            R3, R0, #1                                             ; +0x64, 0x46644c\nMOV             R1, R0; char *                                         ; +0x66, 0x46644e\nCMP             R3, #0x1D                                              ; +0x68, 0x466450\nBHI             loc_466488                                             ; +0x6a, 0x466452\nLDR             R0, =(aPleaseWaitISec_1 - 0x46645A); \"Please wait %i seconds before attemptin\"... ; +0x6c, 0x466454\nADD             R0, PC; \"Please wait %i seconds before attemptin\"...   ; +0x6e, 0x466456\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x70, 0x466458\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x74, 0x46645c\nMOV             R2, R7                                                 ; +0x78, 0x466460\nMOV             R1, R0; char *                                         ; +0x7a, 0x466462\nMOV             R0, R4; int                                            ; +0x7c, 0x466464\nBL              sub_776584                                             ; +0x7e, 0x466466\nLDR             R1, =(aTooFast_0 - 0x466476); \"Too Fast\"               ; +0x82, 0x46646a\nLDR             R3, =(aOk - 0x46647C); \"OK\"                            ; +0x84, 0x46646c\nMOVS            R0, #0; int                                            ; +0x86, 0x46646e\nSTR             R5, [SP,#0x18+var_14]; float                           ; +0x88, 0x466470\nADD             R1, PC; \"Too Fast\"                                     ; +0x8a, 0x466472\nSTR             R0, [SP,#0x18+var_18]; int                             ; +0x8c, 0x466474\nMOV             R2, R4; int                                            ; +0x8e, 0x466476\nADD             R3, PC; \"OK\"                                           ; +0x90, 0x466478\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x92, 0x46647a\nMOV             R5, R0                                                 ; +0x96, 0x46647e\nMOV             R0, R4                                                 ; +0x98, 0x466480\nBL              sub_774008                                             ; +0x9a, 0x466482\nB               loc_4664CC                                             ; +0x9e, 0x466486\nLDR             R1, =(aDoYouWantToCgS - 0x466492); \"Do you want to <cg>save</c> your accoun\"... ; +0xa0, 0x466488\nMOV             R2, R7                                                 ; +0xa2, 0x46648a\nMOV             R0, R4; int                                            ; +0xa4, 0x46648c\nADD             R1, PC; \"Do you want to <cg>save</c> your accoun\"...   ; +0xa6, 0x46648e\nBL              sub_776584                                             ; +0xa8, 0x466490\nLDR             R3, =(aSave - 0x4664A0); \"Save\"                        ; +0xac, 0x466494\nLDR             R1, =(aSaveData - 0x4664A6); \"Save Data\"               ; +0xae, 0x466496\nADD.W           R0, R8, #0x1EC; int                                    ; +0xb0, 0x466498\nADD             R3, PC; \"Save\"                                         ; +0xb4, 0x46649c\nSTR             R3, [SP,#0x18+var_18]; int                             ; +0xb6, 0x46649e\nLDR             R3, =(aCancel - 0x4664AC); \"Cancel\"                    ; +0xb8, 0x4664a0\nADD             R1, PC; \"Save Data\"                                    ; +0xba, 0x4664a2\nSTR             R5, [SP,#0x18+var_14]; float                           ; +0xbc, 0x4664a4\nMOV             R2, R4; int                                            ; +0xbe, 0x4664a6\nADD             R3, PC; \"Cancel\"                                       ; +0xc0, 0x4664a8\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xc2, 0x4664aa\nMOV             R5, R0                                                 ; +0xc6, 0x4664ae\nMOV             R0, R4                                                 ; +0xc8, 0x4664b0\nBL              sub_774008                                             ; +0xca, 0x4664b2\nLDR             R1, =(aGjButton06Png - 0x4664C0); \"GJ_button_06.png\"   ; +0xce, 0x4664b6\nLDR.W           R0, [R5,#0x1D4]; this                                  ; +0xd0, 0x4664b8\nADD             R1, PC; \"GJ_button_06.png\"                             ; +0xd4, 0x4664bc\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0xd6, 0x4664be\nLDR             R3, [R5]                                               ; +0xda, 0x4664c2\nMOV             R0, R5                                                 ; +0xdc, 0x4664c4\nMOVS            R1, #1                                                 ; +0xde, 0x4664c6\nLDR             R3, [R3,#0x24]                                         ; +0xe0, 0x4664c8\nBLX             R3                                                     ; +0xe2, 0x4664ca\nLDR             R3, [R5]                                               ; +0xe4, 0x4664cc\nMOV             R0, R5                                                 ; +0xe6, 0x4664ce\nLDR.W           R3, [R3,#0x284]                                        ; +0xe8, 0x4664d0\nBLX             R3                                                     ; +0xec, 0x4664d4\nLDR             R2, [SP,#0x18+var_4]                                   ; +0xee, 0x4664d6\nLDR             R3, [R6]                                               ; +0xf0, 0x4664d8\nCMP             R2, R3                                                 ; +0xf2, 0x4664da\nBEQ             loc_4664F0                                             ; +0xf4, 0x4664dc\nBLX             __stack_chk_fail                                       ; +0xf6, 0x4664de\nB               loc_4664E4                                             ; +0xfa, 0x4664e2\nMOV             R0, R4                                                 ; +0xfc, 0x4664e4\nBL              sub_774008                                             ; +0xfe, 0x4664e6\nBL              __cxa_end_cleanup                                      ; +0x102, 0x4664ea\nB               loc_4664E4                                             ; +0x106, 0x4664ee\nADD             SP, SP, #0x18                                          ; +0x108, 0x4664f0\nPOP.W           {R4-R8,PC}                                             ; +0x10a, 0x4664f2", "xrefs": [], "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"}