{"type": "func", "start": 4296439204, "end": 4296439868, "name": "AccountHelpLayer::updatePage", "pseudocode": "// \n// AccountHelpLayer::updatePage from 0x1001675a4 to 0x10016783c (664 bytes)\n// \n// 3 xrefs:\n// > AccountHelpLayer::customSetup @ 0x1001672f0\n// > AccountHelpLayer::accountStatusChanged @ 0x10016795c\n// > sub_100167960 @ 0x100167964\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  GJAccountManager *v2; // x0\n  TextArea **p_m_textArea; // x21\n  GJAccountManager *v4; // x0\n  __int64 v5; // x20\n  cocos2d::CCLabelBMFont *m_loginStatusLabel; // x20\n  GJAccountManager *v7; // x0\n  GJAccountManager *v8; // x0\n  cocos2d::CCLabelBMFont *v9; // x20\n  __int64 v10; // x20\n  const void **v11; // x8\n  GJAccountManager *v12; // x0\n  const char *v13; // x8\n  cocos2d::CCString *v14; // x0\n  const char *v15; // x0\n  __int64 v16; // x20\n  const char *p_dst; // x8\n  cocos2d::CCString *v18; // x0\n  const char *CString; // x0\n  __int64 v20; // x20\n  CCMenuItemSpriteExtra *m_unlinkAccountButton; // x19\n  GJAccountManager *v22; // x0\n  const void *v23[2]; // [xsp+8h] [xbp-88h] BYREF\n  char v24; // [xsp+1Fh] [xbp-71h]\n  const void *v25[2]; // [xsp+20h] [xbp-70h] BYREF\n  char v26; // [xsp+37h] [xbp-59h]\n  const void *v27[2]; // [xsp+38h] [xbp-58h] BYREF\n  char v28; // [xsp+4Fh] [xbp-41h]\n  __int128 __dst; // [xsp+50h] [xbp-40h] BYREF\n  char *longStorage; // [xsp+60h] [xbp-30h]\n\n  v2 = GJAccountManager::sharedState();\n  if ( v2->m_accountID == v2->m_unkInt1 )\n  {\n    p_m_textArea = &a1->m_textArea;\n    TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)-1);\n  }\n  else\n  {\n    v4 = GJAccountManager::sharedState();\n    if ( v4->m_GJP2.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(&__dst, (void *)v4->m_GJP2.m_data.m_long.capacitym1, v4->m_GJP2.m_data.m_long.size);\n    }\n    else\n    {\n      __dst = *(_OWORD *)&v4->m_GJP2.m_data.m_short.sizex2;\n      longStorage = v4->m_GJP2.m_data.m_long.longStorage;\n    }\n    if ( SHIBYTE(longStorage) >= 0 )\n      v5 = SHIBYTE(longStorage);\n    else\n      v5 = *((_QWORD *)&__dst + 1);\n    if ( (SHIBYTE(longStorage) & 0x8000000000000000LL) != 0 )\n      operator delete((void *)__dst);\n    p_m_textArea = &a1->m_textArea;\n    TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)-1);\n    if ( v5 )\n    {\n      m_loginStatusLabel = a1->m_loginStatusLabel;\n      v7 = GJAccountManager::sharedState();\n      if ( v7->m_username.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      {\n        sub_1000097D0(&__dst, (void *)v7->m_username.m_data.m_long.capacitym1, v7->m_username.m_data.m_long.size);\n      }\n      else\n      {\n        __dst = *(_OWORD *)&v7->m_username.m_data.m_short.sizex2;\n        longStorage = v7->m_username.m_data.m_long.longStorage;\n      }\n      p_dst = (const char *)&__dst;\n      if ( SHIBYTE(longStorage) < 0 )\n        p_dst = (const char *)__dst;\n      v18 = (cocos2d::CCString *)sub_100268F4C(\"Linked to account: %s\", p_dst);\n      CString = cocos2d::CCString::getCString(v18);\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_loginStatusLabel->setString)(\n        m_loginStatusLabel,\n        CString);\n      if ( SHIBYTE(longStorage) < 0 )\n        operator delete((void *)__dst);\n      v20 = (__int64)*p_m_textArea;\n      sub_100009900(v27, \"\");\n      TextArea::setString(v20, v27);\n      if ( v28 < 0 )\n      {\n        v11 = v27;\n        goto LABEL_33;\n      }\n      goto LABEL_34;\n    }\n  }\n  v8 = GJAccountManager::sharedState();\n  v9 = a1->m_loginStatusLabel;\n  if ( v8->m_accountID == v8->m_unkInt1 )\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v9->setString)(\n      a1->m_loginStatusLabel,\n      \"Not logged in\");\n    v10 = (__int64)*p_m_textArea;\n    sub_100009900(v23, \"Create an account to backup\\nand sync your data\");\n    TextArea::setString(v10, v23);\n    if ( v24 < 0 )\n    {\n      v11 = v23;\nLABEL_33:\n      operator delete((void *)*v11);\n    }\n  }\n  else\n  {\n    v12 = GJAccountManager::sharedState();\n    if ( v12->m_username.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(&__dst, (void *)v12->m_username.m_data.m_long.capacitym1, v12->m_username.m_data.m_long.size);\n    }\n    else\n    {\n      __dst = *(_OWORD *)&v12->m_username.m_data.m_short.sizex2;\n      longStorage = v12->m_username.m_data.m_long.longStorage;\n    }\n    v13 = (const char *)&__dst;\n    if ( SHIBYTE(longStorage) < 0 )\n      v13 = (const char *)__dst;\n    v14 = (cocos2d::CCString *)sub_100268F4C(\"Linked to account: %s\", v13);\n    v15 = cocos2d::CCString::getCString(v14);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v9->setString)(v9, v15);\n    if ( SHIBYTE(longStorage) < 0 )\n      operator delete((void *)__dst);\n    v16 = (__int64)*p_m_textArea;\n    sub_100009900(v25, \"Login required\");\n    TextArea::setString(v16, v25);\n    if ( v26 < 0 )\n    {\n      v11 = v25;\n      goto LABEL_33;\n    }\n  }\nLABEL_34:\n  m_unlinkAccountButton = a1->m_unlinkAccountButton;\n  v22 = GJAccountManager::sharedState();\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))m_unlinkAccountButton->setVisible)(\n    m_unlinkAccountButton,\n    v22->m_accountID != v22->m_unkInt1);\n}", "assembly": "; \n; AccountHelpLayer::updatePage from 0x1001675a4 to 0x10016783c (664 bytes)\n; \n; 3 xrefs:\n; > AccountHelpLayer::customSetup @ 0x1001672f0\n; > AccountHelpLayer::accountStatusChanged @ 0x10016795c\n; > sub_100167960 @ 0x100167964\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\nSUB             SP, SP, #0xA0                                          ; +0x0, 0x1001675a4\nSTP             X22, X21, [SP,#0x90+var_20]                            ; +0x4, 0x1001675a8\nSTP             X20, X19, [SP,#0x90+var_10]                            ; +0x8, 0x1001675ac\nSTP             X29, X30, [SP,#0x90+var_s0]                            ; +0xc, 0x1001675b0\nADD             X29, SP, #0x90                                         ; +0x10, 0x1001675b4\nMOV             X19, X0                                                ; +0x14, 0x1001675b8\nBL              GJAccountManager__sharedState                          ; +0x18, 0x1001675bc\nLDR             W8, [X0,#0x160]                                        ; +0x1c, 0x1001675c0\nLDR             W9, [X0,#0x164]                                        ; +0x20, 0x1001675c4\nCMP             W8, W9                                                 ; +0x24, 0x1001675c8\nB.NE            loc_1001675E4                                          ; +0x28, 0x1001675cc\nADD             X21, X19, #0x278                                       ; +0x2c, 0x1001675d0\nLDR             X0, [X19,#0x278]                                       ; +0x30, 0x1001675d4\nMOV             W1, #0xFFFFFF                                          ; +0x34, 0x1001675d8\nBL              TextArea__colorAllCharactersTo                         ; +0x38, 0x1001675dc\nB               loc_100167668                                          ; +0x3c, 0x1001675e0\nBL              GJAccountManager__sharedState                          ; +0x40, 0x1001675e4\nLDRSB           W8, [X0,#0x187]                                        ; +0x44, 0x1001675e8\nTBNZ            W8, #0x1F, loc_100167604                               ; +0x48, 0x1001675ec\nLDR             Q0, [X0,#0x170]                                        ; +0x4c, 0x1001675f0\nSTUR            Q0, [X29,#__dst]                                       ; +0x50, 0x1001675f4\nLDR             X8, [X0,#0x180]                                        ; +0x54, 0x1001675f8\nSTUR            X8, [X29,#var_30]                                      ; +0x58, 0x1001675fc\nB               loc_100167610                                          ; +0x5c, 0x100167600\nLDP             X1, X2, [X0,#0x170]; __src                             ; +0x60, 0x100167604\nSUB             X0, X29, #-__dst; __dst                                ; +0x64, 0x100167608\nBL              sub_1000097D0                                          ; +0x68, 0x10016760c\nLDURSB          X8, [X29,#var_30+7]                                    ; +0x6c, 0x100167610\nLDUR            X9, [X29,#__dst+8]                                     ; +0x70, 0x100167614\nCMP             W8, #0                                                 ; +0x74, 0x100167618\nCSEL            X20, X9, X8, LT                                        ; +0x78, 0x10016761c\nTBZ             X8, #0x3F, loc_10016762C ; '?'                         ; +0x7c, 0x100167620\nLDUR            X0, [X29,#__dst]; __p                                  ; +0x80, 0x100167624\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x100167628\nADD             X21, X19, #0x278                                       ; +0x88, 0x10016762c\nLDR             X0, [X19,#0x278]                                       ; +0x8c, 0x100167630\nMOV             W1, #0xFFFFFF                                          ; +0x90, 0x100167634\nBL              TextArea__colorAllCharactersTo                         ; +0x94, 0x100167638\nCBZ             X20, loc_100167668                                     ; +0x98, 0x10016763c\nLDR             X20, [X19,#0x270]                                      ; +0x9c, 0x100167640\nBL              GJAccountManager__sharedState                          ; +0xa0, 0x100167644\nLDRSB           W8, [X0,#0x15F]                                        ; +0xa4, 0x100167648\nTBNZ            W8, #0x1F, loc_100167774                               ; +0xa8, 0x10016764c\nADD             X8, X0, #0x148                                         ; +0xac, 0x100167650\nLDR             Q0, [X8]                                               ; +0xb0, 0x100167654\nSTUR            Q0, [X29,#__dst]                                       ; +0xb4, 0x100167658\nLDR             X8, [X8,#0x10]                                         ; +0xb8, 0x10016765c\nSTUR            X8, [X29,#var_30]                                      ; +0xbc, 0x100167660\nB               loc_100167780                                          ; +0xc0, 0x100167664\nBL              GJAccountManager__sharedState                          ; +0xc4, 0x100167668\nLDR             W8, [X0,#0x160]                                        ; +0xc8, 0x10016766c\nLDR             W9, [X0,#0x164]                                        ; +0xcc, 0x100167670\nLDR             X20, [X19,#0x270]                                      ; +0xd0, 0x100167674\nCMP             W8, W9                                                 ; +0xd4, 0x100167678\nB.NE            loc_1001676C8                                          ; +0xd8, 0x10016767c\nLDR             X8, [X20]                                              ; +0xdc, 0x100167680\nLDR             X8, [X8,#0x390]                                        ; +0xe0, 0x100167684\nADRL            X1, aNotLoggedIn; \"Not logged in\"                      ; +0xe4, 0x100167688\nMOV             X0, X20                                                ; +0xec, 0x100167690\nBLR             X8                                                     ; +0xf0, 0x100167694\nLDR             X20, [X21]                                             ; +0xf4, 0x100167698\nADRL            X1, aCreateAnAccoun_0; \"Create an account to backup\\nand sync y\"... ; +0xf8, 0x10016769c\nADD             X0, SP, #0x90+var_88; int                              ; +0x100, 0x1001676a4\nBL              sub_100009900                                          ; +0x104, 0x1001676a8\nADD             X1, SP, #0x90+var_88                                   ; +0x108, 0x1001676ac\nMOV             X0, X20                                                ; +0x10c, 0x1001676b0\nBL              TextArea__setString                                    ; +0x110, 0x1001676b4\nLDRSB           W8, [SP,#0x90+var_71]                                  ; +0x114, 0x1001676b8\nTBZ             W8, #0x1F, loc_100167800                               ; +0x118, 0x1001676bc\nADD             X8, SP, #0x90+var_88                                   ; +0x11c, 0x1001676c0\nB               loc_1001677F8                                          ; +0x120, 0x1001676c4\nBL              GJAccountManager__sharedState                          ; +0x124, 0x1001676c8\nLDRSB           W8, [X0,#0x15F]                                        ; +0x128, 0x1001676cc\nTBNZ            W8, #0x1F, loc_1001676EC                               ; +0x12c, 0x1001676d0\nADD             X8, X0, #0x148                                         ; +0x130, 0x1001676d4\nLDR             Q0, [X8]                                               ; +0x134, 0x1001676d8\nSTUR            Q0, [X29,#__dst]                                       ; +0x138, 0x1001676dc\nLDR             X8, [X8,#0x10]                                         ; +0x13c, 0x1001676e0\nSTUR            X8, [X29,#var_30]                                      ; +0x140, 0x1001676e4\nB               loc_1001676F8                                          ; +0x144, 0x1001676e8\nLDP             X1, X2, [X0,#0x148]; __src                             ; +0x148, 0x1001676ec\nSUB             X0, X29, #-__dst; __dst                                ; +0x14c, 0x1001676f0\nBL              sub_1000097D0                                          ; +0x150, 0x1001676f4\nLDURSB          W8, [X29,#var_30+7]                                    ; +0x154, 0x1001676f8\nLDUR            X9, [X29,#__dst]                                       ; +0x158, 0x1001676fc\nCMP             W8, #0                                                 ; +0x15c, 0x100167700\nSUB             X8, X29, #-__dst                                       ; +0x160, 0x100167704\nCSEL            X8, X9, X8, LT                                         ; +0x164, 0x100167708\nSTR             X8, [SP,#0x90+var_90]                                  ; +0x168, 0x10016770c\nADRL            X0, aLinkedToAccoun; \"Linked to account: %s\"           ; +0x16c, 0x100167710\nBL              sub_100268F4C                                          ; +0x174, 0x100167718\nBL              cocos2d__CCString__getCString                          ; +0x178, 0x10016771c\nMOV             X1, X0                                                 ; +0x17c, 0x100167720\nLDR             X8, [X20]                                              ; +0x180, 0x100167724\nLDR             X8, [X8,#0x390]                                        ; +0x184, 0x100167728\nMOV             X0, X20                                                ; +0x188, 0x10016772c\nBLR             X8                                                     ; +0x18c, 0x100167730\nLDURSB          W8, [X29,#var_30+7]                                    ; +0x190, 0x100167734\nTBZ             W8, #0x1F, loc_100167744                               ; +0x194, 0x100167738\nLDUR            X0, [X29,#__dst]; __p                                  ; +0x198, 0x10016773c\nBL              __ZdlPv; operator delete(void *)                       ; +0x19c, 0x100167740\nLDR             X20, [X21]                                             ; +0x1a0, 0x100167744\nADRL            X1, aLoginRequired; \"Login required\"                   ; +0x1a4, 0x100167748\nADD             X0, SP, #0x90+var_70; int                              ; +0x1ac, 0x100167750\nBL              sub_100009900                                          ; +0x1b0, 0x100167754\nADD             X1, SP, #0x90+var_70                                   ; +0x1b4, 0x100167758\nMOV             X0, X20                                                ; +0x1b8, 0x10016775c\nBL              TextArea__setString                                    ; +0x1bc, 0x100167760\nLDRSB           W8, [SP,#0x90+var_59]                                  ; +0x1c0, 0x100167764\nTBZ             W8, #0x1F, loc_100167800                               ; +0x1c4, 0x100167768\nADD             X8, SP, #0x90+var_70                                   ; +0x1c8, 0x10016776c\nB               loc_1001677F8                                          ; +0x1cc, 0x100167770\nLDP             X1, X2, [X0,#0x148]; __src                             ; +0x1d0, 0x100167774\nSUB             X0, X29, #-__dst; __dst                                ; +0x1d4, 0x100167778\nBL              sub_1000097D0                                          ; +0x1d8, 0x10016777c\nLDURSB          W8, [X29,#var_30+7]                                    ; +0x1dc, 0x100167780\nLDUR            X9, [X29,#__dst]                                       ; +0x1e0, 0x100167784\nCMP             W8, #0                                                 ; +0x1e4, 0x100167788\nSUB             X8, X29, #-__dst                                       ; +0x1e8, 0x10016778c\nCSEL            X8, X9, X8, LT                                         ; +0x1ec, 0x100167790\nSTR             X8, [SP,#0x90+var_90]                                  ; +0x1f0, 0x100167794\nADRL            X0, aLinkedToAccoun; \"Linked to account: %s\"           ; +0x1f4, 0x100167798\nBL              sub_100268F4C                                          ; +0x1fc, 0x1001677a0\nBL              cocos2d__CCString__getCString                          ; +0x200, 0x1001677a4\nMOV             X1, X0                                                 ; +0x204, 0x1001677a8\nLDR             X8, [X20]                                              ; +0x208, 0x1001677ac\nLDR             X8, [X8,#0x390]                                        ; +0x20c, 0x1001677b0\nMOV             X0, X20                                                ; +0x210, 0x1001677b4\nBLR             X8                                                     ; +0x214, 0x1001677b8\nLDURSB          W8, [X29,#var_30+7]                                    ; +0x218, 0x1001677bc\nTBZ             W8, #0x1F, loc_1001677CC                               ; +0x21c, 0x1001677c0\nLDUR            X0, [X29,#__dst]; __p                                  ; +0x220, 0x1001677c4\nBL              __ZdlPv; operator delete(void *)                       ; +0x224, 0x1001677c8\nLDR             X20, [X21]                                             ; +0x228, 0x1001677cc\nADRL            X1, asc_100746688; \"\"                                  ; +0x22c, 0x1001677d0\nADD             X0, SP, #0x90+var_58; int                              ; +0x234, 0x1001677d8\nBL              sub_100009900                                          ; +0x238, 0x1001677dc\nADD             X1, SP, #0x90+var_58                                   ; +0x23c, 0x1001677e0\nMOV             X0, X20                                                ; +0x240, 0x1001677e4\nBL              TextArea__setString                                    ; +0x244, 0x1001677e8\nLDRSB           W8, [SP,#0x90+var_41]                                  ; +0x248, 0x1001677ec\nTBZ             W8, #0x1F, loc_100167800                               ; +0x24c, 0x1001677f0\nADD             X8, SP, #0x90+var_58                                   ; +0x250, 0x1001677f4\nLDR             X0, [X8]; __p                                          ; +0x254, 0x1001677f8\nBL              __ZdlPv; operator delete(void *)                       ; +0x258, 0x1001677fc\nLDR             X19, [X19,#0x288]                                      ; +0x25c, 0x100167800\nBL              GJAccountManager__sharedState                          ; +0x260, 0x100167804\nLDR             W8, [X0,#0x160]                                        ; +0x264, 0x100167808\nLDR             W9, [X0,#0x164]                                        ; +0x268, 0x10016780c\nCMP             W8, W9                                                 ; +0x26c, 0x100167810\nCSET            W1, NE                                                 ; +0x270, 0x100167814\nLDR             X8, [X19]                                              ; +0x274, 0x100167818\nLDR             X8, [X8,#0x148]                                        ; +0x278, 0x10016781c\nMOV             X0, X19                                                ; +0x27c, 0x100167820\nBLR             X8                                                     ; +0x280, 0x100167824\nLDP             X29, X30, [SP,#0x90+var_s0]                            ; +0x284, 0x100167828\nLDP             X20, X19, [SP,#0x90+var_10]                            ; +0x288, 0x10016782c\nLDP             X22, X21, [SP,#0x90+var_20]                            ; +0x28c, 0x100167830\nADD             SP, SP, #0xA0                                          ; +0x290, 0x100167834\nRET                                                                    ; +0x294, 0x100167838", "xrefs": ["AccountHelpLayer::customSetup @ 0x1001672f0", "AccountHelpLayer::accountStatusChanged @ 0x10016795c", "sub_100167960 @ 0x100167964"], "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"}