{"type": "func", "start": 5788172, "end": 5788360, "name": "AccountHelpLayer::onUnlink", "pseudocode": "// \n// AccountHelpLayer::onUnlink from 0x58520c to 0x5852c8 (188 bytes)\n// \n// 0 xrefs:\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::onUnlink(AccountHelpLayer *this, cocos2d::CCObject *a2)\n{\n  int v3; // r0\n  char *v4; // r1\n  cocos2d::CCString *v5; // r0\n  const char *CString; // r5\n  size_t v7; // r0\n  char **v8; // r5\n  int v10[2]; // [sp+8h] [bp-14h] BYREF\n  char *v11; // [sp+10h] [bp-Ch]\n\n  v3 = GJAccountManager::sharedState(this);\n  std::string::basic_string(v10, v3 + 268);\n  if ( (v10[0] & 1) != 0 )\n    v4 = v11;\n  else\n    v4 = (char *)v10 + 1;\n  v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                              (cocos2d::CCString *)\"Are you sure you want to <cg>unlink</c> from the account <cl>%s</c>?\\n\"\n                                                   \"<cy>Unlinking will delete all data from this device.</c>\",\n                              v4);\n  CString = (const char *)cocos2d::CCString::getCString(v5);\n  std::string::~string((int)v10);\n  v10[0] = 0;\n  v10[1] = 0;\n  v11 = nullptr;\n  v7 = strlen(CString);\n  std::string::__init(v10, CString, v7);\n  v8 = (char **)FLAlertLayer::create(\n                  (int)this + 484,\n                  (cocos2d::CCLabelBMFont *)\"Unlink Account\",\n                  (int)v10,\n                  (ButtonSprite *)\"Cancel\",\n                  (ButtonSprite *)\"Unlink\",\n                  300.0);\n  std::string::~string((int)v10);\n  ButtonSprite::updateBGImage(v8[121], \"GJ_button_05.png\");\n  (*((void (__fastcall **)(char **, int))*v8 + 9))(v8, 3);\n  return (*((int (__fastcall **)(char **))*v8 + 164))(v8);\n}", "assembly": "; \n; AccountHelpLayer::onUnlink from 0x58520c to 0x5852c8 (188 bytes)\n; \n; 0 xrefs:\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            {R4-R7,LR}                                             ; +0x0, 0x58520c\nSUB             SP, SP, #0x1C                                          ; +0x2, 0x58520e\nLDR             R6, =(__stack_chk_guard_ptr - 0x58521A)                ; +0x4, 0x585210\nMOV             R7, R0                                                 ; +0x6, 0x585212\nADD             R4, SP, #0x1C+var_14                                   ; +0x8, 0x585214\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xa, 0x585216\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xc, 0x585218\nLDR             R3, [R6]                                               ; +0xe, 0x58521a\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x10, 0x58521c\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x12, 0x58521e\nADD.W           R1, R0, #0x10C                                         ; +0x16, 0x585222\nMOV             R0, R4                                                 ; +0x1a, 0x585226\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x1c, 0x585228\nLDRB.W          R3, [SP,#0x1C+var_14]                                  ; +0x20, 0x58522c\nLDR             R0, =(aAreYouSureYouW_8 - 0x58523E); \"Are you sure you want to <cg>unlink</c>\"... ; +0x24, 0x585230\nLSLS            R3, R3, #0x1F                                          ; +0x26, 0x585232\nIT PL                                                                  ; +0x28, 0x585234\nADDPL.W         R1, SP, #0x1C+var_14+1                                 ; +0x2a, 0x585236\nADD             R0, PC; \"Are you sure you want to <cg>unlink</c>\"...   ; +0x2e, 0x58523a\nIT MI                                                                  ; +0x30, 0x58523c\nLDRMI           R1, [SP,#0x1C+var_C]; char *                           ; +0x32, 0x58523e\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x34, 0x585240\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x38, 0x585244\nMOV             R5, R0                                                 ; +0x3c, 0x585248\nMOV             R0, R4                                                 ; +0x3e, 0x58524a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x40, 0x58524c\nMOV             R0, R5; char *                                         ; +0x44, 0x585250\nMOVS            R3, #0                                                 ; +0x46, 0x585252\nSTR             R3, [SP,#0x1C+var_14]                                  ; +0x48, 0x585254\nSTR             R3, [SP,#0x1C+var_10]                                  ; +0x4a, 0x585256\nSTR             R3, [SP,#0x1C+var_C]                                   ; +0x4c, 0x585258\nBLX             strlen                                                 ; +0x4e, 0x58525a\nMOV             R1, R5                                                 ; +0x52, 0x58525e\nMOV             R2, R0                                                 ; +0x54, 0x585260\nMOV             R0, R4                                                 ; +0x56, 0x585262\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x58, 0x585264\nLDR             R3, =(aUnlink - 0x585274); \"Unlink\"                    ; +0x5c, 0x585268\nLDR             R1, =(aUnlinkAccount - 0x58527A); \"Unlink Account\"     ; +0x5e, 0x58526a\nADD.W           R0, R7, #0x1E4; int                                    ; +0x60, 0x58526c\nADD             R3, PC; \"Unlink\"                                       ; +0x64, 0x585270\nSTR             R3, [SP,#0x1C+var_1C]; int                             ; +0x66, 0x585272\nLDR             R3, flt_5852C8                                         ; +0x68, 0x585274\nADD             R1, PC; \"Unlink Account\"                               ; +0x6a, 0x585276\nMOV             R2, R4; int                                            ; +0x6c, 0x585278\nSTR             R3, [SP,#0x1C+var_18]; float                           ; +0x6e, 0x58527a\nLDR             R3, =(aCancel - 0x585282); \"Cancel\"                    ; +0x70, 0x58527c\nADD             R3, PC; \"Cancel\"                                       ; +0x72, 0x58527e\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x74, 0x585280\nMOV             R5, R0                                                 ; +0x78, 0x585284\nMOV             R0, R4                                                 ; +0x7a, 0x585286\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x7c, 0x585288\nLDR             R1, =(aGjButton05Png - 0x585296); \"GJ_button_05.png\"   ; +0x80, 0x58528c\nLDR.W           R0, [R5,#0x1E4]; this                                  ; +0x82, 0x58528e\nADD             R1, PC; \"GJ_button_05.png\"                             ; +0x86, 0x585292\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x88, 0x585294\nLDR             R3, [R5]                                               ; +0x8c, 0x585298\nMOV             R0, R5                                                 ; +0x8e, 0x58529a\nMOVS            R1, #3                                                 ; +0x90, 0x58529c\nLDR             R3, [R3,#0x24]                                         ; +0x92, 0x58529e\nBLX             R3                                                     ; +0x94, 0x5852a0\nLDR             R3, [R5]                                               ; +0x96, 0x5852a2\nMOV             R0, R5                                                 ; +0x98, 0x5852a4\nLDR.W           R3, [R3,#0x290]                                        ; +0x9a, 0x5852a6\nBLX             R3                                                     ; +0x9e, 0x5852aa\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xa0, 0x5852ac\nLDR             R3, [R6]                                               ; +0xa2, 0x5852ae\nCMP             R2, R3                                                 ; +0xa4, 0x5852b0\nBEQ             loc_5852C4                                             ; +0xa6, 0x5852b2\nBLX             __stack_chk_fail                                       ; +0xa8, 0x5852b4\nB               loc_5852BA                                             ; +0xac, 0x5852b8\nMOV             R0, R4                                                 ; +0xae, 0x5852ba\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb0, 0x5852bc\nBL              __cxa_end_cleanup                                      ; +0xb4, 0x5852c0\nADD             SP, SP, #0x1C                                          ; +0xb8, 0x5852c4\nPOP             {R4-R7,PC}                                             ; +0xba, 0x5852c6", "xrefs": [], "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"}