{"type": "func", "start": 5370044144, "end": 5370044516, "name": "GameLevelManager::userNameForUserID", "pseudocode": "// \n// GameLevelManager::userNameForUserID from 0x140145ef0 to 0x140146064 (372 bytes)\n// \n// 6 xrefs:\n// > CommentCell::loadFromComment @ 0x1400b5d8e\n// > GameLevelManager::tryGetUsername @ 0x14014612a\n// > GJGameLevel::create @ 0x14016bfc9\n// > LevelBrowserLayer::getSearchTitle @ 0x1402cc0c9\n// > LevelBrowserLayer::getSearchTitle @ 0x1402cc23a\n// > <???> @ 0x1406ca59c\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=1\n_QWORD *__fastcall GameLevelManager::userNameForUserID(__int64 a1, _QWORD *a2, int a3)\n{\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // rdi\n  size_t v8; // r8\n  cocos2d::CCString *v9; // rsi\n  void *v10; // rcx\n  const char *v11; // rax\n  void *Block[2]; // [rsp+30h] [rbp-48h] BYREF\n  __m128i si128; // [rsp+40h] [rbp-38h]\n\n  if ( a3 > 0 )\n  {\n    v5 = cocos2d::CCString::createWithFormat(\"%i\", a3);\n    CString = cocos2d::CCString::getCString(v5);\n    *(_OWORD *)Block = 0;\n    si128 = 0;\n    v7 = -1;\n    v8 = -1;\n    do\n      ++v8;\n    while ( CString[v8] );\n    sub_14003A930(Block, CString, v8);\n    v9 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 520), Block);\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v10 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v10 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v10);\n    }\n    si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n    LOBYTE(Block[0]) = 0;\n    if ( v9 )\n    {\n      v11 = cocos2d::CCString::getCString(v9);\n      *(_OWORD *)a2 = 0;\n      a2[2] = 0;\n      a2[3] = 0;\n      do\n        ++v7;\n      while ( v11[v7] );\n      sub_14003A930(a2, v11, v7);\n    }\n    else\n    {\n      *(_OWORD *)a2 = 0;\n      a2[2] = 1;\n      a2[3] = 15;\n      *(_WORD *)a2 = 45;\n    }\n  }\n  else\n  {\n    *(_OWORD *)a2 = 0;\n    a2[2] = 1;\n    a2[3] = 15;\n    *(_WORD *)a2 = 45;\n  }\n  return a2;\n}", "assembly": "; \n; GameLevelManager::userNameForUserID from 0x140145ef0 to 0x140146064 (372 bytes)\n; \n; 6 xrefs:\n; > CommentCell::loadFromComment @ 0x1400b5d8e\n; > GameLevelManager::tryGetUsername @ 0x14014612a\n; > GJGameLevel::create @ 0x14016bfc9\n; > LevelBrowserLayer::getSearchTitle @ 0x1402cc0c9\n; > LevelBrowserLayer::getSearchTitle @ 0x1402cc23a\n; > <???> @ 0x1406ca59c\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+arg_18], rbx                                              ; +0x0, 0x140145ef0\npush    rbp                                                            ; +0x5, 0x140145ef5\npush    rsi                                                            ; +0x6, 0x140145ef6\npush    rdi                                                            ; +0x7, 0x140145ef7\nsub     rsp, 60h                                                       ; +0x8, 0x140145ef8\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x140145efc\nxor     rax, rsp                                                       ; +0x13, 0x140145f03\nmov     [rsp+78h+var_28], rax                                          ; +0x16, 0x140145f06\nmov     rbx, rdx                                                       ; +0x1b, 0x140145f0b\nmov     rsi, rcx                                                       ; +0x1e, 0x140145f0e\nmov     [rsp+78h+var_50], rdx                                          ; +0x21, 0x140145f11\nxor     ebp, ebp                                                       ; +0x26, 0x140145f16\ntest    r8d, r8d                                                       ; +0x28, 0x140145f18\njg      short loc_140145F3D                                            ; +0x2b, 0x140145f1b\nxorps   xmm0, xmm0                                                     ; +0x2d, 0x140145f1d\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x30, 0x140145f20\nmov     qword ptr [rdx+10h], 1                                         ; +0x33, 0x140145f23\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x3b, 0x140145f2b\nmov     word ptr [rdx], 2Dh ; '-'                                      ; +0x43, 0x140145f33\njmp     loc_140146044                                                  ; +0x48, 0x140145f38\nmov     edx, r8d                                                       ; +0x4d, 0x140145f3d\nlea     rcx, aI_11; \"%i\"                                               ; +0x50, 0x140145f40\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x57, 0x140145f47\nmov     rcx, rax                                                       ; +0x5d, 0x140145f4d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x60, 0x140145f50\nxorps   xmm0, xmm0                                                     ; +0x66, 0x140145f56\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x69, 0x140145f59\nxorps   xmm1, xmm1                                                     ; +0x6e, 0x140145f5e\nmovdqu  [rsp+78h+var_38], xmm1                                         ; +0x71, 0x140145f61\nmov     rdi, 0FFFFFFFFFFFFFFFFh                                        ; +0x77, 0x140145f67\nmov     r8, rdi                                                        ; +0x7e, 0x140145f6e\ninc     r8                                                             ; +0x81, 0x140145f71\ncmp     [rax+r8], bpl                                                  ; +0x84, 0x140145f74\njnz     short loc_140145F71                                            ; +0x88, 0x140145f78\nmov     rdx, rax                                                       ; +0x8a, 0x140145f7a\nlea     rcx, [rsp+78h+Block]                                           ; +0x8d, 0x140145f7d\ncall    sub_14003A930                                                  ; +0x92, 0x140145f82\nnop                                                                    ; +0x97, 0x140145f87\nlea     rdx, [rsp+78h+Block]                                           ; +0x98, 0x140145f88\nmov     rcx, [rsi+208h]                                                ; +0x9d, 0x140145f8d\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0xa4, 0x140145f94\nmov     rsi, rax                                                       ; +0xaa, 0x140145f9a\nmov     rdx, qword ptr [rsp+78h+var_38+8]                              ; +0xad, 0x140145f9d\ncmp     rdx, 0Fh                                                       ; +0xb2, 0x140145fa2\njbe     short loc_140145FDD                                            ; +0xb6, 0x140145fa6\ninc     rdx                                                            ; +0xb8, 0x140145fa8\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0xbb, 0x140145fab\nmov     rax, rcx                                                       ; +0xc0, 0x140145fb0\ncmp     rdx, 1000h                                                     ; +0xc3, 0x140145fb3\njb      short loc_140145FD8                                            ; +0xca, 0x140145fba\nadd     rdx, 27h ; '''                                                 ; +0xcc, 0x140145fbc\nmov     rcx, [rcx-8]                                                   ; +0xd0, 0x140145fc0\nsub     rax, rcx                                                       ; +0xd4, 0x140145fc4\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xd7, 0x140145fc7\ncmp     rax, 1Fh                                                       ; +0xdb, 0x140145fcb\njbe     short loc_140145FD8                                            ; +0xdf, 0x140145fcf\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xe1, 0x140145fd1\nalign 8                                                                ; +0xe7, 0x140145fd7\ncall    j_j_free                                                       ; +0xe8, 0x140145fd8\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0xed, 0x140145fdd\nmovdqu  [rsp+78h+var_38], xmm0                                         ; +0xf5, 0x140145fe5\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0xfb, 0x140145feb\ntest    rsi, rsi                                                       ; +0x100, 0x140145ff0\njz      short loc_140146029                                            ; +0x103, 0x140145ff3\nmov     rcx, rsi                                                       ; +0x105, 0x140145ff5\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x108, 0x140145ff8\nxorps   xmm0, xmm0                                                     ; +0x10e, 0x140145ffe\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x111, 0x140146001\nmov     [rbx+10h], rbp                                                 ; +0x114, 0x140146004\nmov     [rbx+18h], rbp                                                 ; +0x118, 0x140146008\nnop     dword ptr [rax+00h]                                            ; +0x11c, 0x14014600c\ninc     rdi                                                            ; +0x120, 0x140146010\ncmp     byte ptr [rax+rdi], 0                                          ; +0x123, 0x140146013\njnz     short loc_140146010                                            ; +0x127, 0x140146017\nmov     r8, rdi                                                        ; +0x129, 0x140146019\nmov     rdx, rax                                                       ; +0x12c, 0x14014601c\nmov     rcx, rbx                                                       ; +0x12f, 0x14014601f\ncall    sub_14003A930                                                  ; +0x132, 0x140146022\njmp     short loc_140146044                                            ; +0x137, 0x140146027\nxorps   xmm0, xmm0                                                     ; +0x139, 0x140146029\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x13c, 0x14014602c\nmov     qword ptr [rbx+10h], 1                                         ; +0x13f, 0x14014602f\nmov     qword ptr [rbx+18h], 0Fh                                       ; +0x147, 0x140146037\nmov     word ptr [rbx], 2Dh ; '-'                                      ; +0x14f, 0x14014603f\nmov     rax, rbx                                                       ; +0x154, 0x140146044\nmov     rcx, [rsp+78h+var_28]                                          ; +0x157, 0x140146047\nxor     rcx, rsp; StackCookie                                          ; +0x15c, 0x14014604c\ncall    __security_check_cookie                                        ; +0x15f, 0x14014604f\nmov     rbx, [rsp+78h+arg_18]                                          ; +0x164, 0x140146054\nadd     rsp, 60h                                                       ; +0x16c, 0x14014605c\npop     rdi                                                            ; +0x170, 0x140146060\npop     rsi                                                            ; +0x171, 0x140146061\npop     rbp                                                            ; +0x172, 0x140146062\nretn                                                                   ; +0x173, 0x140146063", "xrefs": ["CommentCell::loadFromComment @ 0x1400b5d8e", "GameLevelManager::tryGetUsername @ 0x14014612a", "GJGameLevel::create @ 0x14016bfc9", "LevelBrowserLayer::getSearchTitle @ 0x1402cc0c9", "LevelBrowserLayer::getSearchTitle @ 0x1402cc23a", "<???> @ 0x1406ca59c"], "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"}