{"type": "func", "start": 5369225248, "end": 5369226153, "name": "AccountLayer::onBackup", "pseudocode": "// \n// AccountLayer::onBackup from 0x14007e020 to 0x14007e3a9 (905 bytes)\n// \n// 2 xrefs:\n// > AccountLayer::customSetup @ 0x14007da22\n// > <???> @ 0x1406c68d0\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\n// Hidden C++ exception states: #wind=3\nvoid AccountLayer::onBackup(AccountLayer *a1, cocos2d::CCObject *a2)\n{\n  GameStatsManager *v3; // rcx\n  cocos2d::CCString *v4; // rax\n  const char *v5; // rax\n  size_t v6; // r8\n  __int64 v7; // rax\n  FLAlertLayer *v8; // rbx\n  GameLevelManager *v9; // rcx\n  int TimeLeft; // eax\n  cocos2d::CCString *v11; // rax\n  const char *CString; // rax\n  size_t v13; // r8\n  __int64 v14; // rax\n  int v15; // ebx\n  __int64 v16; // rax\n  __int128 v17; // [rsp+50h] [rbp+7h] BYREF\n  __int64 v18; // [rsp+60h] [rbp+17h]\n  __int64 v19; // [rsp+68h] [rbp+1Fh]\n  _BYTE v20[48]; // [rsp+70h] [rbp+27h] BYREF\n  void *v21; // [rsp+C0h] [rbp+77h]\n  void *v22; // [rsp+C0h] [rbp+77h]\n\n  v3 = (GameStatsManager *)qword_1406C2EE8;\n  if ( !qword_1406C2EE8 )\n  {\n    v21 = operator new(0x3E0u);\n    qword_1406C2EE8 = sub_1401D0AE0(v21);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n    v3 = (GameStatsManager *)qword_1406C2EE8;\n  }\n  if ( GameStatsManager::getStat(v3, \"6\") >= 10 )\n  {\n    v9 = (GameLevelManager *)qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v22 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280(v22);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v9 = (GameLevelManager *)qword_1406C2EC0;\n    }\n    TimeLeft = GameLevelManager::getTimeLeft(v9, \"bak_account\", 30.0);\n    if ( (unsigned int)(TimeLeft - 1) > 0x1D )\n    {\n      v15 = (_DWORD)a1 + 632;\n      if ( !a1 )\n        v15 = 0;\n      v17 = 0;\n      v18 = 0;\n      v19 = 15;\n      *(_QWORD *)&v17 = sub_14003AA10(0x80u);\n      v18 = 118;\n      v19 = 127;\n      strcpy(\n        (char *)v17,\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      v16 = sub_14003BDB0((__int64)v20, (__int64)&v17);\n      v8 = FLAlertLayer::create(\n             v15,\n             (int)\"Save Data\",\n             v16,\n             (__int64)\"Cancel\",\n             (__int64)\"Save\",\n             1133903872,\n             0,\n             0,\n             1065353216);\n      sub_14003A830((__int64)&v17);\n      ButtonSprite::updateBGImage(v8->m_button1, \"GJ_button_06.png\");\n      v8->setTag(v8, 1);\n    }\n    else\n    {\n      v11 = cocos2d::CCString::createWithFormat(\n              \"Please wait %i seconds before attempting to back up your account again.\",\n              TimeLeft);\n      CString = cocos2d::CCString::getCString(v11);\n      v17 = 0;\n      v18 = 0;\n      v19 = 0;\n      v13 = -1;\n      do\n        ++v13;\n      while ( CString[v13] );\n      sub_14003A930(&v17, CString, v13);\n      v14 = sub_14003BDB0((__int64)v20, (__int64)&v17);\n      v8 = FLAlertLayer::create(0, (int)\"Too Fast\", v14, (__int64)\"OK\", 0, 1133903872, 0, 0, 1065353216);\n      sub_14003A830((__int64)&v17);\n    }\n  }\n  else\n  {\n    v4 = cocos2d::CCString::createWithFormat(\n           \"You need to <cl>collect</c> atleast <cy>%i stars</c> to enable <cg>saving</c>.\",\n           10);\n    v5 = cocos2d::CCString::getCString(v4);\n    v17 = 0;\n    v18 = 0;\n    v19 = 0;\n    v6 = -1;\n    do\n      ++v6;\n    while ( v5[v6] );\n    sub_14003A930(&v17, v5, v6);\n    v7 = sub_14003BDB0((__int64)v20, (__int64)&v17);\n    v8 = FLAlertLayer::create(0, (int)\"Collect more\", v7, (__int64)\"OK\", 0, 1133903872, 0, 0, 1065353216);\n    sub_14003A830((__int64)&v17);\n  }\n  v8->show(v8);\n}", "assembly": "; \n; AccountLayer::onBackup from 0x14007e020 to 0x14007e3a9 (905 bytes)\n; \n; 2 xrefs:\n; > AccountLayer::customSetup @ 0x14007da22\n; > <???> @ 0x1406c68d0\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\nmov     [rsp-8+arg_0], rbx                                             ; +0x0, 0x14007e020\npush    rbp                                                            ; +0x5, 0x14007e025\npush    rsi                                                            ; +0x6, 0x14007e026\npush    rdi                                                            ; +0x7, 0x14007e027\nlea     rbp, [rsp-47h]                                                 ; +0x8, 0x14007e028\nsub     rsp, 90h                                                       ; +0xd, 0x14007e02d\nmov     rsi, rcx                                                       ; +0x14, 0x14007e034\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x17, 0x14007e037\ntest    rcx, rcx                                                       ; +0x1e, 0x14007e03e\njnz     short loc_14007E071                                            ; +0x21, 0x14007e041\nmov     ecx, 3E0h; Size                                                ; +0x23, 0x14007e043\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x28, 0x14007e048\nmov     [rbp+57h+arg_10], rax                                          ; +0x2d, 0x14007e04d\nmov     rcx, rax                                                       ; +0x31, 0x14007e051\ncall    sub_1401D0AE0                                                  ; +0x34, 0x14007e054\nnop                                                                    ; +0x39, 0x14007e059\nmov     cs:qword_1406C2EE8, rax                                        ; +0x3a, 0x14007e05a\nmov     rdx, [rax]                                                     ; +0x41, 0x14007e061\nmov     rcx, rax                                                       ; +0x44, 0x14007e064\ncall    qword ptr [rdx+48h]                                            ; +0x47, 0x14007e067\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x4a, 0x14007e06a\nlea     rdx, a6; \"6\"                                                   ; +0x51, 0x14007e071\ncall    GameStatsManager__getStat                                      ; +0x58, 0x14007e078\ncmp     eax, 0Ah                                                       ; +0x5d, 0x14007e07d\njge     loc_14007E142                                                  ; +0x60, 0x14007e080\nmov     edx, 0Ah                                                       ; +0x66, 0x14007e086\nlea     rcx, aYouNeedToClCol; \"You need to <cl>collect</c> atleast <cy\"... ; +0x6b, 0x14007e08b\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x72, 0x14007e092\nmov     rcx, rax                                                       ; +0x78, 0x14007e098\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x7b, 0x14007e09b\nxorps   xmm0, xmm0                                                     ; +0x81, 0x14007e0a1\nmovups  [rbp+57h+var_50], xmm0                                         ; +0x84, 0x14007e0a4\nxor     edi, edi                                                       ; +0x88, 0x14007e0a8\nmov     [rbp+57h+var_40], rdi                                          ; +0x8a, 0x14007e0aa\nmov     [rbp+57h+var_38], rdi                                          ; +0x8e, 0x14007e0ae\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x92, 0x14007e0b2\nnop     dword ptr [rax+00000000h]                                      ; +0x99, 0x14007e0b9\ninc     r8                                                             ; +0xa0, 0x14007e0c0\ncmp     [rax+r8], dil                                                  ; +0xa3, 0x14007e0c3\njnz     short loc_14007E0C0                                            ; +0xa7, 0x14007e0c7\nmov     rdx, rax                                                       ; +0xa9, 0x14007e0c9\nlea     rcx, [rbp+57h+var_50]                                          ; +0xac, 0x14007e0cc\ncall    sub_14003A930                                                  ; +0xb0, 0x14007e0d0\nlea     rax, [rbp+57h+var_50]                                          ; +0xb5, 0x14007e0d5\nmov     [rbp+57h+arg_10], rax                                          ; +0xb9, 0x14007e0d9\nlea     rdx, [rbp+57h+var_50]                                          ; +0xbd, 0x14007e0dd\nlea     rcx, [rbp+57h+var_30]                                          ; +0xc1, 0x14007e0e1\ncall    sub_14003BDB0                                                  ; +0xc5, 0x14007e0e5\nmovss   xmm0, cs:flt_140622C24                                         ; +0xca, 0x14007e0ea\nmovss   [rsp+0A0h+var_60], xmm0                                        ; +0xd2, 0x14007e0f2\nxorps   xmm1, xmm1                                                     ; +0xd8, 0x14007e0f8\nmovss   [rsp+0A0h+var_68], xmm1                                        ; +0xdb, 0x14007e0fb\nmov     [rsp+0A0h+var_70], 0                                           ; +0xe1, 0x14007e101\nmovss   xmm0, cs:dword_14062343C                                       ; +0xe6, 0x14007e106\nmovss   [rsp+0A0h+var_78], xmm0                                        ; +0xee, 0x14007e10e\nmov     [rsp+0A0h+var_80], rdi                                         ; +0xf4, 0x14007e114\nlea     r9, aOk; \"OK\"                                                  ; +0xf9, 0x14007e119\nmov     r8, rax                                                        ; +0x100, 0x14007e120\nlea     rdx, aCollectMore; \"Collect more\"                              ; +0x103, 0x14007e123\nxor     ecx, ecx                                                       ; +0x10a, 0x14007e12a\ncall    FLAlertLayer__create                                           ; +0x10c, 0x14007e12c\nmov     rbx, rax                                                       ; +0x111, 0x14007e131\nlea     rcx, [rbp+57h+var_50]                                          ; +0x114, 0x14007e134\ncall    sub_14003A830                                                  ; +0x118, 0x14007e138\njmp     loc_14007E38A                                                  ; +0x11d, 0x14007e13d\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x122, 0x14007e142\ntest    rcx, rcx                                                       ; +0x129, 0x14007e149\njnz     short loc_14007E17C                                            ; +0x12c, 0x14007e14c\nmov     ecx, 3D0h; Size                                                ; +0x12e, 0x14007e14e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x133, 0x14007e153\nmov     [rbp+57h+arg_10], rax                                          ; +0x138, 0x14007e158\nmov     rcx, rax                                                       ; +0x13c, 0x14007e15c\ncall    sub_140141280                                                  ; +0x13f, 0x14007e15f\nnop                                                                    ; +0x144, 0x14007e164\nmov     cs:qword_1406C2EC0, rax                                        ; +0x145, 0x14007e165\nmov     rdx, [rax]                                                     ; +0x14c, 0x14007e16c\nmov     rcx, rax                                                       ; +0x14f, 0x14007e16f\ncall    qword ptr [rdx+48h]                                            ; +0x152, 0x14007e172\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x155, 0x14007e175\nmovss   xmm2, cs:dword_140623164                                       ; +0x15c, 0x14007e17c\nlea     rdx, aBakAccount; \"bak_account\"                                ; +0x164, 0x14007e184\ncall    GameLevelManager__getTimeLeft                                  ; +0x16b, 0x14007e18b\nlea     ecx, [rax-1]                                                   ; +0x170, 0x14007e190\ncmp     ecx, 1Dh                                                       ; +0x173, 0x14007e193\nja      loc_14007E252                                                  ; +0x176, 0x14007e196\nmov     edx, eax                                                       ; +0x17c, 0x14007e19c\nlea     rcx, aPleaseWaitISec; \"Please wait %i seconds before attemptin\"... ; +0x17e, 0x14007e19e\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x185, 0x14007e1a5\nmov     rcx, rax                                                       ; +0x18b, 0x14007e1ab\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x18e, 0x14007e1ae\nxorps   xmm0, xmm0                                                     ; +0x194, 0x14007e1b4\nmovups  [rbp+57h+var_50], xmm0                                         ; +0x197, 0x14007e1b7\nxor     edi, edi                                                       ; +0x19b, 0x14007e1bb\nmov     [rbp+57h+var_40], rdi                                          ; +0x19d, 0x14007e1bd\nmov     [rbp+57h+var_38], rdi                                          ; +0x1a1, 0x14007e1c1\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x1a5, 0x14007e1c5\nnop     dword ptr [rax+00h]                                            ; +0x1ac, 0x14007e1cc\ninc     r8                                                             ; +0x1b0, 0x14007e1d0\ncmp     [rax+r8], dil                                                  ; +0x1b3, 0x14007e1d3\njnz     short loc_14007E1D0                                            ; +0x1b7, 0x14007e1d7\nmov     rdx, rax                                                       ; +0x1b9, 0x14007e1d9\nlea     rcx, [rbp+57h+var_50]                                          ; +0x1bc, 0x14007e1dc\ncall    sub_14003A930                                                  ; +0x1c0, 0x14007e1e0\nlea     rax, [rbp+57h+var_50]                                          ; +0x1c5, 0x14007e1e5\nmov     [rbp+57h+arg_10], rax                                          ; +0x1c9, 0x14007e1e9\nlea     rdx, [rbp+57h+var_50]                                          ; +0x1cd, 0x14007e1ed\nlea     rcx, [rbp+57h+var_30]                                          ; +0x1d1, 0x14007e1f1\ncall    sub_14003BDB0                                                  ; +0x1d5, 0x14007e1f5\nmovss   xmm0, cs:flt_140622C24                                         ; +0x1da, 0x14007e1fa\nmovss   [rsp+0A0h+var_60], xmm0                                        ; +0x1e2, 0x14007e202\nxorps   xmm1, xmm1                                                     ; +0x1e8, 0x14007e208\nmovss   [rsp+0A0h+var_68], xmm1                                        ; +0x1eb, 0x14007e20b\nmov     [rsp+0A0h+var_70], 0                                           ; +0x1f1, 0x14007e211\nmovss   xmm0, cs:dword_14062343C                                       ; +0x1f6, 0x14007e216\nmovss   [rsp+0A0h+var_78], xmm0                                        ; +0x1fe, 0x14007e21e\nmov     [rsp+0A0h+var_80], rdi                                         ; +0x204, 0x14007e224\nlea     r9, aOk; \"OK\"                                                  ; +0x209, 0x14007e229\nmov     r8, rax                                                        ; +0x210, 0x14007e230\nlea     rdx, aTooFast; \"Too Fast\"                                      ; +0x213, 0x14007e233\nxor     ecx, ecx                                                       ; +0x21a, 0x14007e23a\ncall    FLAlertLayer__create                                           ; +0x21c, 0x14007e23c\nmov     rbx, rax                                                       ; +0x221, 0x14007e241\nlea     rcx, [rbp+57h+var_50]                                          ; +0x224, 0x14007e244\ncall    sub_14003A830                                                  ; +0x228, 0x14007e248\njmp     loc_14007E38A                                                  ; +0x22d, 0x14007e24d\nlea     rbx, [rsi+278h]                                                ; +0x232, 0x14007e252\nxor     edi, edi                                                       ; +0x239, 0x14007e259\ntest    rsi, rsi                                                       ; +0x23b, 0x14007e25b\ncmovz   rbx, rdi                                                       ; +0x23e, 0x14007e25e\nxorps   xmm0, xmm0                                                     ; +0x242, 0x14007e262\nmovups  [rbp+57h+var_50], xmm0                                         ; +0x245, 0x14007e265\nmov     [rbp+57h+var_40], rdi                                          ; +0x249, 0x14007e269\nmov     [rbp+57h+var_38], 0Fh                                          ; +0x24d, 0x14007e26d\nmov     ecx, 80h                                                       ; +0x255, 0x14007e275\ncall    sub_14003AA10                                                  ; +0x25a, 0x14007e27a\nmov     rcx, rax                                                       ; +0x25f, 0x14007e27f\nmov     qword ptr [rbp+57h+var_50], rax                                ; +0x262, 0x14007e282\nmov     [rbp+57h+var_40], 76h ; 'v'                                    ; +0x266, 0x14007e286\nmov     [rbp+57h+var_38], 7Fh                                          ; +0x26e, 0x14007e28e\nmovaps  xmm0, cs:xmmword_14053A270                                     ; +0x276, 0x14007e296\nmovups  xmmword ptr [rax], xmm0                                        ; +0x27d, 0x14007e29d\nmovaps  xmm1, cs:xmmword_14053A280                                     ; +0x280, 0x14007e2a0\nmovups  xmmword ptr [rax+10h], xmm1                                    ; +0x287, 0x14007e2a7\nmovaps  xmm0, cs:xmmword_14053A290                                     ; +0x28b, 0x14007e2ab\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x292, 0x14007e2b2\nmovaps  xmm1, cs:xmmword_14053A2A0                                     ; +0x296, 0x14007e2b6\nmovups  xmmword ptr [rax+30h], xmm1                                    ; +0x29d, 0x14007e2bd\nmovaps  xmm0, cs:xmmword_14053A2B0                                     ; +0x2a1, 0x14007e2c1\nmovups  xmmword ptr [rax+40h], xmm0                                    ; +0x2a8, 0x14007e2c8\nmovaps  xmm1, cs:xmmword_14053A2C0                                     ; +0x2ac, 0x14007e2cc\nmovups  xmmword ptr [rax+50h], xmm1                                    ; +0x2b3, 0x14007e2d3\nmovaps  xmm0, cs:xmmword_14053A2D0                                     ; +0x2b7, 0x14007e2d7\nmovups  xmmword ptr [rax+60h], xmm0                                    ; +0x2be, 0x14007e2de\nmov     eax, cs:dword_14053A2E0                                        ; +0x2c2, 0x14007e2e2\nmov     [rcx+70h], eax                                                 ; +0x2c8, 0x14007e2e8\nmovzx   eax, cs:word_14053A2E4                                         ; +0x2cb, 0x14007e2eb\nmov     [rcx+74h], ax                                                  ; +0x2d2, 0x14007e2f2\nmov     [rcx+76h], dil                                                 ; +0x2d6, 0x14007e2f6\nlea     rax, [rbp+57h+var_50]                                          ; +0x2da, 0x14007e2fa\nmov     [rbp+57h+arg_10], rax                                          ; +0x2de, 0x14007e2fe\nlea     rdx, [rbp+57h+var_50]                                          ; +0x2e2, 0x14007e302\nlea     rcx, [rbp+57h+var_30]                                          ; +0x2e6, 0x14007e306\ncall    sub_14003BDB0                                                  ; +0x2ea, 0x14007e30a\nmovss   xmm0, cs:flt_140622C24                                         ; +0x2ef, 0x14007e30f\nmovss   [rsp+0A0h+var_60], xmm0                                        ; +0x2f7, 0x14007e317\nxorps   xmm1, xmm1                                                     ; +0x2fd, 0x14007e31d\nmovss   [rsp+0A0h+var_68], xmm1                                        ; +0x300, 0x14007e320\nmov     [rsp+0A0h+var_70], dil                                         ; +0x306, 0x14007e326\nmovss   xmm0, cs:dword_14062343C                                       ; +0x30b, 0x14007e32b\nmovss   [rsp+0A0h+var_78], xmm0                                        ; +0x313, 0x14007e333\nlea     rcx, aSave; \"Save\"                                             ; +0x319, 0x14007e339\nmov     [rsp+0A0h+var_80], rcx                                         ; +0x320, 0x14007e340\nlea     r9, aCancel; \"Cancel\"                                          ; +0x325, 0x14007e345\nmov     r8, rax                                                        ; +0x32c, 0x14007e34c\nlea     rdx, aSaveData; \"Save Data\"                                    ; +0x32f, 0x14007e34f\nmov     rcx, rbx                                                       ; +0x336, 0x14007e356\ncall    FLAlertLayer__create                                           ; +0x339, 0x14007e359\nmov     rbx, rax                                                       ; +0x33e, 0x14007e35e\nlea     rcx, [rbp+57h+var_50]                                          ; +0x341, 0x14007e361\ncall    sub_14003A830                                                  ; +0x345, 0x14007e365\nlea     rdx, aGjButton06Png; \"GJ_button_06.png\"                        ; +0x34a, 0x14007e36a\nmov     rcx, [rbx+250h]                                                ; +0x351, 0x14007e371\ncall    ButtonSprite__updateBGImage                                    ; +0x358, 0x14007e378\nmov     r8, [rbx]                                                      ; +0x35d, 0x14007e37d\nlea     edx, [rdi+1]                                                   ; +0x360, 0x14007e380\nmov     rcx, rbx                                                       ; +0x363, 0x14007e383\ncall    qword ptr [r8+40h]                                             ; +0x366, 0x14007e386\nmov     rdx, [rbx]                                                     ; +0x36a, 0x14007e38a\nmov     rcx, rbx                                                       ; +0x36d, 0x14007e38d\ncall    qword ptr [rdx+410h]                                           ; +0x370, 0x14007e390\nmov     rbx, [rsp+0A0h+arg_0]                                          ; +0x376, 0x14007e396\nadd     rsp, 90h                                                       ; +0x37e, 0x14007e39e\npop     rdi                                                            ; +0x385, 0x14007e3a5\npop     rsi                                                            ; +0x386, 0x14007e3a6\npop     rbp                                                            ; +0x387, 0x14007e3a7\nretn                                                                   ; +0x388, 0x14007e3a8", "xrefs": ["AccountLayer::customSetup @ 0x14007da22", "<???> @ 0x1406c68d0"], "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"}