{"type": "func", "start": 5788388, "end": 5788826, "name": "AccountHelpLayer::updatePage", "pseudocode": "// \n// AccountHelpLayer::updatePage from 0x5852e4 to 0x58549a (438 bytes)\n// \n// 2 xrefs:\n// > AccountHelpLayer::accountStatusChanged @ 0x5854bc\n// > AccountHelpLayer::customSetup @ 0x58574e\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:57 +0000\n// \n\nint __fastcall AccountHelpLayer::updatePage(AccountHelpLayer *this, int a2, char *a3, int a4)\n{\n  GJAccountManager *v5; // r0\n  int v6; // r0\n  int v7; // r5\n  _BOOL4 v8; // r5\n  GJAccountManager *v9; // r0\n  int v10; // r5\n  void (__fastcall *v11)(int, int); // r7\n  int v12; // r0\n  char *v13; // r1\n  cocos2d::CCString *v14; // r0\n  int CString; // r0\n  int v16; // r5\n  GJAccountManager *v17; // r0\n  int *v18; // r7\n  int v19; // r3\n  void (__fastcall *v20)(int *, int); // r5\n  int v21; // r0\n  char *v22; // r1\n  cocos2d::CCString *v23; // r0\n  int v24; // r0\n  int v25; // r5\n  int v26; // r7\n  GJAccountManager *v27; // r0\n  int v28; // r4\n  int (__fastcall *v29)(int, bool); // r5\n  int v30; // r0\n  AccountHelpLayer *v32; // [sp+0h] [bp-10h] BYREF\n  int v33; // [sp+4h] [bp-Ch]\n  char *v34; // [sp+8h] [bp-8h]\n  int v35; // [sp+Ch] [bp-4h]\n\n  v32 = this;\n  v33 = a2;\n  v34 = a3;\n  v35 = a4;\n  v5 = (GJAccountManager *)GJAccountManager::sharedState(this);\n  if ( *((_DWORD *)v5 + 70) == *((_DWORD *)v5 + 71) )\n  {\n    v8 = 0;\n  }\n  else\n  {\n    v6 = GJAccountManager::sharedState(v5);\n    std::string::basic_string((int *)&v32, v6 + 292);\n    if ( ((unsigned __int8)v32 & 1) != 0 )\n      v7 = v33;\n    else\n      v7 = (int)(unsigned __int8)v32 >> 1;\n    v8 = v7 != 0;\n    std::string::~string((int)&v32);\n  }\n  v9 = (GJAccountManager *)TextArea::colorAllCharactersTo(*((_DWORD *)this + 123), 0xFFFFFF);\n  if ( v8 )\n  {\n    v10 = *((_DWORD *)this + 122);\n    v11 = *(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 464);\n    v12 = GJAccountManager::sharedState(v9);\n    std::string::basic_string((int *)&v32, v12 + 268);\n    if ( ((unsigned __int8)v32 & 1) != 0 )\n      v13 = v34;\n    else\n      v13 = (char *)&v32 + 1;\n    v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                 (cocos2d::CCString *)\"Linked to account: %s\",\n                                 v13,\n                                 (unsigned __int8)v32 << 31);\n    CString = cocos2d::CCString::getCString(v14);\n    v11(v10, CString);\n    std::string::~string((int)&v32);\n    v16 = *((_DWORD *)this + 123);\n    v32 = nullptr;\n    v33 = 0;\n    v34 = nullptr;\n    std::string::__init((int *)&v32, &unk_B6B226, 0);\n    TextArea::setString(v16, &v32);\n  }\n  else\n  {\n    v17 = (GJAccountManager *)GJAccountManager::sharedState(v9);\n    v18 = *((int **)this + 122);\n    v19 = *v18;\n    if ( *((_DWORD *)v17 + 70) == *((_DWORD *)v17 + 71) )\n    {\n      (*(void (__fastcall **)(_DWORD, const char *))(v19 + 464))(*((_DWORD *)this + 122), \"Not logged in\");\n      v26 = *((_DWORD *)this + 123);\n      v32 = nullptr;\n      v33 = 0;\n      v34 = nullptr;\n      std::string::__init((int *)&v32, \"Create an account to backup\\nand sync your data\", 0x2Eu);\n      TextArea::setString(v26, &v32);\n    }\n    else\n    {\n      v20 = *(void (__fastcall **)(int *, int))(v19 + 464);\n      v21 = GJAccountManager::sharedState(v17);\n      std::string::basic_string((int *)&v32, v21 + 268);\n      if ( ((unsigned __int8)v32 & 1) != 0 )\n        v22 = v34;\n      else\n        v22 = (char *)&v32 + 1;\n      v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"Linked to account: %s\", v22);\n      v24 = cocos2d::CCString::getCString(v23);\n      v20(v18, v24);\n      std::string::~string((int)&v32);\n      v25 = *((_DWORD *)this + 123);\n      v32 = nullptr;\n      v33 = 0;\n      v34 = nullptr;\n      std::string::__init((int *)&v32, \"Login required\", 0xEu);\n      TextArea::setString(v25, &v32);\n    }\n  }\n  v27 = (GJAccountManager *)std::string::~string((int)&v32);\n  v28 = *((_DWORD *)this + 125);\n  v29 = *(int (__fastcall **)(int, bool))(*(_DWORD *)v28 + 172);\n  v30 = GJAccountManager::sharedState(v27);\n  return v29(v28, *(_DWORD *)(v30 + 280) != *(_DWORD *)(v30 + 284));\n}", "assembly": "; \n; AccountHelpLayer::updatePage from 0x5852e4 to 0x58549a (438 bytes)\n; \n; 2 xrefs:\n; > AccountHelpLayer::accountStatusChanged @ 0x5854bc\n; > AccountHelpLayer::customSetup @ 0x58574e\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:57 +0000\n; \nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x5852e4\nMOV             R6, R0                                                 ; +0x4, 0x5852e8\nLDR.W           R8, =(__stack_chk_guard_ptr - 0x5852F4)                ; +0x6, 0x5852ea\nMOV             R4, SP                                                 ; +0xa, 0x5852ee\nADD             R8, PC; __stack_chk_guard_ptr                          ; +0xc, 0x5852f0\nLDR.W           R8, [R8]; __stack_chk_guard                            ; +0xe, 0x5852f2\nLDR.W           R3, [R8]                                               ; +0x12, 0x5852f6\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x16, 0x5852fa\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x18, 0x5852fc\nLDR.W           R2, [R0,#0x118]                                        ; +0x1c, 0x585300\nLDR.W           R3, [R0,#0x11C]                                        ; +0x20, 0x585304\nCMP             R2, R3                                                 ; +0x24, 0x585308\nBEQ             loc_585334                                             ; +0x26, 0x58530a\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x28, 0x58530c\nADD.W           R1, R0, #0x124                                         ; +0x2c, 0x585310\nMOV             R0, SP                                                 ; +0x30, 0x585314\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x32, 0x585316\nLDRB.W          R5, [SP,#0x10+var_10]                                  ; +0x36, 0x58531a\nMOV             R0, SP                                                 ; +0x3a, 0x58531e\nLSLS            R1, R5, #0x1F                                          ; +0x3c, 0x585320\nITE PL                                                                 ; +0x3e, 0x585322\nASRPL           R5, R5, #1                                             ; +0x40, 0x585324\nLDRMI           R5, [SP,#0x10+var_C]                                   ; +0x42, 0x585326\nADDS            R5, #0                                                 ; +0x44, 0x585328\nIT NE                                                                  ; +0x46, 0x58532a\nMOVNE           R5, #1                                                 ; +0x48, 0x58532c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x4a, 0x58532e\nB               loc_585336                                             ; +0x4e, 0x585332\nMOVS            R5, #0                                                 ; +0x50, 0x585334\nLDR             R2, =(byte_BED88C - 0x585340)                          ; +0x52, 0x585336\nLDR.W           R0, [R6,#0x1EC]                                        ; +0x54, 0x585338\nADD             R2, PC; byte_BED88C                                    ; +0x58, 0x58533c\nLDRB            R1, [R2,#(byte_BED890 - 0xBED88C)]                     ; +0x5a, 0x58533e\nLDRB            R3, [R2,#(byte_BED88F - 0xBED88C)]                     ; +0x5c, 0x585340\nORR.W           R3, R3, R1,LSL#8                                       ; +0x5e, 0x585342\nLDRB            R1, [R2,#(byte_BED891 - 0xBED88C)]                     ; +0x62, 0x585346\nORR.W           R1, R3, R1,LSL#16                                      ; +0x64, 0x585348\nBL              _ZN8TextArea20colorAllCharactersToEN7cocos2d10_ccColor3BE; TextArea::colorAllCharactersTo(cocos2d::_ccColor3B) ; +0x68, 0x58534c\nCBZ             R5, loc_5853B2                                         ; +0x6c, 0x585350\nLDR.W           R5, [R6,#0x1E8]                                        ; +0x6e, 0x585352\nLDR             R3, [R5]                                               ; +0x72, 0x585356\nLDR.W           R7, [R3,#0x1D0]                                        ; +0x74, 0x585358\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x78, 0x58535c\nADD.W           R1, R0, #0x10C                                         ; +0x7c, 0x585360\nMOV             R0, R4                                                 ; +0x80, 0x585364\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x82, 0x585366\nLDRB.W          R3, [SP,#0x10+var_10]                                  ; +0x86, 0x58536a\nLDR             R0, =(aLinkedToAccoun - 0x58537C); \"Linked to account: %s\" ; +0x8a, 0x58536e\nLSLS            R2, R3, #0x1F                                          ; +0x8c, 0x585370\nIT PL                                                                  ; +0x8e, 0x585372\nADDPL.W         R1, SP, #0x10+var_10+1                                 ; +0x90, 0x585374\nADD             R0, PC; \"Linked to account: %s\"                        ; +0x94, 0x585378\nIT MI                                                                  ; +0x96, 0x58537a\nLDRMI           R1, [SP,#0x10+var_8]; char *                           ; +0x98, 0x58537c\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x9a, 0x58537e\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x9e, 0x585382\nMOV             R1, R0                                                 ; +0xa2, 0x585386\nMOV             R0, R5                                                 ; +0xa4, 0x585388\nBLX             R7                                                     ; +0xa6, 0x58538a\nMOV             R0, R4                                                 ; +0xa8, 0x58538c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xaa, 0x58538e\nLDR.W           R5, [R6,#0x1EC]                                        ; +0xae, 0x585392\nLDR             R1, =(unk_B6B226 - 0x5853A2)                           ; +0xb2, 0x585396\nMOVS            R2, #0                                                 ; +0xb4, 0x585398\nMOV             R0, R4                                                 ; +0xb6, 0x58539a\nSTR             R2, [SP,#0x10+var_10]                                  ; +0xb8, 0x58539c\nADD             R1, PC; unk_B6B226                                     ; +0xba, 0x58539e\nSTR             R2, [SP,#0x10+var_C]                                   ; +0xbc, 0x5853a0\nSTR             R2, [SP,#0x10+var_8]                                   ; +0xbe, 0x5853a2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xc0, 0x5853a4\nMOV             R0, R5                                                 ; +0xc4, 0x5853a8\nMOV             R1, R4                                                 ; +0xc6, 0x5853aa\nBL              _ZN8TextArea9setStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; TextArea::setString(std::string) ; +0xc8, 0x5853ac\nB               loc_58544E                                             ; +0xcc, 0x5853b0\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0xce, 0x5853b2\nLDR.W           R7, [R6,#0x1E8]                                        ; +0xd2, 0x5853b6\nLDR.W           R3, [R0,#0x11C]                                        ; +0xd6, 0x5853ba\nLDR.W           R2, [R0,#0x118]                                        ; +0xda, 0x5853be\nCMP             R2, R3                                                 ; +0xde, 0x5853c2\nLDR             R3, [R7]                                               ; +0xe0, 0x5853c4\nBEQ             loc_585424                                             ; +0xe2, 0x5853c6\nLDR.W           R5, [R3,#0x1D0]                                        ; +0xe4, 0x5853c8\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0xe8, 0x5853cc\nADD.W           R1, R0, #0x10C                                         ; +0xec, 0x5853d0\nMOV             R0, R4                                                 ; +0xf0, 0x5853d4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0xf2, 0x5853d6\nLDRB.W          R3, [SP,#0x10+var_10]                                  ; +0xf6, 0x5853da\nLDR             R0, =(aLinkedToAccoun - 0x5853EC); \"Linked to account: %s\" ; +0xfa, 0x5853de\nLSLS            R3, R3, #0x1F                                          ; +0xfc, 0x5853e0\nIT PL                                                                  ; +0xfe, 0x5853e2\nADDPL.W         R1, SP, #0x10+var_10+1                                 ; +0x100, 0x5853e4\nADD             R0, PC; \"Linked to account: %s\"                        ; +0x104, 0x5853e8\nIT MI                                                                  ; +0x106, 0x5853ea\nLDRMI           R1, [SP,#0x10+var_8]; char *                           ; +0x108, 0x5853ec\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x10a, 0x5853ee\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x10e, 0x5853f2\nMOV             R1, R0                                                 ; +0x112, 0x5853f6\nMOV             R0, R7                                                 ; +0x114, 0x5853f8\nBLX             R5                                                     ; +0x116, 0x5853fa\nMOV             R0, R4                                                 ; +0x118, 0x5853fc\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x11a, 0x5853fe\nLDR.W           R5, [R6,#0x1EC]                                        ; +0x11e, 0x585402\nLDR             R1, =(aLoginRequired - 0x585412); \"Login required\"     ; +0x122, 0x585406\nMOV             R0, R4                                                 ; +0x124, 0x585408\nMOVS            R2, #0xE                                               ; +0x126, 0x58540a\nMOVS            R3, #0                                                 ; +0x128, 0x58540c\nADD             R1, PC; \"Login required\"                               ; +0x12a, 0x58540e\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x12c, 0x585410\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x12e, 0x585412\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x130, 0x585414\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x132, 0x585416\nMOV             R0, R5                                                 ; +0x136, 0x58541a\nMOV             R1, R4                                                 ; +0x138, 0x58541c\nBL              _ZN8TextArea9setStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; TextArea::setString(std::string) ; +0x13a, 0x58541e\nB               loc_58544E                                             ; +0x13e, 0x585422\nLDR             R1, =(aNotLoggedIn - 0x585430); \"Not logged in\"        ; +0x140, 0x585424\nMOV             R0, R7                                                 ; +0x142, 0x585426\nLDR.W           R3, [R3,#0x1D0]                                        ; +0x144, 0x585428\nADD             R1, PC; \"Not logged in\"                                ; +0x148, 0x58542c\nBLX             R3                                                     ; +0x14a, 0x58542e\nLDR.W           R7, [R6,#0x1EC]                                        ; +0x14c, 0x585430\nLDR             R1, =(aCreateAnAccoun_0 - 0x585440); \"Create an account to backup\\nand sync y\"... ; +0x150, 0x585434\nMOV             R0, R4                                                 ; +0x152, 0x585436\nMOVS            R2, #0x2E ; '.'                                        ; +0x154, 0x585438\nSTR             R5, [SP,#0x10+var_10]                                  ; +0x156, 0x58543a\nADD             R1, PC; \"Create an account to backup\\nand sync y\"...   ; +0x158, 0x58543c\nSTR             R5, [SP,#0x10+var_C]                                   ; +0x15a, 0x58543e\nSTR             R5, [SP,#0x10+var_8]                                   ; +0x15c, 0x585440\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x15e, 0x585442\nMOV             R0, R7                                                 ; +0x162, 0x585446\nMOV             R1, R4                                                 ; +0x164, 0x585448\nBL              _ZN8TextArea9setStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; TextArea::setString(std::string) ; +0x166, 0x58544a\nMOV             R0, R4                                                 ; +0x16a, 0x58544e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x16c, 0x585450\nLDR.W           R4, [R6,#0x1F4]                                        ; +0x170, 0x585454\nLDR             R3, [R4]                                               ; +0x174, 0x585458\nLDR.W           R5, [R3,#0xAC]                                         ; +0x176, 0x58545a\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x17a, 0x58545e\nLDR.W           R3, [R0,#0x11C]                                        ; +0x17e, 0x585462\nLDR.W           R1, [R0,#0x118]                                        ; +0x182, 0x585466\nMOV             R0, R4                                                 ; +0x186, 0x58546a\nSUBS            R1, R1, R3                                             ; +0x188, 0x58546c\nIT NE                                                                  ; +0x18a, 0x58546e\nMOVNE           R1, #1                                                 ; +0x18c, 0x585470\nBLX             R5                                                     ; +0x18e, 0x585472\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x190, 0x585474\nLDR.W           R3, [R8]                                               ; +0x192, 0x585476\nCMP             R2, R3                                                 ; +0x196, 0x58547a\nBEQ             loc_585494                                             ; +0x198, 0x58547c\nBLX             __stack_chk_fail                                       ; +0x19a, 0x58547e\nB               loc_585484                                             ; +0x19e, 0x585482\nMOV             R0, R4                                                 ; +0x1a0, 0x585484\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x1a2, 0x585486\nBL              __cxa_end_cleanup                                      ; +0x1a6, 0x58548a\nB               loc_585484                                             ; +0x1aa, 0x58548e\nB               loc_585484                                             ; +0x1ac, 0x585490\nB               loc_585484                                             ; +0x1ae, 0x585492\nADD             SP, SP, #0x10                                          ; +0x1b0, 0x585494\nPOP.W           {R4-R8,PC}                                             ; +0x1b2, 0x585496", "xrefs": ["AccountHelpLayer::accountStatusChanged @ 0x5854bc", "AccountHelpLayer::customSetup @ 0x58574e"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}