{"type": "func", "start": 5370042896, "end": 5370043653, "name": "GameLevelManager::storeUserNames", "pseudocode": "// \n// GameLevelManager::storeUserNames from 0x140145a10 to 0x140145d05 (757 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x14014e910\n// > GameLevelManager::onGetLevelListsCompleted @ 0x140150c8d\n// > GameLevelManager::processOnDownloadLevelCompleted @ 0x140152766\n// > <???> @ 0x1406ca584\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\n// Hidden C++ exception states: #wind=4\nvoid __fastcall GameLevelManager::storeUserNames(__int64 a1, _QWORD *a2)\n{\n  __int64 v2; // r15\n  size_t v4; // r8\n  cocos2d::CCArray *v5; // r12\n  void *v6; // rcx\n  unsigned int i; // esi\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rax\n  size_t v10; // r8\n  __int128 *v11; // rdx\n  size_t v12; // r8\n  cocos2d::CCArray *v13; // rdi\n  void *v14; // rcx\n  cocos2d::CCString *v15; // rax\n  unsigned int v16; // r14d\n  cocos2d::CCString *v17; // rbx\n  cocos2d::CCString *v18; // rax\n  unsigned int v19; // edi\n  const char *v20; // rax\n  size_t v21; // r8\n  void *v22; // rcx\n  __int128 v23; // [rsp+30h] [rbp-49h] BYREF\n  __int64 v24; // [rsp+40h] [rbp-39h]\n  unsigned __int64 v25; // [rsp+48h] [rbp-31h]\n  __int128 v26; // [rsp+50h] [rbp-29h] BYREF\n  __int64 v27; // [rsp+60h] [rbp-19h]\n  unsigned __int64 v28; // [rsp+68h] [rbp-11h]\n  void *Block[2]; // [rsp+70h] [rbp-9h] BYREF\n  __m128i si128; // [rsp+80h] [rbp+7h]\n\n  v2 = (__int64)a2;\n  if ( a2[2] )\n  {\n    if ( a2[3] > 0xFu )\n      a2 = (_QWORD *)*a2;\n    *(_OWORD *)Block = 0;\n    si128 = 0;\n    v4 = -1;\n    do\n      ++v4;\n    while ( *((_BYTE *)a2 + v4) );\n    sub_14003A930(Block, a2, v4);\n    v5 = sub_140140F70((__int64 *)Block, \"|\");\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v6 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v6 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v6);\n    }\n    si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n    LOBYTE(Block[0]) = 0;\n    for ( i = 0; i < cocos2d::CCArray::count(v5); ++i )\n    {\n      v8 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v5, i);\n      CString = cocos2d::CCString::getCString(v8);\n      v26 = 0;\n      v27 = 0;\n      v28 = 0;\n      v10 = -1;\n      do\n        ++v10;\n      while ( CString[v10] );\n      sub_14003A930(&v26, CString, v10);\n      v11 = &v26;\n      if ( v28 > 0xF )\n        v11 = (__int128 *)v26;\n      v23 = 0;\n      v24 = 0;\n      v25 = 0;\n      v12 = -1;\n      do\n        ++v12;\n      while ( *((_BYTE *)v11 + v12) );\n      sub_14003A930(&v23, v11, v12);\n      v13 = sub_140140F70((__int64 *)&v23, \":\");\n      if ( v25 > 0xF )\n      {\n        v14 = (void *)v23;\n        if ( v25 + 1 >= 0x1000 )\n        {\n          v14 = *(void **)(v23 - 8);\n          if ( (unsigned __int64)(v23 - (_QWORD)v14 - 8) > 0x1F )\n            invalid_parameter_noinfo_noreturn();\n        }\n        j_j_free(v14);\n      }\n      v24 = 0;\n      v25 = 15;\n      LOBYTE(v23) = 0;\n      if ( cocos2d::CCArray::count(v13) >= 3 )\n      {\n        v15 = cocos2d::CCArray::stringAtIndex(v13, 0);\n        v16 = cocos2d::CCString::intValue(v15);\n        v17 = cocos2d::CCArray::stringAtIndex(v13, 1u);\n        v18 = cocos2d::CCArray::stringAtIndex(v13, 2u);\n        v19 = cocos2d::CCString::intValue(v18);\n        v20 = cocos2d::CCString::getCString(v17);\n        v23 = 0;\n        v24 = 0;\n        v25 = 0;\n        v21 = -1;\n        do\n          ++v21;\n        while ( v20[v21] );\n        sub_14003A930(&v23, v20, v21);\n        GameLevelManager::storeUserName(a1, v16, v19, &v23);\n      }\n      if ( v28 > 0xF )\n      {\n        v22 = (void *)v26;\n        if ( v28 + 1 >= 0x1000 )\n        {\n          v22 = *(void **)(v26 - 8);\n          if ( (unsigned __int64)(v26 - (_QWORD)v22 - 8) > 0x1F )\n            invalid_parameter_noinfo_noreturn();\n        }\n        j_j_free(v22);\n      }\n    }\n  }\n  sub_14003A830(v2);\n}", "assembly": "; \n; GameLevelManager::storeUserNames from 0x140145a10 to 0x140145d05 (757 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::onGetOnlineLevelsCompleted @ 0x14014e910\n; > GameLevelManager::onGetLevelListsCompleted @ 0x140150c8d\n; > GameLevelManager::processOnDownloadLevelCompleted @ 0x140152766\n; > <???> @ 0x1406ca584\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\nmov     [rsp-8+arg_10], rbx                                            ; +0x0, 0x140145a10\npush    rbp                                                            ; +0x5, 0x140145a15\npush    rsi                                                            ; +0x6, 0x140145a16\npush    rdi                                                            ; +0x7, 0x140145a17\npush    r12                                                            ; +0x8, 0x140145a18\npush    r13                                                            ; +0xa, 0x140145a1a\npush    r14                                                            ; +0xc, 0x140145a1c\npush    r15                                                            ; +0xe, 0x140145a1e\nlea     rbp, [rsp-27h]                                                 ; +0x10, 0x140145a20\nsub     rsp, 0A0h                                                      ; +0x15, 0x140145a25\nmov     rax, cs:__security_cookie                                      ; +0x1c, 0x140145a2c\nxor     rax, rsp                                                       ; +0x23, 0x140145a33\nmov     [rbp+57h+var_40], rax                                          ; +0x26, 0x140145a36\nmov     r15, rdx                                                       ; +0x2a, 0x140145a3a\nmov     r13, rcx                                                       ; +0x2d, 0x140145a3d\nmov     [rbp+57h+var_A8], rdx                                          ; +0x30, 0x140145a40\ncmp     qword ptr [rdx+10h], 0                                         ; +0x34, 0x140145a44\njz      loc_140145CC8                                                  ; +0x39, 0x140145a49\ncmp     qword ptr [rdx+18h], 0Fh                                       ; +0x3f, 0x140145a4f\njbe     short loc_140145A59                                            ; +0x44, 0x140145a54\nmov     rdx, [rdx]                                                     ; +0x46, 0x140145a56\nxorps   xmm0, xmm0                                                     ; +0x49, 0x140145a59\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0x4c, 0x140145a5c\nxorps   xmm1, xmm1                                                     ; +0x50, 0x140145a60\nmovdqu  [rbp+57h+var_50], xmm1                                         ; +0x53, 0x140145a63\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x58, 0x140145a68\nnop                                                                    ; +0x5f, 0x140145a6f\ninc     r8                                                             ; +0x60, 0x140145a70\ncmp     byte ptr [rdx+r8], 0                                           ; +0x63, 0x140145a73\njnz     short loc_140145A70                                            ; +0x68, 0x140145a78\nlea     rcx, [rbp+57h+Block]                                           ; +0x6a, 0x140145a7a\ncall    sub_14003A930                                                  ; +0x6e, 0x140145a7e\nnop                                                                    ; +0x73, 0x140145a83\nlea     rdx, asc_140531EF4; \"|\"                                        ; +0x74, 0x140145a84\nlea     rcx, [rbp+57h+Block]                                           ; +0x7b, 0x140145a8b\ncall    sub_140140F70                                                  ; +0x7f, 0x140145a8f\nmov     r12, rax                                                       ; +0x84, 0x140145a94\nmov     rdx, qword ptr [rbp+57h+var_50+8]                              ; +0x87, 0x140145a97\ncmp     rdx, 0Fh                                                       ; +0x8b, 0x140145a9b\njbe     short loc_140145AD5                                            ; +0x8f, 0x140145a9f\ninc     rdx                                                            ; +0x91, 0x140145aa1\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0x94, 0x140145aa4\nmov     rax, rcx                                                       ; +0x98, 0x140145aa8\ncmp     rdx, 1000h                                                     ; +0x9b, 0x140145aab\njb      short loc_140145AD0                                            ; +0xa2, 0x140145ab2\nadd     rdx, 27h ; '''                                                 ; +0xa4, 0x140145ab4\nmov     rcx, [rcx-8]                                                   ; +0xa8, 0x140145ab8\nsub     rax, rcx                                                       ; +0xac, 0x140145abc\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xaf, 0x140145abf\ncmp     rax, 1Fh                                                       ; +0xb3, 0x140145ac3\njbe     short loc_140145AD0                                            ; +0xb7, 0x140145ac7\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb9, 0x140145ac9\nalign 10h                                                              ; +0xbf, 0x140145acf\ncall    j_j_free                                                       ; +0xc0, 0x140145ad0\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0xc5, 0x140145ad5\nmovdqu  [rbp+57h+var_50], xmm0                                         ; +0xcd, 0x140145add\nmov     byte ptr [rbp+57h+Block], 0                                    ; +0xd2, 0x140145ae2\nxor     ebx, ebx                                                       ; +0xd6, 0x140145ae6\nmov     esi, ebx                                                       ; +0xd8, 0x140145ae8\nmov     rcx, r12                                                       ; +0xda, 0x140145aea\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xdd, 0x140145aed\ntest    eax, eax                                                       ; +0xe3, 0x140145af3\njz      loc_140145CC8                                                  ; +0xe5, 0x140145af5\nnop     dword ptr [rax+rax+00h]                                        ; +0xeb, 0x140145afb\nmov     edx, esi                                                       ; +0xf0, 0x140145b00\nmov     rcx, r12                                                       ; +0xf2, 0x140145b02\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xf5, 0x140145b05\nmov     rcx, rax                                                       ; +0xfb, 0x140145b0b\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xfe, 0x140145b0e\nxorps   xmm0, xmm0                                                     ; +0x104, 0x140145b14\nmovups  [rbp+57h+var_80], xmm0                                         ; +0x107, 0x140145b17\nmov     [rbp+57h+var_70], rbx                                          ; +0x10b, 0x140145b1b\nmov     [rbp+57h+var_68], rbx                                          ; +0x10f, 0x140145b1f\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x113, 0x140145b23\nnop     word ptr [rax+rax+00h]                                         ; +0x11a, 0x140145b2a\ninc     r8                                                             ; +0x120, 0x140145b30\ncmp     byte ptr [rax+r8], 0                                           ; +0x123, 0x140145b33\njnz     short loc_140145B30                                            ; +0x128, 0x140145b38\nmov     rdx, rax                                                       ; +0x12a, 0x140145b3a\nlea     rcx, [rbp+57h+var_80]                                          ; +0x12d, 0x140145b3d\ncall    sub_14003A930                                                  ; +0x131, 0x140145b41\nnop                                                                    ; +0x136, 0x140145b46\nlea     rdx, [rbp+57h+var_80]                                          ; +0x137, 0x140145b47\ncmp     [rbp+57h+var_68], 0Fh                                          ; +0x13b, 0x140145b4b\ncmova   rdx, qword ptr [rbp+57h+var_80]                                ; +0x140, 0x140145b50\nxorps   xmm0, xmm0                                                     ; +0x145, 0x140145b55\nmovups  [rbp+57h+var_A0], xmm0                                         ; +0x148, 0x140145b58\nmov     [rbp+57h+var_90], rbx                                          ; +0x14c, 0x140145b5c\nmov     [rbp+57h+var_88], rbx                                          ; +0x150, 0x140145b60\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x154, 0x140145b64\nnop     dword ptr [rax+rax+00h]                                        ; +0x15b, 0x140145b6b\ninc     r8                                                             ; +0x160, 0x140145b70\ncmp     byte ptr [rdx+r8], 0                                           ; +0x163, 0x140145b73\njnz     short loc_140145B70                                            ; +0x168, 0x140145b78\nlea     rcx, [rbp+57h+var_A0]                                          ; +0x16a, 0x140145b7a\ncall    sub_14003A930                                                  ; +0x16e, 0x140145b7e\nnop                                                                    ; +0x173, 0x140145b83\nlea     rdx, asc_140557BAC; \":\"                                        ; +0x174, 0x140145b84\nlea     rcx, [rbp+57h+var_A0]                                          ; +0x17b, 0x140145b8b\ncall    sub_140140F70                                                  ; +0x17f, 0x140145b8f\nmov     rdi, rax                                                       ; +0x184, 0x140145b94\nmov     rdx, [rbp+57h+var_88]                                          ; +0x187, 0x140145b97\ncmp     rdx, 0Fh                                                       ; +0x18b, 0x140145b9b\njbe     short loc_140145BD2                                            ; +0x18f, 0x140145b9f\ninc     rdx                                                            ; +0x191, 0x140145ba1\nmov     rcx, qword ptr [rbp+57h+var_A0]                                ; +0x194, 0x140145ba4\nmov     rax, rcx                                                       ; +0x198, 0x140145ba8\ncmp     rdx, 1000h                                                     ; +0x19b, 0x140145bab\njb      short loc_140145BCD                                            ; +0x1a2, 0x140145bb2\nadd     rdx, 27h ; '''                                                 ; +0x1a4, 0x140145bb4\nmov     rcx, [rcx-8]; Block                                            ; +0x1a8, 0x140145bb8\nsub     rax, rcx                                                       ; +0x1ac, 0x140145bbc\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x1af, 0x140145bbf\ncmp     rax, 1Fh                                                       ; +0x1b3, 0x140145bc3\nja      loc_140145CF7                                                  ; +0x1b7, 0x140145bc7\ncall    j_j_free                                                       ; +0x1bd, 0x140145bcd\nmov     [rbp+57h+var_90], rbx                                          ; +0x1c2, 0x140145bd2\nmov     [rbp+57h+var_88], 0Fh                                          ; +0x1c6, 0x140145bd6\nmov     byte ptr [rbp+57h+var_A0], 0                                   ; +0x1ce, 0x140145bde\nmov     rcx, rdi                                                       ; +0x1d2, 0x140145be2\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1d5, 0x140145be5\ncmp     eax, 3                                                         ; +0x1db, 0x140145beb\njb      loc_140145C7E                                                  ; +0x1de, 0x140145bee\nxor     edx, edx                                                       ; +0x1e4, 0x140145bf4\nmov     rcx, rdi                                                       ; +0x1e6, 0x140145bf6\ncall    cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x1e9, 0x140145bf9\nmov     rcx, rax                                                       ; +0x1ef, 0x140145bff\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x1f2, 0x140145c02\nmov     r14d, eax                                                      ; +0x1f8, 0x140145c08\nmov     edx, 1                                                         ; +0x1fb, 0x140145c0b\nmov     rcx, rdi                                                       ; +0x200, 0x140145c10\ncall    cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x203, 0x140145c13\nmov     rbx, rax                                                       ; +0x209, 0x140145c19\nmov     edx, 2                                                         ; +0x20c, 0x140145c1c\nmov     rcx, rdi                                                       ; +0x211, 0x140145c21\ncall    cs:?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x214, 0x140145c24\nmov     rcx, rax                                                       ; +0x21a, 0x140145c2a\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x21d, 0x140145c2d\nmov     edi, eax                                                       ; +0x223, 0x140145c33\nmov     rcx, rbx                                                       ; +0x225, 0x140145c35\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x228, 0x140145c38\nxorps   xmm0, xmm0                                                     ; +0x22e, 0x140145c3e\nmovups  [rbp+57h+var_A0], xmm0                                         ; +0x231, 0x140145c41\nxor     ebx, ebx                                                       ; +0x235, 0x140145c45\nmov     [rbp+57h+var_90], rbx                                          ; +0x237, 0x140145c47\nmov     [rbp+57h+var_88], rbx                                          ; +0x23b, 0x140145c4b\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x23f, 0x140145c4f\ninc     r8                                                             ; +0x246, 0x140145c56\ncmp     [rax+r8], bl                                                   ; +0x249, 0x140145c59\njnz     short loc_140145C56                                            ; +0x24d, 0x140145c5d\nmov     rdx, rax                                                       ; +0x24f, 0x140145c5f\nlea     rcx, [rbp+57h+var_A0]                                          ; +0x252, 0x140145c62\ncall    sub_14003A930                                                  ; +0x256, 0x140145c66\nlea     r9, [rbp+57h+var_A0]                                           ; +0x25b, 0x140145c6b\nmov     r8d, edi                                                       ; +0x25f, 0x140145c6f\nmov     edx, r14d                                                      ; +0x262, 0x140145c72\nmov     rcx, r13                                                       ; +0x265, 0x140145c75\ncall    GameLevelManager__storeUserName                                ; +0x268, 0x140145c78\nnop                                                                    ; +0x26d, 0x140145c7d\nmov     rdx, [rbp+57h+var_68]                                          ; +0x26e, 0x140145c7e\ncmp     rdx, 0Fh                                                       ; +0x272, 0x140145c82\njbe     short loc_140145CB5                                            ; +0x276, 0x140145c86\ninc     rdx                                                            ; +0x278, 0x140145c88\nmov     rcx, qword ptr [rbp+57h+var_80]                                ; +0x27b, 0x140145c8b\nmov     rax, rcx                                                       ; +0x27f, 0x140145c8f\ncmp     rdx, 1000h                                                     ; +0x282, 0x140145c92\njb      short loc_140145CB0                                            ; +0x289, 0x140145c99\nadd     rdx, 27h ; '''                                                 ; +0x28b, 0x140145c9b\nmov     rcx, [rcx-8]; Block                                            ; +0x28f, 0x140145c9f\nsub     rax, rcx                                                       ; +0x293, 0x140145ca3\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x296, 0x140145ca6\ncmp     rax, 1Fh                                                       ; +0x29a, 0x140145caa\nja      short loc_140145CFE                                            ; +0x29e, 0x140145cae\ncall    j_j_free                                                       ; +0x2a0, 0x140145cb0\ninc     esi                                                            ; +0x2a5, 0x140145cb5\nmov     rcx, r12                                                       ; +0x2a7, 0x140145cb7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2aa, 0x140145cba\ncmp     esi, eax                                                       ; +0x2b0, 0x140145cc0\njb      loc_140145B00                                                  ; +0x2b2, 0x140145cc2\nmov     rcx, r15                                                       ; +0x2b8, 0x140145cc8\ncall    sub_14003A830                                                  ; +0x2bb, 0x140145ccb\nmov     rcx, [rbp+57h+var_40]                                          ; +0x2c0, 0x140145cd0\nxor     rcx, rsp; StackCookie                                          ; +0x2c4, 0x140145cd4\ncall    __security_check_cookie                                        ; +0x2c7, 0x140145cd7\nmov     rbx, [rsp+0D0h+arg_10]                                         ; +0x2cc, 0x140145cdc\nadd     rsp, 0A0h                                                      ; +0x2d4, 0x140145ce4\npop     r15                                                            ; +0x2db, 0x140145ceb\npop     r14                                                            ; +0x2dd, 0x140145ced\npop     r13                                                            ; +0x2df, 0x140145cef\npop     r12                                                            ; +0x2e1, 0x140145cf1\npop     rdi                                                            ; +0x2e3, 0x140145cf3\npop     rsi                                                            ; +0x2e4, 0x140145cf4\npop     rbp                                                            ; +0x2e5, 0x140145cf5\nretn                                                                   ; +0x2e6, 0x140145cf6\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x2e7, 0x140145cf7\nalign 2                                                                ; +0x2ed, 0x140145cfd\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x2ee, 0x140145cfe\ndb 0CCh                                                                ; +0x2f4, 0x140145d04", "xrefs": ["GameLevelManager::onGetOnlineLevelsCompleted @ 0x14014e910", "GameLevelManager::onGetLevelListsCompleted @ 0x140150c8d", "GameLevelManager::processOnDownloadLevelCompleted @ 0x140152766", "<???> @ 0x1406ca584"], "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"}