{"type": "func", "start": 4618076, "end": 4618458, "name": "AccountHelpLayer::updatePage", "pseudocode": "// \n// AccountHelpLayer::updatePage from 0x46775c to 0x4678da (382 bytes)\n// \n// 2 xrefs:\n// > AccountHelpLayer::customSetup @ 0x467b76\n// > AccountHelpLayer::accountStatusChanged @ 0x467bf8\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 AccountHelpLayer::updatePage(AccountHelpLayer *a1)\n{\n  GJAccountManager *v2; // r0\n  _BOOL4 v3; // r6\n  cocos2d::CCLabelBMFont *m_loginStatusLabel; // r6\n  void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r9\n  cocos2d::CCString *v6; // r0\n  const char *CString; // r0\n  TextArea *m_textArea; // r6\n  GJAccountManager *v9; // r0\n  cocos2d::CCLabelBMFont *v10; // r6\n  cocos2d::CCLabelBMFont_vtbl *v11; // r3\n  void (__fastcall *v12)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r9\n  cocos2d::CCString *v13; // r0\n  const char *v14; // r0\n  TextArea *v15; // r6\n  CCMenuItemSpriteExtra *m_unlinkAccountButton; // r4\n  void (__fastcall *setVisible)(cocos2d::CCNode *__hidden, bool); // r5\n  GJAccountManager *v18; // r0\n  char *v19; // [sp+8h] [bp-Ch] BYREF\n\n  v2 = GJAccountManager::sharedState();\n  if ( v2->m_accountID == v2->m_unkInt1 )\n  {\n    v3 = 0;\n  }\n  else\n  {\n    GJAccountManager::sharedState();\n    sub_775C20(&v19);\n    v3 = *((_DWORD *)v19 - 3) != 0;\n    sub_774008(&v19);\n  }\n  TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)-1);\n  if ( v3 )\n  {\n    m_loginStatusLabel = a1->m_loginStatusLabel;\n    setString = m_loginStatusLabel->setString;\n    GJAccountManager::sharedState();\n    sub_775C20(&v19);\n    v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"Linked to account: %s\", v19);\n    CString = cocos2d::CCString::getCString(v6);\n    setString(m_loginStatusLabel, (const unsigned __int8 *)CString);\n    sub_774008(&v19);\n    m_textArea = a1->m_textArea;\n    sub_776584((int)&v19, (char *)&unk_939830);\n    TextArea::setString((int)m_textArea, &v19);\n  }\n  else\n  {\n    v9 = GJAccountManager::sharedState();\n    v10 = a1->m_loginStatusLabel;\n    v11 = v10->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    if ( v9->m_accountID == v9->m_unkInt1 )\n    {\n      v11->setString(a1->m_loginStatusLabel, \"Not logged in\");\n      v15 = a1->m_textArea;\n      sub_776584((int)&v19, \"Create an account to backup\\nand sync your data\");\n    }\n    else\n    {\n      v12 = v11->setString;\n      GJAccountManager::sharedState();\n      sub_775C20(&v19);\n      v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"Linked to account: %s\", v19);\n      v14 = cocos2d::CCString::getCString(v13);\n      v12(v10, (const unsigned __int8 *)v14);\n      sub_774008(&v19);\n      v15 = a1->m_textArea;\n      sub_776584((int)&v19, \"Login required\");\n    }\n    TextArea::setString((int)v15, &v19);\n  }\n  sub_774008(&v19);\n  m_unlinkAccountButton = a1->m_unlinkAccountButton;\n  setVisible = m_unlinkAccountButton->setVisible;\n  v18 = GJAccountManager::sharedState();\n  setVisible(m_unlinkAccountButton, v18->m_accountID != v18->m_unkInt1);\n}", "assembly": "; \n; AccountHelpLayer::updatePage from 0x46775c to 0x4678da (382 bytes)\n; \n; 2 xrefs:\n; > AccountHelpLayer::customSetup @ 0x467b76\n; > AccountHelpLayer::accountStatusChanged @ 0x467bf8\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-R9,LR}                                             ; +0x0, 0x46775c\nSUB             SP, SP, #0x14                                          ; +0x4, 0x467760\nLDR             R7, =(__stack_chk_guard_ptr - 0x46776C)                ; +0x6, 0x467762\nMOV             R5, R0                                                 ; +0x8, 0x467764\nADD             R4, SP, #0x14+var_C                                    ; +0xa, 0x467766\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xc, 0x467768\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xe, 0x46776a\nLDR             R3, [R7]                                               ; +0x10, 0x46776c\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x12, 0x46776e\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x14, 0x467770\nLDR.W           R2, [R0,#0x110]                                        ; +0x18, 0x467774\nLDR.W           R3, [R0,#0x114]                                        ; +0x1c, 0x467778\nCMP             R2, R3                                                 ; +0x20, 0x46777c\nBEQ             loc_4677A2                                             ; +0x22, 0x46777e\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x24, 0x467780\nADD.W           R1, R0, #0x11C                                         ; +0x28, 0x467784\nMOV             R0, R4                                                 ; +0x2c, 0x467788\nBL              sub_775C20                                             ; +0x2e, 0x46778a\nLDR             R3, [SP,#0x14+var_C]                                   ; +0x32, 0x46778e\nMOV             R0, R4                                                 ; +0x34, 0x467790\nLDR.W           R6, [R3,#-0xC]                                         ; +0x36, 0x467792\nADDS            R6, #0                                                 ; +0x3a, 0x467796\nIT NE                                                                  ; +0x3c, 0x467798\nMOVNE           R6, #1                                                 ; +0x3e, 0x46779a\nBL              sub_774008                                             ; +0x40, 0x46779c\nB               loc_4677A4                                             ; +0x44, 0x4677a0\nMOVS            R6, #0                                                 ; +0x46, 0x4677a2\nLDR             R2, =(byte_9ABE98 - 0x4677B2)                          ; +0x48, 0x4677a4\nADD.W           R8, SP, #0x14+var_10                                   ; +0x4a, 0x4677a6\nLDR.W           R0, [R5,#0x1EC]                                        ; +0x4e, 0x4677aa\nADD             R2, PC; byte_9ABE98                                    ; +0x52, 0x4677ae\nLDRB            R1, [R2,#(byte_9ABE99 - 0x9ABE98)]                     ; +0x54, 0x4677b0\nLDRB            R3, [R2]                                               ; +0x56, 0x4677b2\nORR.W           R3, R3, R1,LSL#8                                       ; +0x58, 0x4677b4\nLDRB            R1, [R2,#(byte_9ABE9A - 0x9ABE98)]                     ; +0x5c, 0x4677b8\nORR.W           R1, R3, R1,LSL#16                                      ; +0x5e, 0x4677ba\nBL              _ZN8TextArea20colorAllCharactersToEN7cocos2d10_ccColor3BE; TextArea::colorAllCharactersTo(cocos2d::_ccColor3B) ; +0x62, 0x4677be\nCBZ             R6, loc_467810                                         ; +0x66, 0x4677c2\nLDR.W           R6, [R5,#0x1E8]                                        ; +0x68, 0x4677c4\nLDR             R3, [R6]                                               ; +0x6c, 0x4677c8\nLDR.W           R9, [R3,#0x1C8]                                        ; +0x6e, 0x4677ca\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x72, 0x4677ce\nADD.W           R1, R0, #0x10C                                         ; +0x76, 0x4677d2\nMOV             R0, R4                                                 ; +0x7a, 0x4677d6\nBL              sub_775C20                                             ; +0x7c, 0x4677d8\nLDR             R0, =(aLinkedToAccoun - 0x4677E4); \"Linked to account: %s\" ; +0x80, 0x4677dc\nLDR             R1, [SP,#0x14+var_C]; char *                           ; +0x82, 0x4677de\nADD             R0, PC; \"Linked to account: %s\"                        ; +0x84, 0x4677e0\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x86, 0x4677e2\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x8a, 0x4677e6\nMOV             R1, R0                                                 ; +0x8e, 0x4677ea\nMOV             R0, R6                                                 ; +0x90, 0x4677ec\nBLX             R9                                                     ; +0x92, 0x4677ee\nMOV             R0, R4                                                 ; +0x94, 0x4677f0\nBL              sub_774008                                             ; +0x96, 0x4677f2\nLDR.W           R6, [R5,#0x1EC]                                        ; +0x9a, 0x4677f6\nLDR             R1, =(unk_939830 - 0x467804)                           ; +0x9e, 0x4677fa\nMOV             R0, R4; int                                            ; +0xa0, 0x4677fc\nMOV             R2, R8                                                 ; +0xa2, 0x4677fe\nADD             R1, PC; unk_939830 ; char *                            ; +0xa4, 0x467800\nBL              sub_776584                                             ; +0xa6, 0x467802\nMOV             R0, R6                                                 ; +0xaa, 0x467806\nMOV             R1, R4                                                 ; +0xac, 0x467808\nBL              _ZN8TextArea9setStringESs; TextArea::setString(std::string) ; +0xae, 0x46780a\nB               loc_467890                                             ; +0xb2, 0x46780e\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0xb4, 0x467810\nLDR.W           R6, [R5,#0x1E8]                                        ; +0xb8, 0x467814\nLDR.W           R3, [R0,#0x114]                                        ; +0xbc, 0x467818\nLDR.W           R2, [R0,#0x110]                                        ; +0xc0, 0x46781c\nCMP             R2, R3                                                 ; +0xc4, 0x467820\nLDR             R3, [R6]                                               ; +0xc6, 0x467822\nBEQ             loc_46786C                                             ; +0xc8, 0x467824\nLDR.W           R9, [R3,#0x1C8]                                        ; +0xca, 0x467826\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0xce, 0x46782a\nADD.W           R1, R0, #0x10C                                         ; +0xd2, 0x46782e\nMOV             R0, R4                                                 ; +0xd6, 0x467832\nBL              sub_775C20                                             ; +0xd8, 0x467834\nLDR             R0, =(aLinkedToAccoun - 0x467840); \"Linked to account: %s\" ; +0xdc, 0x467838\nLDR             R1, [SP,#0x14+var_C]; char *                           ; +0xde, 0x46783a\nADD             R0, PC; \"Linked to account: %s\"                        ; +0xe0, 0x46783c\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xe2, 0x46783e\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xe6, 0x467842\nMOV             R1, R0                                                 ; +0xea, 0x467846\nMOV             R0, R6                                                 ; +0xec, 0x467848\nBLX             R9                                                     ; +0xee, 0x46784a\nMOV             R0, R4                                                 ; +0xf0, 0x46784c\nBL              sub_774008                                             ; +0xf2, 0x46784e\nLDR.W           R6, [R5,#0x1EC]                                        ; +0xf6, 0x467852\nLDR             R1, =(aLoginRequired - 0x467860); \"Login required\"     ; +0xfa, 0x467856\nMOV             R0, R4; int                                            ; +0xfc, 0x467858\nMOV             R2, R8                                                 ; +0xfe, 0x46785a\nADD             R1, PC; \"Login required\"                               ; +0x100, 0x46785c\nBL              sub_776584                                             ; +0x102, 0x46785e\nMOV             R0, R6                                                 ; +0x106, 0x467862\nMOV             R1, R4                                                 ; +0x108, 0x467864\nBL              _ZN8TextArea9setStringESs; TextArea::setString(std::string) ; +0x10a, 0x467866\nB               loc_467890                                             ; +0x10e, 0x46786a\nLDR             R1, =(aNotLoggedIn - 0x467878); \"Not logged in\"        ; +0x110, 0x46786c\nMOV             R0, R6                                                 ; +0x112, 0x46786e\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x114, 0x467870\nADD             R1, PC; \"Not logged in\"                                ; +0x118, 0x467874\nBLX             R3                                                     ; +0x11a, 0x467876\nLDR.W           R6, [R5,#0x1EC]                                        ; +0x11c, 0x467878\nLDR             R1, =(aCreateAnAccoun_0 - 0x467886); \"Create an account to backup\\nand sync y\"... ; +0x120, 0x46787c\nMOV             R0, R4; int                                            ; +0x122, 0x46787e\nMOV             R2, R8                                                 ; +0x124, 0x467880\nADD             R1, PC; \"Create an account to backup\\nand sync y\"...   ; +0x126, 0x467882\nBL              sub_776584                                             ; +0x128, 0x467884\nMOV             R0, R6                                                 ; +0x12c, 0x467888\nMOV             R1, R4                                                 ; +0x12e, 0x46788a\nBL              _ZN8TextArea9setStringESs; TextArea::setString(std::string) ; +0x130, 0x46788c\nMOV             R0, R4                                                 ; +0x134, 0x467890\nBL              sub_774008                                             ; +0x136, 0x467892\nLDR.W           R4, [R5,#0x1F4]                                        ; +0x13a, 0x467896\nLDR             R3, [R4]                                               ; +0x13e, 0x46789a\nLDR.W           R5, [R3,#0xA4]                                         ; +0x140, 0x46789c\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x144, 0x4678a0\nLDR.W           R3, [R0,#0x114]                                        ; +0x148, 0x4678a4\nLDR.W           R1, [R0,#0x110]                                        ; +0x14c, 0x4678a8\nMOV             R0, R4                                                 ; +0x150, 0x4678ac\nSUBS            R1, R1, R3                                             ; +0x152, 0x4678ae\nIT NE                                                                  ; +0x154, 0x4678b0\nMOVNE           R1, #1                                                 ; +0x156, 0x4678b2\nBLX             R5                                                     ; +0x158, 0x4678b4\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x15a, 0x4678b6\nLDR             R3, [R7]                                               ; +0x15c, 0x4678b8\nCMP             R2, R3                                                 ; +0x15e, 0x4678ba\nBEQ             loc_4678D4                                             ; +0x160, 0x4678bc\nBLX             __stack_chk_fail                                       ; +0x162, 0x4678be\nB               loc_4678C4                                             ; +0x166, 0x4678c2\nMOV             R0, R4                                                 ; +0x168, 0x4678c4\nBL              sub_774008                                             ; +0x16a, 0x4678c6\nBL              __cxa_end_cleanup                                      ; +0x16e, 0x4678ca\nB               loc_4678C4                                             ; +0x172, 0x4678ce\nB               loc_4678C4                                             ; +0x174, 0x4678d0\nB               loc_4678C4                                             ; +0x176, 0x4678d2\nADD             SP, SP, #0x14                                          ; +0x178, 0x4678d4\nPOP.W           {R4-R9,PC}                                             ; +0x17a, 0x4678d6", "xrefs": ["AccountHelpLayer::customSetup @ 0x467b76", "AccountHelpLayer::accountStatusChanged @ 0x467bf8"], "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"}