{"type": "func", "start": 4295605808, "end": 4295606328, "name": "AccountLayer::syncAccountFailed", "pseudocode": "// \n// AccountLayer::syncAccountFailed from 0x10009be30 to 0x10009c038 (520 bytes)\n// \n// 2 xrefs:\n// > sub_10009C070 @ 0x10009c07c\n// > <???> @ 0x100abbf18\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:20:12 +0000\n// \n\n__int64 __fastcall AccountLayer::syncAccountFailed(__int64 a1, int a2)\n{\n  __int64 v3; // r14\n  char **v4; // r15\n  __int64 v5; // rax\n  const char *CString; // r12\n  size_t v7; // rax\n  size_t v8; // r15\n  char *v9; // r13\n  size_t v10; // r12\n  char v12; // [rsp+0h] [rbp-80h]\n  const char *v13; // [rsp+8h] [rbp-78h]\n  _QWORD v14[2]; // [rsp+10h] [rbp-70h] BYREF\n  char *v15; // [rsp+20h] [rbp-60h] BYREF\n  _QWORD v16[2]; // [rsp+28h] [rbp-58h] BYREF\n  char *v17; // [rsp+38h] [rbp-48h] BYREF\n  _QWORD __dst[2]; // [rsp+40h] [rbp-40h] BYREF\n  char *v19; // [rsp+50h] [rbp-30h] BYREF\n\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 560) + 1272LL))(*(_QWORD *)(a1 + 560), 1);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1);\n  (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 704) + 344LL))(*(_QWORD *)(a1 + 704), 0);\n  v3 = *(_QWORD *)(a1 + 648);\n  if ( a2 != -3 )\n  {\n    if ( a2 == -2 )\n    {\n      v4 = &v15;\n      v15 = (char *)operator new(0x38u);\n      v14[0] = 57;\n      v14[1] = 50;\n      strcpy(v15, \"Login failed. Please login to verify your account.\");\n      TextArea::setString(v3, v14);\n      if ( (v14[0] & 1) == 0 )\n        return TextArea::colorAllCharactersTo(*(_QWORD *)(a1 + 648), 19455);\n    }\n    else\n    {\n      v4 = &v17;\n      v17 = (char *)operator new(0x28u);\n      v16[0] = 41;\n      v16[1] = 36;\n      strcpy(v17, \"Sync failed. Please try again later.\");\n      TextArea::setString(v3, v16);\n      if ( (v16[0] & 1) == 0 )\n        return TextArea::colorAllCharactersTo(*(_QWORD *)(a1 + 648), 19455);\n    }\n    goto LABEL_17;\n  }\n  v5 = sub_10088E820(\"Sync failed. Error code: %i\", v12);\n  CString = (const char *)cocos2d::CCString::getCString(v5);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v8 = v7;\n  if ( v7 >= 0x17 )\n  {\n    v13 = CString;\n    v10 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v10 = (v7 | 7) + 1;\n    v9 = (char *)operator new(v10);\n    v19 = v9;\n    __dst[0] = v10 + 1;\n    CString = v13;\n    __dst[1] = v8;\n    goto LABEL_14;\n  }\n  LOBYTE(__dst[0]) = 2 * v7;\n  v9 = (char *)__dst + 1;\n  if ( v7 )\nLABEL_14:\n    memmove(v9, CString, v8);\n  v9[v8] = 0;\n  TextArea::setString(v3, __dst);\n  if ( (__dst[0] & 1) != 0 )\n  {\n    v4 = &v19;\nLABEL_17:\n    operator delete(*v4);\n  }\n  return TextArea::colorAllCharactersTo(*(_QWORD *)(a1 + 648), 19455);\n}", "assembly": "; \n; AccountLayer::syncAccountFailed from 0x10009be30 to 0x10009c038 (520 bytes)\n; \n; 2 xrefs:\n; > sub_10009C070 @ 0x10009c07c\n; > <???> @ 0x100abbf18\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:20:12 +0000\n; \npush    rbp                                                            ; +0x0, 0x10009be30\nmov     rbp, rsp                                                       ; +0x1, 0x10009be31\npush    r15                                                            ; +0x4, 0x10009be34\npush    r14                                                            ; +0x6, 0x10009be36\npush    r13                                                            ; +0x8, 0x10009be38\npush    r12                                                            ; +0xa, 0x10009be3a\npush    rbx                                                            ; +0xc, 0x10009be3c\nsub     rsp, 58h                                                       ; +0xd, 0x10009be3d\nmov     r15d, edx                                                      ; +0x11, 0x10009be41\nmov     r12d, esi                                                      ; +0x14, 0x10009be44\nmov     rbx, rdi                                                       ; +0x17, 0x10009be47\nmov     rdi, [rdi+230h]                                                ; +0x1a, 0x10009be4a\nmov     rax, [rdi]                                                     ; +0x21, 0x10009be51\nmov     esi, 1                                                         ; +0x24, 0x10009be54\ncall    qword ptr [rax+4F8h]                                           ; +0x29, 0x10009be59\nmov     rax, [rbx]                                                     ; +0x2f, 0x10009be5f\nmov     rdi, rbx                                                       ; +0x32, 0x10009be62\nmov     esi, 1                                                         ; +0x35, 0x10009be65\ncall    qword ptr [rax+430h]                                           ; +0x3a, 0x10009be6a\nmov     rdi, [rbx+2C0h]                                                ; +0x40, 0x10009be70\nmov     rax, [rdi]                                                     ; +0x47, 0x10009be77\nxor     esi, esi                                                       ; +0x4a, 0x10009be7a\ncall    qword ptr [rax+158h]                                           ; +0x4c, 0x10009be7c\nmov     r14, [rbx+288h]                                                ; +0x52, 0x10009be82\ncmp     r12d, 0FFFFFFFDh                                               ; +0x59, 0x10009be89\njz      short loc_10009BF00                                            ; +0x5d, 0x10009be8d\ncmp     r12d, 0FFFFFFFEh                                               ; +0x5f, 0x10009be8f\njnz     loc_10009BF50                                                  ; +0x63, 0x10009be93\nmov     edi, 38h ; '8'; __sz                                           ; +0x69, 0x10009be99\ncall    __Znwm; operator new(ulong)                                    ; +0x6e, 0x10009be9e\nlea     r15, [rbp+var_60]                                              ; +0x73, 0x10009bea3\nmov     [rbp+var_60], rax                                              ; +0x77, 0x10009bea7\nmov     [rbp+var_70], 39h ; '9'                                        ; +0x7b, 0x10009beab\nmov     [rbp+var_68], 32h ; '2'                                        ; +0x83, 0x10009beb3\nmovups  xmm0, xmmword ptr cs:aLoginFailedPle+20h; \"rify your account.\" ; +0x8b, 0x10009bebb\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x92, 0x10009bec2\nmovups  xmm0, xmmword ptr cs:aLoginFailedPle+10h; \"ease login to verify your account.\" ; +0x96, 0x10009bec6\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0x9d, 0x10009becd\nmovups  xmm0, xmmword ptr cs:aLoginFailedPle; \"Login failed. Please login to verify yo\"... ; +0xa1, 0x10009bed1\nmovups  xmmword ptr [rax], xmm0                                        ; +0xa8, 0x10009bed8\nmov     word ptr [rax+30h], 2E74h                                      ; +0xab, 0x10009bedb\nmov     byte ptr [rax+32h], 0                                          ; +0xb1, 0x10009bee1\nlea     rsi, [rbp+var_70]                                              ; +0xb5, 0x10009bee5\nmov     rdi, r14                                                       ; +0xb9, 0x10009bee9\ncall    TextArea__setString                                            ; +0xbc, 0x10009beec\ntest    byte ptr [rbp+var_70], 1                                       ; +0xc1, 0x10009bef1\njnz     loc_10009C00B                                                  ; +0xc5, 0x10009bef5\njmp     loc_10009C013                                                  ; +0xcb, 0x10009befb\nlea     rdi, aSyncFailedErro; \"Sync failed. Error code: %i\"            ; +0xd0, 0x10009bf00\nmov     esi, r15d                                                      ; +0xd7, 0x10009bf07\nxor     eax, eax                                                       ; +0xda, 0x10009bf0a\ncall    sub_10088E820                                                  ; +0xdc, 0x10009bf0c\nmov     rdi, rax                                                       ; +0xe1, 0x10009bf11\ncall    cocos2d__CCString__getCString                                  ; +0xe4, 0x10009bf14\nmov     r12, rax                                                       ; +0xe9, 0x10009bf19\nmov     rdi, rax; __s                                                  ; +0xec, 0x10009bf1c\ncall    _strlen                                                        ; +0xef, 0x10009bf1f\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xf4, 0x10009bf24\njnb     loc_10009C033                                                  ; +0xf8, 0x10009bf28\nmov     r15, rax                                                       ; +0xfe, 0x10009bf2e\ncmp     rax, 17h                                                       ; +0x101, 0x10009bf31\njnb     short loc_10009BFA6                                            ; +0x105, 0x10009bf35\nlea     eax, [r15+r15]                                                 ; +0x107, 0x10009bf37\nmov     byte ptr [rbp+__dst], al                                       ; +0x10b, 0x10009bf3b\nlea     r13, [rbp+__dst+1]                                             ; +0x10e, 0x10009bf3e\ntest    r15, r15                                                       ; +0x112, 0x10009bf42\njnz     loc_10009BFE1                                                  ; +0x115, 0x10009bf45\njmp     loc_10009BFEF                                                  ; +0x11b, 0x10009bf4b\nmov     edi, 28h ; '('; __sz                                           ; +0x120, 0x10009bf50\ncall    __Znwm; operator new(ulong)                                    ; +0x125, 0x10009bf55\nlea     r15, [rbp+var_48]                                              ; +0x12a, 0x10009bf5a\nmov     [rbp+var_48], rax                                              ; +0x12e, 0x10009bf5e\nmov     [rbp+var_58], 29h ; ')'                                        ; +0x132, 0x10009bf62\nmov     [rbp+var_50], 24h ; '$'                                        ; +0x13a, 0x10009bf6a\nmovups  xmm0, xmmword ptr cs:aSyncFailedPlea+10h; \"ase try again later.\" ; +0x142, 0x10009bf72\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0x149, 0x10009bf79\nmovups  xmm0, xmmword ptr cs:aSyncFailedPlea; \"Sync failed. Please try again later.\" ; +0x14d, 0x10009bf7d\nmovups  xmmword ptr [rax], xmm0                                        ; +0x154, 0x10009bf84\nmov     dword ptr [rax+20h], 2E726574h                                 ; +0x157, 0x10009bf87\nmov     byte ptr [rax+24h], 0                                          ; +0x15e, 0x10009bf8e\nlea     rsi, [rbp+var_58]                                              ; +0x162, 0x10009bf92\nmov     rdi, r14                                                       ; +0x166, 0x10009bf96\ncall    TextArea__setString                                            ; +0x169, 0x10009bf99\ntest    byte ptr [rbp+var_58], 1                                       ; +0x16e, 0x10009bf9e\njnz     short loc_10009C00B                                            ; +0x172, 0x10009bfa2\njmp     short loc_10009C013                                            ; +0x174, 0x10009bfa4\nmov     rax, r15                                                       ; +0x176, 0x10009bfa6\nor      rax, 7                                                         ; +0x179, 0x10009bfa9\nlea     rcx, [rax+1]                                                   ; +0x17d, 0x10009bfad\ncmp     rax, 17h                                                       ; +0x181, 0x10009bfb1\nmov     [rbp+var_78], r12                                              ; +0x185, 0x10009bfb5\nmov     r12d, 1Ah                                                      ; +0x189, 0x10009bfb9\ncmovnz  r12, rcx                                                       ; +0x18f, 0x10009bfbf\nmov     rdi, r12; __sz                                                 ; +0x193, 0x10009bfc3\ncall    __Znwm; operator new(ulong)                                    ; +0x196, 0x10009bfc6\nmov     r13, rax                                                       ; +0x19b, 0x10009bfcb\nmov     [rbp+var_30], rax                                              ; +0x19e, 0x10009bfce\ninc     r12                                                            ; +0x1a2, 0x10009bfd2\nmov     [rbp+__dst], r12                                               ; +0x1a5, 0x10009bfd5\nmov     r12, [rbp+var_78]                                              ; +0x1a9, 0x10009bfd9\nmov     [rbp+var_38], r15                                              ; +0x1ad, 0x10009bfdd\nmov     rdi, r13; __dst                                                ; +0x1b1, 0x10009bfe1\nmov     rsi, r12; __src                                                ; +0x1b4, 0x10009bfe4\nmov     rdx, r15; __len                                                ; +0x1b7, 0x10009bfe7\ncall    _memmove                                                       ; +0x1ba, 0x10009bfea\nmov     byte ptr [r13+r15+0], 0                                        ; +0x1bf, 0x10009bfef\nlea     rsi, [rbp+__dst]                                               ; +0x1c5, 0x10009bff5\nmov     rdi, r14                                                       ; +0x1c9, 0x10009bff9\ncall    TextArea__setString                                            ; +0x1cc, 0x10009bffc\ntest    byte ptr [rbp+__dst], 1                                        ; +0x1d1, 0x10009c001\njz      short loc_10009C013                                            ; +0x1d5, 0x10009c005\nlea     r15, [rbp+var_30]                                              ; +0x1d7, 0x10009c007\nmov     rdi, [r15]; __p                                                ; +0x1db, 0x10009c00b\ncall    __ZdlPv; operator delete(void *)                               ; +0x1de, 0x10009c00e\nmov     rdi, [rbx+288h]                                                ; +0x1e3, 0x10009c013\nmov     esi, 4BFFh                                                     ; +0x1ea, 0x10009c01a\ncall    TextArea__colorAllCharactersTo                                 ; +0x1ef, 0x10009c01f\nadd     rsp, 58h                                                       ; +0x1f4, 0x10009c024\npop     rbx                                                            ; +0x1f8, 0x10009c028\npop     r12                                                            ; +0x1f9, 0x10009c029\npop     r13                                                            ; +0x1fb, 0x10009c02b\npop     r14                                                            ; +0x1fd, 0x10009c02d\npop     r15                                                            ; +0x1ff, 0x10009c02f\npop     rbp                                                            ; +0x201, 0x10009c031\nretn                                                                   ; +0x202, 0x10009c032\ncall    sub_100003630                                                  ; +0x203, 0x10009c033", "xrefs": ["sub_10009C070 @ 0x10009c07c", "<???> @ 0x100abbf18"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}