{"type": "func", "start": 4295813360, "end": 4295813746, "name": "AccountHelpLayer::onUnlink", "pseudocode": "// \n// AccountHelpLayer::onUnlink from 0x1000ce8f0 to 0x1000cea72 (386 bytes)\n// \n// 1 xrefs:\n// > AccountHelpLayer::customSetup @ 0x1000ce638\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::onUnlink(AccountHelpLayer *a1, cocos2d::CCObject *a2)\n{\n  __int128 v2; // xmm0\n  GJAccountManager *v3; // rax\n  std::string *p_m_username; // rax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // r14\n  size_t v7; // rax\n  size_t v8; // r15\n  char *v9; // r12\n  size_t v10; // r13\n  ButtonSprite **v11; // rbx\n  char v12; // [rsp+0h] [rbp-60h]\n  _QWORD __dst[2]; // [rsp+8h] [rbp-58h] BYREF\n  void *v14; // [rsp+18h] [rbp-48h]\n  __int128 v15; // [rsp+20h] [rbp-40h] BYREF\n  void *__p; // [rsp+30h] [rbp-30h]\n\n  v3 = GJAccountManager::sharedState();\n  if ( (v3->m_username.m_data.m_short.sizex2 & 1) != 0 )\n  {\n    sub_100006B70(&v15, v3->m_username.m_data.m_long.longStorage, v3->m_username.m_data.m_long.size, *(double *)&v2);\n  }\n  else\n  {\n    p_m_username = &v3->m_username;\n    __p = p_m_username->m_data.m_long.longStorage;\n    v2 = *(_OWORD *)&p_m_username->m_data.m_short.sizex2;\n    v15 = *(_OWORD *)&p_m_username->m_data.m_short.sizex2;\n  }\n  v5 = (cocos2d::CCString *)sub_1007AB580(\n                              \"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                              v12);\n  CString = cocos2d::CCString::getCString(v5);\n  if ( (v15 & 1) != 0 )\n    operator delete(__p);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(*(double *)&v2);\n  v8 = v7;\n  if ( v7 >= 0x17 )\n  {\n    v10 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v10 = (v7 | 7) + 1;\n    v9 = (char *)operator new(v10);\n    v14 = v9;\n    __dst[0] = v10 + 1;\n    __dst[1] = v8;\n    goto LABEL_13;\n  }\n  LOBYTE(__dst[0]) = 2 * v7;\n  v9 = (char *)__dst + 1;\n  if ( v7 )\nLABEL_13:\n    memmove(v9, CString, v8);\n  v9[v8] = 0;\n  v11 = (ButtonSprite **)FLAlertLayer::create_1(\n                           &a1->FLAlertLayerProtocol,\n                           \"Unlink Account\",\n                           __dst,\n                           \"Cancel\",\n                           \"Unlink\",\n                           300.0);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(v14);\n  ButtonSprite::updateBGImage(v11[75], \"GJ_button_05.png\");\n  (*(void (__fastcall **)(ButtonSprite **, __int64))&(*v11)->m_fVertexZ)(v11, 3);\n  (*(void (__fastcall **)(ButtonSprite **))&(*v11)[1].m_fTextureTop)(v11);\n}", "assembly": "; \n; AccountHelpLayer::onUnlink from 0x1000ce8f0 to 0x1000cea72 (386 bytes)\n; \n; 1 xrefs:\n; > AccountHelpLayer::customSetup @ 0x1000ce638\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, 0x1000ce8f0\nmov     rbp, rsp                                                       ; +0x1, 0x1000ce8f1\npush    r15                                                            ; +0x4, 0x1000ce8f4\npush    r14                                                            ; +0x6, 0x1000ce8f6\npush    r13                                                            ; +0x8, 0x1000ce8f8\npush    r12                                                            ; +0xa, 0x1000ce8fa\npush    rbx                                                            ; +0xc, 0x1000ce8fc\nsub     rsp, 38h                                                       ; +0xd, 0x1000ce8fd\nmov     rbx, rdi                                                       ; +0x11, 0x1000ce901\ncall    GJAccountManager__sharedState                                  ; +0x14, 0x1000ce904\ntest    byte ptr [rax+148h], 1                                         ; +0x19, 0x1000ce909\njnz     short loc_1000CE933                                            ; +0x20, 0x1000ce910\nadd     rax, 148h                                                      ; +0x22, 0x1000ce912\nmov     rcx, [rax+10h]                                                 ; +0x28, 0x1000ce918\nmov     [rbp+__p], rcx                                                 ; +0x2c, 0x1000ce91c\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x30, 0x1000ce920\nmovaps  [rbp+var_40], xmm0                                             ; +0x33, 0x1000ce923\ntest    byte ptr [rbp+var_40], 1                                       ; +0x37, 0x1000ce927\njnz     short loc_1000CE950                                            ; +0x3b, 0x1000ce92b\nlea     rsi, [rbp+var_40+1]                                            ; +0x3d, 0x1000ce92d\njmp     short loc_1000CE954                                            ; +0x41, 0x1000ce931\nmov     rdx, [rax+150h]                                                ; +0x43, 0x1000ce933\nmov     rsi, [rax+158h]                                                ; +0x4a, 0x1000ce93a\nlea     rdi, [rbp+var_40]                                              ; +0x51, 0x1000ce941\ncall    sub_100006B70                                                  ; +0x55, 0x1000ce945\ntest    byte ptr [rbp+var_40], 1                                       ; +0x5a, 0x1000ce94a\njz      short loc_1000CE92D                                            ; +0x5e, 0x1000ce94e\nmov     rsi, [rbp+__p]                                                 ; +0x60, 0x1000ce950\nlea     rdi, aAreYouSureYouW_0; \"Are you sure you want to <cg>unlink</c>\"... ; +0x64, 0x1000ce954\nxor     eax, eax                                                       ; +0x6b, 0x1000ce95b\ncall    sub_1007AB580                                                  ; +0x6d, 0x1000ce95d\nmov     rdi, rax                                                       ; +0x72, 0x1000ce962\ncall    cocos2d__CCString__getCString                                  ; +0x75, 0x1000ce965\nmov     r14, rax                                                       ; +0x7a, 0x1000ce96a\ntest    byte ptr [rbp+var_40], 1                                       ; +0x7d, 0x1000ce96d\njz      short loc_1000CE97C                                            ; +0x81, 0x1000ce971\nmov     rdi, [rbp+__p]; __p                                            ; +0x83, 0x1000ce973\ncall    __ZdlPv; operator delete(void *)                               ; +0x87, 0x1000ce977\nmov     rdi, r14; __s                                                  ; +0x8c, 0x1000ce97c\ncall    _strlen                                                        ; +0x8f, 0x1000ce97f\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x94, 0x1000ce984\njnb     loc_1000CEA6D                                                  ; +0x98, 0x1000ce988\nmov     r15, rax                                                       ; +0x9e, 0x1000ce98e\nadd     rbx, 268h                                                      ; +0xa1, 0x1000ce991\ncmp     rax, 17h                                                       ; +0xa8, 0x1000ce998\njnb     short loc_1000CE9B0                                            ; +0xac, 0x1000ce99c\nlea     eax, [r15+r15]                                                 ; +0xae, 0x1000ce99e\nmov     byte ptr [rbp+__dst], al                                       ; +0xb2, 0x1000ce9a2\nlea     r12, [rbp+__dst+1]                                             ; +0xb5, 0x1000ce9a5\ntest    r15, r15                                                       ; +0xb9, 0x1000ce9a9\njnz     short loc_1000CE9E3                                            ; +0xbc, 0x1000ce9ac\njmp     short loc_1000CE9F1                                            ; +0xbe, 0x1000ce9ae\nmov     rax, r15                                                       ; +0xc0, 0x1000ce9b0\nor      rax, 7                                                         ; +0xc3, 0x1000ce9b3\nlea     rcx, [rax+1]                                                   ; +0xc7, 0x1000ce9b7\ncmp     rax, 17h                                                       ; +0xcb, 0x1000ce9bb\nmov     r13d, 1Ah                                                      ; +0xcf, 0x1000ce9bf\ncmovnz  r13, rcx                                                       ; +0xd5, 0x1000ce9c5\nmov     rdi, r13; __sz                                                 ; +0xd9, 0x1000ce9c9\ncall    __Znwm; operator new(ulong)                                    ; +0xdc, 0x1000ce9cc\nmov     r12, rax                                                       ; +0xe1, 0x1000ce9d1\nmov     [rbp+var_48], rax                                              ; +0xe4, 0x1000ce9d4\ninc     r13                                                            ; +0xe8, 0x1000ce9d8\nmov     [rbp+__dst], r13                                               ; +0xeb, 0x1000ce9db\nmov     [rbp+var_50], r15                                              ; +0xef, 0x1000ce9df\nmov     rdi, r12; __dst                                                ; +0xf3, 0x1000ce9e3\nmov     rsi, r14; __src                                                ; +0xf6, 0x1000ce9e6\nmov     rdx, r15; __len                                                ; +0xf9, 0x1000ce9e9\ncall    _memmove                                                       ; +0xfc, 0x1000ce9ec\nmov     byte ptr [r12+r15], 0                                          ; +0x101, 0x1000ce9f1\nlea     rsi, aUnlinkAccount; \"Unlink Account\"                          ; +0x106, 0x1000ce9f6\nlea     rcx, aCancel; \"Cancel\"                                         ; +0x10d, 0x1000ce9fd\nlea     r8, aUnlink; \"Unlink\"                                          ; +0x114, 0x1000cea04\nlea     rdx, [rbp+__dst]                                               ; +0x11b, 0x1000cea0b\nmovss   xmm0, cs:dword_1008152B4                                       ; +0x11f, 0x1000cea0f\nmov     rdi, rbx                                                       ; +0x127, 0x1000cea17\ncall    FLAlertLayer__create_1                                         ; +0x12a, 0x1000cea1a\nmov     rbx, rax                                                       ; +0x12f, 0x1000cea1f\ntest    byte ptr [rbp+__dst], 1                                        ; +0x132, 0x1000cea22\njz      short loc_1000CEA31                                            ; +0x136, 0x1000cea26\nmov     rdi, [rbp+var_48]; __p                                         ; +0x138, 0x1000cea28\ncall    __ZdlPv; operator delete(void *)                               ; +0x13c, 0x1000cea2c\nmov     rdi, [rbx+258h]                                                ; +0x141, 0x1000cea31\nlea     rsi, aGjButton05Png; \"GJ_button_05.png\"                        ; +0x148, 0x1000cea38\ncall    ButtonSprite__updateBGImage                                    ; +0x14f, 0x1000cea3f\nmov     rax, [rbx]                                                     ; +0x154, 0x1000cea44\nmov     rdi, rbx                                                       ; +0x157, 0x1000cea47\nmov     esi, 3                                                         ; +0x15a, 0x1000cea4a\ncall    qword ptr [rax+48h]                                            ; +0x15f, 0x1000cea4f\nmov     rax, [rbx]                                                     ; +0x162, 0x1000cea52\nmov     rdi, rbx                                                       ; +0x165, 0x1000cea55\ncall    qword ptr [rax+508h]                                           ; +0x168, 0x1000cea58\nadd     rsp, 38h                                                       ; +0x16e, 0x1000cea5e\npop     rbx                                                            ; +0x172, 0x1000cea62\npop     r12                                                            ; +0x173, 0x1000cea63\npop     r13                                                            ; +0x175, 0x1000cea65\npop     r14                                                            ; +0x177, 0x1000cea67\npop     r15                                                            ; +0x179, 0x1000cea69\npop     rbp                                                            ; +0x17b, 0x1000cea6b\nretn                                                                   ; +0x17c, 0x1000cea6c\ncall    sub_100006BF0                                                  ; +0x17d, 0x1000cea6d", "xrefs": ["AccountHelpLayer::customSetup @ 0x1000ce638"], "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"}