{"type": "func", "start": 5370043664, "end": 5370044132, "name": "GameLevelManager::storeUserName", "pseudocode": "// \n// GameLevelManager::storeUserName from 0x140145d10 to 0x140145ee4 (468 bytes)\n// \n// 9 xrefs:\n// > GameLevelManager::storeUserNames @ 0x140145c78\n// > GameLevelManager::createAndGetScores @ 0x1401473b2\n// > GameLevelManager::dataLoaded @ 0x14014c568\n// > GameLevelManager::onGetUserMessagesCompleted @ 0x14015a8ec\n// > GameLevelManager::createAndGetCommentsFull @ 0x14015d379\n// > GameLevelManager::onGetFriendRequestsCompleted @ 0x14016043e\n// > GameLevelManager::onGetUserListCompleted @ 0x140162f2c\n// > ProfilePage::init @ 0x1403becbf\n// > <???> @ 0x1406ca590\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=3\nvoid __fastcall GameLevelManager::storeUserName(__int64 a1, int a2, int a3, _QWORD *a4)\n{\n  __int64 v5; // rsi\n  __int64 v6; // rbp\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rax\n  size_t v10; // rbx\n  size_t v11; // r8\n  _BYTE *v12; // rdx\n  __int64 v13; // rax\n  void *v14; // rcx\n  void *v15; // rcx\n  struct cocos2d::CCString *v16; // rax\n  struct cocos2d::CCString *v17; // rax\n  void *Block[2]; // [rsp+28h] [rbp-70h] BYREF\n  __m128i si128; // [rsp+38h] [rbp-60h]\n  void *v20[2]; // [rsp+48h] [rbp-50h] BYREF\n  __int128 v21; // [rsp+58h] [rbp-40h]\n\n  v5 = a3;\n  v6 = a2;\n  if ( a2 > 0 )\n  {\n    v8 = cocos2d::CCString::createWithFormat(\"%i\", (unsigned int)a2);\n    CString = cocos2d::CCString::getCString(v8);\n    *(_OWORD *)v20 = 0;\n    v21 = 0;\n    v10 = -1;\n    v11 = -1;\n    do\n      ++v11;\n    while ( CString[v11] );\n    sub_14003A930(v20, CString, v11);\n    v12 = a4;\n    if ( a4[3] > 0xFu )\n      v12 = (_BYTE *)*a4;\n    *(_OWORD *)Block = 0;\n    si128 = 0;\n    do\n      ++v10;\n    while ( v12[v10] );\n    sub_14003A930(Block, v12, v10);\n    v13 = cocos2d::CCString::create(Block);\n    cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 520), v13, v20);\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v14 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v14 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v14);\n    }\n    si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n    LOBYTE(Block[0]) = 0;\n    if ( *((_QWORD *)&v21 + 1) > 0xFu )\n    {\n      v15 = v20[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v21 + 1) + 1LL) >= 0x1000 )\n      {\n        v15 = *((void **)v20[0] - 1);\n        if ( (unsigned __int64)((char *)v20[0] - (char *)v15 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v15);\n    }\n    if ( (int)v5 > 0 )\n    {\n      v16 = cocos2d::CCString::createWithFormat(\"%i\", v5);\n      cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 536), v16, v6);\n      v17 = cocos2d::CCString::createWithFormat(\"%i\", v6);\n      cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 528), v17, v5);\n    }\n  }\n  sub_14003A830((__int64)a4);\n}", "assembly": "; \n; GameLevelManager::storeUserName from 0x140145d10 to 0x140145ee4 (468 bytes)\n; \n; 9 xrefs:\n; > GameLevelManager::storeUserNames @ 0x140145c78\n; > GameLevelManager::createAndGetScores @ 0x1401473b2\n; > GameLevelManager::dataLoaded @ 0x14014c568\n; > GameLevelManager::onGetUserMessagesCompleted @ 0x14015a8ec\n; > GameLevelManager::createAndGetCommentsFull @ 0x14015d379\n; > GameLevelManager::onGetFriendRequestsCompleted @ 0x14016043e\n; > GameLevelManager::onGetUserListCompleted @ 0x140162f2c\n; > ProfilePage::init @ 0x1403becbf\n; > <???> @ 0x1406ca590\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    rbx                                                            ; +0x0, 0x140145d10\npush    rbp                                                            ; +0x2, 0x140145d12\npush    rsi                                                            ; +0x3, 0x140145d13\npush    rdi                                                            ; +0x4, 0x140145d14\npush    r14                                                            ; +0x5, 0x140145d15\nsub     rsp, 70h                                                       ; +0x7, 0x140145d17\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x140145d1b\nxor     rax, rsp                                                       ; +0x12, 0x140145d22\nmov     [rsp+98h+var_30], rax                                          ; +0x15, 0x140145d25\nmov     rdi, r9                                                        ; +0x1a, 0x140145d2a\nmovsxd  rsi, r8d                                                       ; +0x1d, 0x140145d2d\nmovsxd  rbp, edx                                                       ; +0x20, 0x140145d30\nmov     r14, rcx                                                       ; +0x23, 0x140145d33\nmov     [rsp+98h+var_78], r9                                           ; +0x26, 0x140145d36\ntest    edx, edx                                                       ; +0x2b, 0x140145d3b\njle     loc_140145EC4                                                  ; +0x2d, 0x140145d3d\nmov     edx, ebp                                                       ; +0x33, 0x140145d43\nlea     rcx, aI_11; \"%i\"                                               ; +0x35, 0x140145d45\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x3c, 0x140145d4c\nmov     rcx, rax                                                       ; +0x42, 0x140145d52\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x45, 0x140145d55\nxorps   xmm0, xmm0                                                     ; +0x4b, 0x140145d5b\nmovups  xmmword ptr [rsp+98h+var_50], xmm0                             ; +0x4e, 0x140145d5e\nxorps   xmm1, xmm1                                                     ; +0x53, 0x140145d63\nmovdqu  [rsp+98h+var_40], xmm1                                         ; +0x56, 0x140145d66\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x5c, 0x140145d6c\nmov     r8, rbx                                                        ; +0x63, 0x140145d73\ninc     r8                                                             ; +0x66, 0x140145d76\ncmp     byte ptr [rax+r8], 0                                           ; +0x69, 0x140145d79\njnz     short loc_140145D76                                            ; +0x6e, 0x140145d7e\nmov     rdx, rax                                                       ; +0x70, 0x140145d80\nlea     rcx, [rsp+98h+var_50]                                          ; +0x73, 0x140145d83\ncall    sub_14003A930                                                  ; +0x78, 0x140145d88\nnop                                                                    ; +0x7d, 0x140145d8d\nmov     rdx, rdi                                                       ; +0x7e, 0x140145d8e\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x81, 0x140145d91\njbe     short loc_140145D9B                                            ; +0x86, 0x140145d96\nmov     rdx, [rdi]                                                     ; +0x88, 0x140145d98\nxorps   xmm0, xmm0                                                     ; +0x8b, 0x140145d9b\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0x8e, 0x140145d9e\nxorps   xmm1, xmm1                                                     ; +0x93, 0x140145da3\nmovdqu  [rsp+98h+var_60], xmm1                                         ; +0x96, 0x140145da6\nnop     dword ptr [rax+00h]                                            ; +0x9c, 0x140145dac\ninc     rbx                                                            ; +0xa0, 0x140145db0\ncmp     byte ptr [rdx+rbx], 0                                          ; +0xa3, 0x140145db3\njnz     short loc_140145DB0                                            ; +0xa7, 0x140145db7\nmov     r8, rbx                                                        ; +0xa9, 0x140145db9\nlea     rcx, [rsp+98h+Block]                                           ; +0xac, 0x140145dbc\ncall    sub_14003A930                                                  ; +0xb1, 0x140145dc1\nnop                                                                    ; +0xb6, 0x140145dc6\nlea     rcx, [rsp+98h+Block]                                           ; +0xb7, 0x140145dc7\ncall    cs:?create@CCString@cocos2d@@SAPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCString::create(std::string const &) ; +0xbc, 0x140145dcc\nmov     rdx, rax                                                       ; +0xc2, 0x140145dd2\nlea     r8, [rsp+98h+var_50]                                           ; +0xc5, 0x140145dd5\nmov     rcx, [r14+208h]                                                ; +0xca, 0x140145dda\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0xd1, 0x140145de1\nnop                                                                    ; +0xd7, 0x140145de7\nmov     rdx, qword ptr [rsp+98h+var_60+8]                              ; +0xd8, 0x140145de8\ncmp     rdx, 0Fh                                                       ; +0xdd, 0x140145ded\njbe     short loc_140145E28                                            ; +0xe1, 0x140145df1\ninc     rdx                                                            ; +0xe3, 0x140145df3\nmov     rcx, [rsp+98h+Block]; Block                                    ; +0xe6, 0x140145df6\nmov     rax, rcx                                                       ; +0xeb, 0x140145dfb\ncmp     rdx, 1000h                                                     ; +0xee, 0x140145dfe\njb      short loc_140145E23                                            ; +0xf5, 0x140145e05\nadd     rdx, 27h ; '''                                                 ; +0xf7, 0x140145e07\nmov     rcx, [rcx-8]                                                   ; +0xfb, 0x140145e0b\nsub     rax, rcx                                                       ; +0xff, 0x140145e0f\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x102, 0x140145e12\ncmp     rax, 1Fh                                                       ; +0x106, 0x140145e16\njbe     short loc_140145E23                                            ; +0x10a, 0x140145e1a\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x10c, 0x140145e1c\ndb 0CCh                                                                ; +0x112, 0x140145e22\ncall    j_j_free                                                       ; +0x113, 0x140145e23\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0x118, 0x140145e28\nmovdqu  [rsp+98h+var_60], xmm0                                         ; +0x120, 0x140145e30\nmov     byte ptr [rsp+98h+Block], 0                                    ; +0x126, 0x140145e36\nmov     rdx, qword ptr [rsp+98h+var_40+8]                              ; +0x12b, 0x140145e3b\ncmp     rdx, 0Fh                                                       ; +0x130, 0x140145e40\njbe     short loc_140145E7B                                            ; +0x134, 0x140145e44\ninc     rdx                                                            ; +0x136, 0x140145e46\nmov     rcx, [rsp+98h+var_50]; Block                                   ; +0x139, 0x140145e49\nmov     rax, rcx                                                       ; +0x13e, 0x140145e4e\ncmp     rdx, 1000h                                                     ; +0x141, 0x140145e51\njb      short loc_140145E76                                            ; +0x148, 0x140145e58\nadd     rdx, 27h ; '''                                                 ; +0x14a, 0x140145e5a\nmov     rcx, [rcx-8]                                                   ; +0x14e, 0x140145e5e\nsub     rax, rcx                                                       ; +0x152, 0x140145e62\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x155, 0x140145e65\ncmp     rax, 1Fh                                                       ; +0x159, 0x140145e69\njbe     short loc_140145E76                                            ; +0x15d, 0x140145e6d\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x15f, 0x140145e6f\nalign 2                                                                ; +0x165, 0x140145e75\ncall    j_j_free                                                       ; +0x166, 0x140145e76\ntest    esi, esi                                                       ; +0x16b, 0x140145e7b\njle     short loc_140145EC4                                            ; +0x16d, 0x140145e7d\nmov     edx, esi                                                       ; +0x16f, 0x140145e7f\nlea     rcx, aI_11; \"%i\"                                               ; +0x171, 0x140145e81\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x178, 0x140145e88\nmov     rdx, rax                                                       ; +0x17e, 0x140145e8e\nmov     r8, rbp                                                        ; +0x181, 0x140145e91\nmov     rcx, [r14+218h]                                                ; +0x184, 0x140145e94\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x18b, 0x140145e9b\nmov     edx, ebp                                                       ; +0x191, 0x140145ea1\nlea     rcx, aI_11; \"%i\"                                               ; +0x193, 0x140145ea3\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x19a, 0x140145eaa\nmov     rdx, rax                                                       ; +0x1a0, 0x140145eb0\nmov     r8, rsi                                                        ; +0x1a3, 0x140145eb3\nmov     rcx, [r14+210h]                                                ; +0x1a6, 0x140145eb6\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x1ad, 0x140145ebd\nnop                                                                    ; +0x1b3, 0x140145ec3\nmov     rcx, rdi                                                       ; +0x1b4, 0x140145ec4\ncall    sub_14003A830                                                  ; +0x1b7, 0x140145ec7\nmov     rcx, [rsp+98h+var_30]                                          ; +0x1bc, 0x140145ecc\nxor     rcx, rsp; StackCookie                                          ; +0x1c1, 0x140145ed1\ncall    __security_check_cookie                                        ; +0x1c4, 0x140145ed4\nadd     rsp, 70h                                                       ; +0x1c9, 0x140145ed9\npop     r14                                                            ; +0x1cd, 0x140145edd\npop     rdi                                                            ; +0x1cf, 0x140145edf\npop     rsi                                                            ; +0x1d0, 0x140145ee0\npop     rbp                                                            ; +0x1d1, 0x140145ee1\npop     rbx                                                            ; +0x1d2, 0x140145ee2\nretn                                                                   ; +0x1d3, 0x140145ee3", "xrefs": ["GameLevelManager::storeUserNames @ 0x140145c78", "GameLevelManager::createAndGetScores @ 0x1401473b2", "GameLevelManager::dataLoaded @ 0x14014c568", "GameLevelManager::onGetUserMessagesCompleted @ 0x14015a8ec", "GameLevelManager::createAndGetCommentsFull @ 0x14015d379", "GameLevelManager::onGetFriendRequestsCompleted @ 0x14016043e", "GameLevelManager::onGetUserListCompleted @ 0x140162f2c", "ProfilePage::init @ 0x1403becbf", "<???> @ 0x1406ca590"], "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"}