{"type": "func", "start": 5369313904, "end": 5369314547, "name": "AccountLayer::onSync", "pseudocode": "// \n// AccountLayer::onSync from 0x140093a70 to 0x140093cf3 (643 bytes)\n// \n// 2 xrefs:\n// > AccountLayer::customSetup @ 0x140093133\n// > <???> @ 0x140912ba8\n// \n// This function is hookable on this platform (idp: pc, 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 11:26:01 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall AccountLayer::onSync(__int64 a1)\n{\n  __int64 v2; // rcx\n  int TimeLeft; // eax\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  __int64 v7; // rax\n  cocos2d::CCObject *v8; // rbx\n  int v9; // ebx\n  __int64 v10; // rax\n  __int128 v12; // [rsp+50h] [rbp+7h] BYREF\n  __int64 v13; // [rsp+60h] [rbp+17h]\n  __int64 v14; // [rsp+68h] [rbp+1Fh]\n  _BYTE v15[48]; // [rsp+70h] [rbp+27h] BYREF\n  void *v16; // [rsp+C0h] [rbp+77h]\n\n  v2 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v16 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v16);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v2 = *(_QWORD *)&qword_14090BFB0;\n  }\n  TimeLeft = GameLevelManager::getTimeLeft(v2, \"sync_account\");\n  if ( (unsigned int)(TimeLeft - 1) > 0x1D )\n  {\n    v9 = a1 + 632;\n    if ( !a1 )\n      v9 = 0;\n    v12 = 0;\n    v13 = 0;\n    v14 = 0;\n    *(_QWORD *)&v12 = sub_14003D460(0x90u);\n    v13 = 131;\n    v14 = 143;\n    strcpy(\n      (char *)v12,\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    v10 = sub_14003F4F0((__int64)v15, (__int64)&v12);\n    v8 = FLAlertLayer::create(\n           v9,\n           (int)\"Load Data\",\n           v10,\n           (__int64)\"Cancel\",\n           (__int64)\"Load\",\n           1133903872,\n           0,\n           0,\n           1065353216);\n    sub_14003D310((__int64)&v12);\n    (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v8 + 64LL))(v8, 2);\n  }\n  else\n  {\n    v4 = cocos2d::CCString::createWithFormat(\n           \"Please wait %i seconds before attempting to sync your account again.\",\n           TimeLeft);\n    CString = cocos2d::CCString::getCString(v4);\n    v12 = 0;\n    v13 = 0;\n    v14 = 0;\n    v6 = -1;\n    do\n      ++v6;\n    while ( CString[v6] );\n    sub_14003D230(&v12, CString, v6);\n    v7 = sub_14003F4F0((__int64)v15, (__int64)&v12);\n    v8 = FLAlertLayer::create(0, (int)\"Too fast\", v7, (__int64)\"OK\", 0, 1133903872, 0, 0, 1065353216);\n    sub_14003D310((__int64)&v12);\n  }\n  return (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v8 + 1064LL))(v8);\n}", "assembly": "; \n; AccountLayer::onSync from 0x140093a70 to 0x140093cf3 (643 bytes)\n; \n; 2 xrefs:\n; > AccountLayer::customSetup @ 0x140093133\n; > <???> @ 0x140912ba8\n; \n; This function is hookable on this platform (idp: pc, 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 11:26:01 +0000\n; \nmov     [rsp-8+arg_0], rbx                                             ; +0x0, 0x140093a70\npush    rbp                                                            ; +0x5, 0x140093a75\npush    rsi                                                            ; +0x6, 0x140093a76\npush    rdi                                                            ; +0x7, 0x140093a77\nlea     rbp, [rsp-47h]                                                 ; +0x8, 0x140093a78\nsub     rsp, 90h                                                       ; +0xd, 0x140093a7d\nmov     rsi, rcx                                                       ; +0x14, 0x140093a84\nmov     rcx, cs:qword_14090BFB0                                        ; +0x17, 0x140093a87\ntest    rcx, rcx                                                       ; +0x1e, 0x140093a8e\njnz     short loc_140093AC4                                            ; +0x21, 0x140093a91\nmov     ecx, 690h; Size                                                ; +0x23, 0x140093a93\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x28, 0x140093a98\nmov     [rbp+57h+arg_10], rax                                          ; +0x2d, 0x140093a9d\nmov     rcx, rax                                                       ; +0x31, 0x140093aa1\ncall    GameLevelManager__GameLevelManager                             ; +0x34, 0x140093aa4\nnop                                                                    ; +0x39, 0x140093aa9\nmov     cs:qword_14090BFB0, rax                                        ; +0x3a, 0x140093aaa\nmov     rcx, [rax]                                                     ; +0x41, 0x140093ab1\nmov     rdx, [rcx+48h]                                                 ; +0x44, 0x140093ab4\nmov     rcx, rax                                                       ; +0x48, 0x140093ab8\ncall    rdx                                                            ; +0x4b, 0x140093abb\nmov     rcx, cs:qword_14090BFB0                                        ; +0x4d, 0x140093abd\nmovss   xmm2, cs:dword_140835624                                       ; +0x54, 0x140093ac4\nlea     rdx, aSyncAccount; \"sync_account\"                              ; +0x5c, 0x140093acc\ncall    GameLevelManager__getTimeLeft                                  ; +0x63, 0x140093ad3\nlea     ecx, [rax-1]                                                   ; +0x68, 0x140093ad8\ncmp     ecx, 1Dh                                                       ; +0x6b, 0x140093adb\nja      loc_140093B96                                                  ; +0x6e, 0x140093ade\nmov     edx, eax                                                       ; +0x74, 0x140093ae4\nlea     rcx, aPleaseWaitISec_0; \"Please wait %i seconds before attemptin\"... ; +0x76, 0x140093ae6\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x7d, 0x140093aed\nmov     rcx, rax                                                       ; +0x83, 0x140093af3\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x86, 0x140093af6\nxorps   xmm0, xmm0                                                     ; +0x8c, 0x140093afc\nmovups  [rbp+57h+var_50], xmm0                                         ; +0x8f, 0x140093aff\nxor     edi, edi                                                       ; +0x93, 0x140093b03\nmov     [rbp+57h+var_40], rdi                                          ; +0x95, 0x140093b05\nmov     [rbp+57h+var_38], rdi                                          ; +0x99, 0x140093b09\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x9d, 0x140093b0d\ninc     r8                                                             ; +0xa4, 0x140093b14\ncmp     [rax+r8], dil                                                  ; +0xa7, 0x140093b17\njnz     short loc_140093B14                                            ; +0xab, 0x140093b1b\nmov     rdx, rax                                                       ; +0xad, 0x140093b1d\nlea     rcx, [rbp+57h+var_50]                                          ; +0xb0, 0x140093b20\ncall    sub_14003D230                                                  ; +0xb4, 0x140093b24\nlea     rax, [rbp+57h+var_50]                                          ; +0xb9, 0x140093b29\nmov     [rbp+57h+arg_10], rax                                          ; +0xbd, 0x140093b2d\nlea     rdx, [rbp+57h+var_50]                                          ; +0xc1, 0x140093b31\nlea     rcx, [rbp+57h+var_30]                                          ; +0xc5, 0x140093b35\ncall    sub_14003F4F0                                                  ; +0xc9, 0x140093b39\nmovss   xmm0, cs:flt_140835080                                         ; +0xce, 0x140093b3e\nmovss   [rsp+0A0h+var_60], xmm0                                        ; +0xd6, 0x140093b46\nxorps   xmm1, xmm1                                                     ; +0xdc, 0x140093b4c\nmovss   [rsp+0A0h+var_68], xmm1                                        ; +0xdf, 0x140093b4f\nmov     [rsp+0A0h+var_70], 0                                           ; +0xe5, 0x140093b55\nmovss   xmm0, cs:dword_1408359A4                                       ; +0xea, 0x140093b5a\nmovss   [rsp+0A0h+var_78], xmm0                                        ; +0xf2, 0x140093b62\nmov     [rsp+0A0h+var_80], rdi                                         ; +0xf8, 0x140093b68\nlea     r9, aOk; \"OK\"                                                  ; +0xfd, 0x140093b6d\nmov     r8, rax                                                        ; +0x104, 0x140093b74\nlea     rdx, aTooFast_0; \"Too fast\"                                    ; +0x107, 0x140093b77\nxor     ecx, ecx                                                       ; +0x10e, 0x140093b7e\ncall    FLAlertLayer__create                                           ; +0x110, 0x140093b80\nmov     rbx, rax                                                       ; +0x115, 0x140093b85\nlea     rcx, [rbp+57h+var_50]                                          ; +0x118, 0x140093b88\ncall    sub_14003D310                                                  ; +0x11c, 0x140093b8c\njmp     loc_140093CD1                                                  ; +0x121, 0x140093b91\nlea     rbx, [rsi+278h]                                                ; +0x126, 0x140093b96\nxor     edi, edi                                                       ; +0x12d, 0x140093b9d\ntest    rsi, rsi                                                       ; +0x12f, 0x140093b9f\ncmovz   rbx, rdi                                                       ; +0x132, 0x140093ba2\nxorps   xmm0, xmm0                                                     ; +0x136, 0x140093ba6\nmovups  [rbp+57h+var_50], xmm0                                         ; +0x139, 0x140093ba9\nmov     [rbp+57h+var_40], rdi                                          ; +0x13d, 0x140093bad\nmov     [rbp+57h+var_38], rdi                                          ; +0x141, 0x140093bb1\nmov     ecx, 90h                                                       ; +0x145, 0x140093bb5\ncall    sub_14003D460                                                  ; +0x14a, 0x140093bba\nmov     rcx, rax                                                       ; +0x14f, 0x140093bbf\nmov     qword ptr [rbp+57h+var_50], rax                                ; +0x152, 0x140093bc2\nmov     [rbp+57h+var_40], 83h                                          ; +0x156, 0x140093bc6\nmov     [rbp+57h+var_38], 8Fh                                          ; +0x15e, 0x140093bce\nmovaps  xmm0, cs:xmmword_140717CD0                                     ; +0x166, 0x140093bd6\nmovups  xmmword ptr [rax], xmm0                                        ; +0x16d, 0x140093bdd\nmovaps  xmm1, cs:xmmword_140717CE0                                     ; +0x170, 0x140093be0\nmovups  xmmword ptr [rax+10h], xmm1                                    ; +0x177, 0x140093be7\nmovaps  xmm0, cs:xmmword_140717CF0                                     ; +0x17b, 0x140093beb\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x182, 0x140093bf2\nmovaps  xmm1, cs:xmmword_140717D00                                     ; +0x186, 0x140093bf6\nmovups  xmmword ptr [rax+30h], xmm1                                    ; +0x18d, 0x140093bfd\nmovaps  xmm0, cs:xmmword_140717D10                                     ; +0x191, 0x140093c01\nmovups  xmmword ptr [rax+40h], xmm0                                    ; +0x198, 0x140093c08\nmovaps  xmm1, cs:xmmword_140717D20                                     ; +0x19c, 0x140093c0c\nmovups  xmmword ptr [rax+50h], xmm1                                    ; +0x1a3, 0x140093c13\nmovaps  xmm0, cs:xmmword_140717D30                                     ; +0x1a7, 0x140093c17\nmovups  xmmword ptr [rax+60h], xmm0                                    ; +0x1ae, 0x140093c1e\nmovaps  xmm1, cs:xmmword_140717D40                                     ; +0x1b2, 0x140093c22\nmovups  xmmword ptr [rax+70h], xmm1                                    ; +0x1b9, 0x140093c29\nmovzx   eax, cs:word_140717D50                                         ; +0x1bd, 0x140093c2d\nmov     [rcx+80h], ax                                                  ; +0x1c4, 0x140093c34\nmovzx   eax, cs:byte_140717D52                                         ; +0x1cb, 0x140093c3b\nmov     [rcx+82h], al                                                  ; +0x1d2, 0x140093c42\nmov     [rcx+83h], dil                                                 ; +0x1d8, 0x140093c48\nlea     rax, [rbp+57h+var_50]                                          ; +0x1df, 0x140093c4f\nmov     [rbp+57h+arg_10], rax                                          ; +0x1e3, 0x140093c53\nlea     rdx, [rbp+57h+var_50]                                          ; +0x1e7, 0x140093c57\nlea     rcx, [rbp+57h+var_30]                                          ; +0x1eb, 0x140093c5b\ncall    sub_14003F4F0                                                  ; +0x1ef, 0x140093c5f\nmovss   xmm0, cs:flt_140835080                                         ; +0x1f4, 0x140093c64\nmovss   [rsp+0A0h+var_60], xmm0                                        ; +0x1fc, 0x140093c6c\nxorps   xmm1, xmm1                                                     ; +0x202, 0x140093c72\nmovss   [rsp+0A0h+var_68], xmm1                                        ; +0x205, 0x140093c75\nmov     [rsp+0A0h+var_70], dil                                         ; +0x20b, 0x140093c7b\nmovss   xmm0, cs:dword_1408359A4                                       ; +0x210, 0x140093c80\nmovss   [rsp+0A0h+var_78], xmm0                                        ; +0x218, 0x140093c88\nlea     rcx, aLoad; \"Load\"                                             ; +0x21e, 0x140093c8e\nmov     [rsp+0A0h+var_80], rcx                                         ; +0x225, 0x140093c95\nlea     r9, aCancel; \"Cancel\"                                          ; +0x22a, 0x140093c9a\nmov     r8, rax                                                        ; +0x231, 0x140093ca1\nlea     rdx, aLoadData; \"Load Data\"                                    ; +0x234, 0x140093ca4\nmov     rcx, rbx                                                       ; +0x23b, 0x140093cab\ncall    FLAlertLayer__create                                           ; +0x23e, 0x140093cae\nmov     rbx, rax                                                       ; +0x243, 0x140093cb3\nlea     rcx, [rbp+57h+var_50]                                          ; +0x246, 0x140093cb6\ncall    sub_14003D310                                                  ; +0x24a, 0x140093cba\nmov     rcx, [rbx]                                                     ; +0x24f, 0x140093cbf\nmov     r8, [rcx+40h]                                                  ; +0x252, 0x140093cc2\nmov     edx, 2                                                         ; +0x256, 0x140093cc6\nmov     rcx, rbx                                                       ; +0x25b, 0x140093ccb\ncall    r8                                                             ; +0x25e, 0x140093cce\nmov     rcx, [rbx]                                                     ; +0x261, 0x140093cd1\nmov     rdx, [rcx+428h]                                                ; +0x264, 0x140093cd4\nmov     rcx, rbx                                                       ; +0x26b, 0x140093cdb\ncall    rdx                                                            ; +0x26e, 0x140093cde\nmov     rbx, [rsp+0A0h+arg_0]                                          ; +0x270, 0x140093ce0\nadd     rsp, 90h                                                       ; +0x278, 0x140093ce8\npop     rdi                                                            ; +0x27f, 0x140093cef\npop     rsi                                                            ; +0x280, 0x140093cf0\npop     rbp                                                            ; +0x281, 0x140093cf1\nretn                                                                   ; +0x282, 0x140093cf2", "xrefs": ["AccountLayer::customSetup @ 0x140093133", "<???> @ 0x140912ba8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}