{"type": "func", "start": 4295813792, "end": 4295814558, "name": "AccountHelpLayer::updatePage", "pseudocode": "// \n// AccountHelpLayer::updatePage from 0x1000ceaa0 to 0x1000ced9e (766 bytes)\n// \n// 3 xrefs:\n// > AccountHelpLayer::customSetup @ 0x1000ce776\n// > AccountHelpLayer::accountStatusChanged @ 0x1000cef45\n// > sub_1000CEF50 @ 0x1000cef5c\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 __fastcall AccountHelpLayer::updatePage(AccountHelpLayer *a1)\n{\n  __int128 v1; // xmm0\n  GJAccountManager *v3; // rax\n  TextArea **p_m_textArea; // r15\n  GJAccountManager *v5; // rax\n  std::string *p_m_GJP2; // rax\n  __int64 v7; // r14\n  cocos2d::CCLabelBMFont *m_loginStatusLabel; // r14\n  GJAccountManager *v9; // rax\n  std::string *p_m_username; // rax\n  GJAccountManager *v11; // rax\n  cocos2d::CCLabelBMFont *v12; // r14\n  TextArea *v13; // r14\n  void **v14; // rax\n  GJAccountManager *v15; // rax\n  std::string *v16; // rax\n  cocos2d::CCString *v17; // rax\n  const char *v18; // rax\n  TextArea *v19; // rdi\n  cocos2d::CCString *v20; // rax\n  const char *CString; // rax\n  TextArea *v22; // rdi\n  CCMenuItemSpriteExtra *m_unlinkAccountButton; // rbx\n  GJAccountManager *v24; // rax\n  char v25; // [rsp+0h] [rbp-80h]\n  _WORD v26[8]; // [rsp+8h] [rbp-78h] BYREF\n  char v27; // [rsp+18h] [rbp-68h] BYREF\n  _QWORD v28[2]; // [rsp+20h] [rbp-60h] BYREF\n  char *v29; // [rsp+30h] [rbp-50h] BYREF\n  char v30; // [rsp+38h] [rbp-48h] BYREF\n  char v31[23]; // [rsp+39h] [rbp-47h] BYREF\n  __int128 v32; // [rsp+50h] [rbp-30h] BYREF\n  void *__p; // [rsp+60h] [rbp-20h]\n\n  v3 = GJAccountManager::sharedState();\n  if ( v3->m_accountID == v3->m_unkInt1 )\n  {\n    p_m_textArea = &a1->m_textArea;\n    TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)-1);\n  }\n  else\n  {\n    v5 = GJAccountManager::sharedState();\n    if ( (v5->m_GJP2.m_data.m_short.sizex2 & 1) != 0 )\n    {\n      sub_100006B70(&v32, v5->m_GJP2.m_data.m_long.longStorage, v5->m_GJP2.m_data.m_long.size, *(double *)&v1);\n    }\n    else\n    {\n      p_m_GJP2 = &v5->m_GJP2;\n      __p = p_m_GJP2->m_data.m_long.longStorage;\n      v1 = *(_OWORD *)&p_m_GJP2->m_data.m_short.sizex2;\n      v32 = *(_OWORD *)&p_m_GJP2->m_data.m_short.sizex2;\n    }\n    v7 = (unsigned __int8)v32 >> 1;\n    if ( (v32 & 1) != 0 )\n    {\n      v7 = *((_QWORD *)&v32 + 1);\n      operator delete(__p);\n    }\n    p_m_textArea = &a1->m_textArea;\n    TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)-1);\n    if ( v7 )\n    {\n      m_loginStatusLabel = a1->m_loginStatusLabel;\n      v9 = GJAccountManager::sharedState();\n      if ( (v9->m_username.m_data.m_short.sizex2 & 1) != 0 )\n      {\n        sub_100006B70(&v32, v9->m_username.m_data.m_long.longStorage, v9->m_username.m_data.m_long.size, *(double *)&v1);\n      }\n      else\n      {\n        p_m_username = &v9->m_username;\n        __p = p_m_username->m_data.m_long.longStorage;\n        v32 = *(_OWORD *)&p_m_username->m_data.m_short.sizex2;\n      }\n      v20 = (cocos2d::CCString *)sub_1007AB580(\"Linked to account: %s\", v25);\n      CString = cocos2d::CCString::getCString(v20);\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_loginStatusLabel->setString)(\n        m_loginStatusLabel,\n        CString);\n      if ( (v32 & 1) != 0 )\n        operator delete(__p);\n      v22 = *p_m_textArea;\n      v26[0] = 0;\n      TextArea::setString(v22, v26);\n      if ( (v26[0] & 1) != 0 )\n      {\n        v14 = (void **)&v27;\n        goto LABEL_26;\n      }\n      goto LABEL_27;\n    }\n  }\n  v11 = GJAccountManager::sharedState();\n  v12 = a1->m_loginStatusLabel;\n  if ( v11->m_accountID == v11->m_unkInt1 )\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v12->setString)(\n      a1->m_loginStatusLabel,\n      \"Not logged in\");\n    v13 = *p_m_textArea;\n    v29 = (char *)operator new(0x30u);\n    v28[0] = 49;\n    v28[1] = 46;\n    strcpy(v29, \"Create an account to backup\\nand sync your data\");\n    TextArea::setString(v13, v28);\n    if ( (v28[0] & 1) != 0 )\n    {\n      v14 = (void **)&v29;\nLABEL_26:\n      operator delete(*v14);\n    }\n  }\n  else\n  {\n    v15 = GJAccountManager::sharedState();\n    if ( (v15->m_username.m_data.m_short.sizex2 & 1) != 0 )\n    {\n      sub_100006B70(&v32, v15->m_username.m_data.m_long.longStorage, v15->m_username.m_data.m_long.size, *(double *)&v1);\n    }\n    else\n    {\n      v16 = &v15->m_username;\n      __p = v16->m_data.m_long.longStorage;\n      v32 = *(_OWORD *)&v16->m_data.m_short.sizex2;\n    }\n    v17 = (cocos2d::CCString *)sub_1007AB580(\"Linked to account: %s\", v25);\n    v18 = cocos2d::CCString::getCString(v17);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v12->setString)(v12, v18);\n    if ( (v32 & 1) != 0 )\n      operator delete(__p);\n    v19 = *p_m_textArea;\n    v30 = 28;\n    strcpy(v31, \"Login required\");\n    TextArea::setString(v19, &v30);\n    if ( (v30 & 1) != 0 )\n    {\n      v14 = (void **)&v31[15];\n      goto LABEL_26;\n    }\n  }\nLABEL_27:\n  m_unlinkAccountButton = a1->m_unlinkAccountButton;\n  v24 = GJAccountManager::sharedState();\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))m_unlinkAccountButton->setVisible)(\n    m_unlinkAccountButton,\n    v24->m_accountID != v24->m_unkInt1);\n}", "assembly": "; \n; AccountHelpLayer::updatePage from 0x1000ceaa0 to 0x1000ced9e (766 bytes)\n; \n; 3 xrefs:\n; > AccountHelpLayer::customSetup @ 0x1000ce776\n; > AccountHelpLayer::accountStatusChanged @ 0x1000cef45\n; > sub_1000CEF50 @ 0x1000cef5c\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    rbp                                                            ; +0x0, 0x1000ceaa0\nmov     rbp, rsp                                                       ; +0x1, 0x1000ceaa1\npush    r15                                                            ; +0x4, 0x1000ceaa4\npush    r14                                                            ; +0x6, 0x1000ceaa6\npush    rbx                                                            ; +0x8, 0x1000ceaa8\nsub     rsp, 68h                                                       ; +0x9, 0x1000ceaa9\nmov     rbx, rdi                                                       ; +0xd, 0x1000ceaad\ncall    GJAccountManager__sharedState                                  ; +0x10, 0x1000ceab0\nmov     ecx, [rax+160h]                                                ; +0x15, 0x1000ceab5\ncmp     ecx, [rax+164h]                                                ; +0x1b, 0x1000ceabb\njnz     short loc_1000CEAE0                                            ; +0x21, 0x1000ceac1\nlea     r15, [rbx+278h]                                                ; +0x23, 0x1000ceac3\nmov     rdi, [rbx+278h]                                                ; +0x2a, 0x1000ceaca\nmov     esi, 0FFFFFFh                                                  ; +0x31, 0x1000cead1\ncall    TextArea__colorAllCharactersTo                                 ; +0x36, 0x1000cead6\njmp     loc_1000CEB97                                                  ; +0x3b, 0x1000ceadb\ncall    GJAccountManager__sharedState                                  ; +0x40, 0x1000ceae0\ntest    byte ptr [rax+170h], 1                                         ; +0x45, 0x1000ceae5\njnz     short loc_1000CEB05                                            ; +0x4c, 0x1000ceaec\nadd     rax, 170h                                                      ; +0x4e, 0x1000ceaee\nmov     rcx, [rax+10h]                                                 ; +0x54, 0x1000ceaf4\nmov     [rbp+__p], rcx                                                 ; +0x58, 0x1000ceaf8\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x5c, 0x1000ceafc\nmovaps  [rbp+var_30], xmm0                                             ; +0x5f, 0x1000ceaff\njmp     short loc_1000CEB1C                                            ; +0x63, 0x1000ceb03\nmov     rdx, [rax+178h]                                                ; +0x65, 0x1000ceb05\nmov     rsi, [rax+180h]                                                ; +0x6c, 0x1000ceb0c\nlea     rdi, [rbp+var_30]                                              ; +0x73, 0x1000ceb13\ncall    sub_100006B70                                                  ; +0x77, 0x1000ceb17\nmovzx   eax, byte ptr [rbp+var_30]                                     ; +0x7c, 0x1000ceb1c\nmov     r14d, eax                                                      ; +0x80, 0x1000ceb20\nshr     r14d, 1                                                        ; +0x83, 0x1000ceb23\ntest    al, 1                                                          ; +0x86, 0x1000ceb26\njz      short loc_1000CEB2E                                            ; +0x88, 0x1000ceb28\nmov     r14, qword ptr [rbp+var_30+8]                                  ; +0x8a, 0x1000ceb2a\njz      short loc_1000CEB39                                            ; +0x8e, 0x1000ceb2e\nmov     rdi, [rbp+__p]; __p                                            ; +0x90, 0x1000ceb30\ncall    __ZdlPv; operator delete(void *)                               ; +0x94, 0x1000ceb34\nlea     r15, [rbx+278h]                                                ; +0x99, 0x1000ceb39\nmov     rdi, [rbx+278h]                                                ; +0xa0, 0x1000ceb40\nmov     esi, 0FFFFFFh                                                  ; +0xa7, 0x1000ceb47\ncall    TextArea__colorAllCharactersTo                                 ; +0xac, 0x1000ceb4c\ntest    r14, r14                                                       ; +0xb1, 0x1000ceb51\njz      short loc_1000CEB97                                            ; +0xb4, 0x1000ceb54\nmov     r14, [rbx+270h]                                                ; +0xb6, 0x1000ceb56\ncall    GJAccountManager__sharedState                                  ; +0xbd, 0x1000ceb5d\ntest    byte ptr [rax+148h], 1                                         ; +0xc2, 0x1000ceb62\njnz     loc_1000CECEC                                                  ; +0xc9, 0x1000ceb69\nadd     rax, 148h                                                      ; +0xcf, 0x1000ceb6f\nmov     rcx, [rax+10h]                                                 ; +0xd5, 0x1000ceb75\nmov     [rbp+__p], rcx                                                 ; +0xd9, 0x1000ceb79\nmovups  xmm0, xmmword ptr [rax]                                        ; +0xdd, 0x1000ceb7d\nmovaps  [rbp+var_30], xmm0                                             ; +0xe0, 0x1000ceb80\ntest    byte ptr [rbp+var_30], 1                                       ; +0xe4, 0x1000ceb84\njnz     loc_1000CED0D                                                  ; +0xe8, 0x1000ceb88\nlea     rsi, [rbp+var_30+1]                                            ; +0xee, 0x1000ceb8e\njmp     loc_1000CED11                                                  ; +0xf2, 0x1000ceb92\ncall    GJAccountManager__sharedState                                  ; +0xf7, 0x1000ceb97\nmov     ecx, [rax+160h]                                                ; +0xfc, 0x1000ceb9c\nmov     r14, [rbx+270h]                                                ; +0x102, 0x1000ceba2\ncmp     ecx, [rax+164h]                                                ; +0x109, 0x1000ceba9\njnz     short loc_1000CEC28                                            ; +0x10f, 0x1000cebaf\nmov     rax, [r14]                                                     ; +0x111, 0x1000cebb1\nlea     rsi, aNotLoggedIn; \"Not logged in\"                             ; +0x114, 0x1000cebb4\nmov     rdi, r14                                                       ; +0x11b, 0x1000cebbb\ncall    qword ptr [rax+390h]                                           ; +0x11e, 0x1000cebbe\nmov     r14, [r15]                                                     ; +0x124, 0x1000cebc4\nmov     edi, 30h ; '0'; __sz                                           ; +0x127, 0x1000cebc7\ncall    __Znwm; operator new(ulong)                                    ; +0x12c, 0x1000cebcc\nmov     [rbp+var_50], rax                                              ; +0x131, 0x1000cebd1\nmov     [rbp+var_60], 31h ; '1'                                        ; +0x135, 0x1000cebd5\nmov     [rbp+var_58], 2Eh ; '.'                                        ; +0x13d, 0x1000cebdd\nmovups  xmm0, xmmword ptr cs:aCreateAnAccoun_0+1Eh; \"d sync your data\" ; +0x145, 0x1000cebe5\nmovups  xmmword ptr [rax+1Eh], xmm0                                    ; +0x14c, 0x1000cebec\nmovups  xmm0, xmmword ptr cs:aCreateAnAccoun_0+10h; \"t to backup\\nand sync your data\" ; +0x150, 0x1000cebf0\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0x157, 0x1000cebf7\nmovups  xmm0, xmmword ptr cs:aCreateAnAccoun_0; \"Create an account to backup\\nand sync y\"... ; +0x15b, 0x1000cebfb\nmovups  xmmword ptr [rax], xmm0                                        ; +0x162, 0x1000cec02\nmov     byte ptr [rax+2Eh], 0                                          ; +0x165, 0x1000cec05\nlea     rsi, [rbp+var_60]                                              ; +0x169, 0x1000cec09\nmov     rdi, r14                                                       ; +0x16d, 0x1000cec0d\ncall    TextArea__setString                                            ; +0x170, 0x1000cec10\ntest    byte ptr [rbp+var_60], 1                                       ; +0x175, 0x1000cec15\njz      loc_1000CED69                                                  ; +0x179, 0x1000cec19\nlea     rax, [rbp+var_50]                                              ; +0x17f, 0x1000cec1f\njmp     loc_1000CED61                                                  ; +0x183, 0x1000cec23\ncall    GJAccountManager__sharedState                                  ; +0x188, 0x1000cec28\ntest    byte ptr [rax+148h], 1                                         ; +0x18d, 0x1000cec2d\njnz     short loc_1000CEC57                                            ; +0x194, 0x1000cec34\nadd     rax, 148h                                                      ; +0x196, 0x1000cec36\nmov     rcx, [rax+10h]                                                 ; +0x19c, 0x1000cec3c\nmov     [rbp+__p], rcx                                                 ; +0x1a0, 0x1000cec40\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x1a4, 0x1000cec44\nmovaps  [rbp+var_30], xmm0                                             ; +0x1a7, 0x1000cec47\ntest    byte ptr [rbp+var_30], 1                                       ; +0x1ab, 0x1000cec4b\njnz     short loc_1000CEC74                                            ; +0x1af, 0x1000cec4f\nlea     rsi, [rbp+var_30+1]                                            ; +0x1b1, 0x1000cec51\njmp     short loc_1000CEC78                                            ; +0x1b5, 0x1000cec55\nmov     rdx, [rax+150h]                                                ; +0x1b7, 0x1000cec57\nmov     rsi, [rax+158h]                                                ; +0x1be, 0x1000cec5e\nlea     rdi, [rbp+var_30]                                              ; +0x1c5, 0x1000cec65\ncall    sub_100006B70                                                  ; +0x1c9, 0x1000cec69\ntest    byte ptr [rbp+var_30], 1                                       ; +0x1ce, 0x1000cec6e\njz      short loc_1000CEC51                                            ; +0x1d2, 0x1000cec72\nmov     rsi, [rbp+__p]                                                 ; +0x1d4, 0x1000cec74\nlea     rdi, aLinkedToAccoun; \"Linked to account: %s\"                  ; +0x1d8, 0x1000cec78\nxor     eax, eax                                                       ; +0x1df, 0x1000cec7f\ncall    sub_1007AB580                                                  ; +0x1e1, 0x1000cec81\nmov     rdi, rax                                                       ; +0x1e6, 0x1000cec86\ncall    cocos2d__CCString__getCString                                  ; +0x1e9, 0x1000cec89\nmov     rcx, [r14]                                                     ; +0x1ee, 0x1000cec8e\nmov     rdi, r14                                                       ; +0x1f1, 0x1000cec91\nmov     rsi, rax                                                       ; +0x1f4, 0x1000cec94\ncall    qword ptr [rcx+390h]                                           ; +0x1f7, 0x1000cec97\ntest    byte ptr [rbp+var_30], 1                                       ; +0x1fd, 0x1000cec9d\njz      short loc_1000CECAC                                            ; +0x201, 0x1000ceca1\nmov     rdi, [rbp+__p]; __p                                            ; +0x203, 0x1000ceca3\ncall    __ZdlPv; operator delete(void *)                               ; +0x207, 0x1000ceca7\nmov     rdi, [r15]                                                     ; +0x20c, 0x1000cecac\nmov     [rbp+var_48], 1Ch                                              ; +0x20f, 0x1000cecaf\nmov     rax, 6572206E69676F4Ch                                         ; +0x213, 0x1000cecb3\nmov     qword ptr [rbp+var_47], rax                                    ; +0x21d, 0x1000cecbd\nmov     rax, 6465726975716572h                                         ; +0x221, 0x1000cecc1\nmov     qword ptr [rbp+var_47+6], rax                                  ; +0x22b, 0x1000ceccb\nmov     [rbp+var_47+0Eh], 0                                            ; +0x22f, 0x1000ceccf\nlea     rsi, [rbp+var_48]                                              ; +0x233, 0x1000cecd3\ncall    TextArea__setString                                            ; +0x237, 0x1000cecd7\ntest    [rbp+var_48], 1                                                ; +0x23c, 0x1000cecdc\njz      loc_1000CED69                                                  ; +0x240, 0x1000cece0\nlea     rax, [rbp+var_47+0Fh]                                          ; +0x246, 0x1000cece6\njmp     short loc_1000CED61                                            ; +0x24a, 0x1000cecea\nmov     rdx, [rax+150h]                                                ; +0x24c, 0x1000cecec\nmov     rsi, [rax+158h]                                                ; +0x253, 0x1000cecf3\nlea     rdi, [rbp+var_30]                                              ; +0x25a, 0x1000cecfa\ncall    sub_100006B70                                                  ; +0x25e, 0x1000cecfe\ntest    byte ptr [rbp+var_30], 1                                       ; +0x263, 0x1000ced03\njz      loc_1000CEB8E                                                  ; +0x267, 0x1000ced07\nmov     rsi, [rbp+__p]                                                 ; +0x26d, 0x1000ced0d\nlea     rdi, aLinkedToAccoun; \"Linked to account: %s\"                  ; +0x271, 0x1000ced11\nxor     eax, eax                                                       ; +0x278, 0x1000ced18\ncall    sub_1007AB580                                                  ; +0x27a, 0x1000ced1a\nmov     rdi, rax                                                       ; +0x27f, 0x1000ced1f\ncall    cocos2d__CCString__getCString                                  ; +0x282, 0x1000ced22\nmov     rcx, [r14]                                                     ; +0x287, 0x1000ced27\nmov     rdi, r14                                                       ; +0x28a, 0x1000ced2a\nmov     rsi, rax                                                       ; +0x28d, 0x1000ced2d\ncall    qword ptr [rcx+390h]                                           ; +0x290, 0x1000ced30\ntest    byte ptr [rbp+var_30], 1                                       ; +0x296, 0x1000ced36\njz      short loc_1000CED45                                            ; +0x29a, 0x1000ced3a\nmov     rdi, [rbp+__p]; __p                                            ; +0x29c, 0x1000ced3c\ncall    __ZdlPv; operator delete(void *)                               ; +0x2a0, 0x1000ced40\nmov     rdi, [r15]                                                     ; +0x2a5, 0x1000ced45\nmov     [rbp+var_78], 0                                                ; +0x2a8, 0x1000ced48\nlea     rsi, [rbp+var_78]                                              ; +0x2ae, 0x1000ced4e\ncall    TextArea__setString                                            ; +0x2b2, 0x1000ced52\ntest    byte ptr [rbp+var_78], 1                                       ; +0x2b7, 0x1000ced57\njz      short loc_1000CED69                                            ; +0x2bb, 0x1000ced5b\nlea     rax, [rbp+var_68]                                              ; +0x2bd, 0x1000ced5d\nmov     rdi, [rax]; __p                                                ; +0x2c1, 0x1000ced61\ncall    __ZdlPv; operator delete(void *)                               ; +0x2c4, 0x1000ced64\nmov     rbx, [rbx+288h]                                                ; +0x2c9, 0x1000ced69\ncall    GJAccountManager__sharedState                                  ; +0x2d0, 0x1000ced70\nmov     ecx, [rax+160h]                                                ; +0x2d5, 0x1000ced75\nxor     esi, esi                                                       ; +0x2db, 0x1000ced7b\ncmp     ecx, [rax+164h]                                                ; +0x2dd, 0x1000ced7d\nsetnz   sil                                                            ; +0x2e3, 0x1000ced83\nmov     rax, [rbx]                                                     ; +0x2e7, 0x1000ced87\nmov     rdi, rbx                                                       ; +0x2ea, 0x1000ced8a\ncall    qword ptr [rax+148h]                                           ; +0x2ed, 0x1000ced8d\nadd     rsp, 68h                                                       ; +0x2f3, 0x1000ced93\npop     rbx                                                            ; +0x2f7, 0x1000ced97\npop     r14                                                            ; +0x2f8, 0x1000ced98\npop     r15                                                            ; +0x2fa, 0x1000ced9a\npop     rbp                                                            ; +0x2fc, 0x1000ced9c\nretn                                                                   ; +0x2fd, 0x1000ced9d", "xrefs": ["AccountHelpLayer::customSetup @ 0x1000ce776", "AccountHelpLayer::accountStatusChanged @ 0x1000cef45", "sub_1000CEF50 @ 0x1000cef5c"], "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"}