{"type": "func", "start": 4300399456, "end": 4300399834, "name": "GameLevelManager::userNameForUserID", "pseudocode": "// \n// GameLevelManager::userNameForUserID from 0x10052e360 to 0x10052e4da (378 bytes)\n// \n// 5 xrefs:\n// > CommentCell::loadFromComment @ 0x1002478b5\n// > LevelBrowserLayer::getSearchTitle @ 0x10049034c\n// > LevelBrowserLayer::getSearchTitle @ 0x1004903de\n// > GameLevelManager::tryGetUsername @ 0x10052e71c\n// > GJGameLevel::create @ 0x10052ffd3\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_QWORD *__fastcall GameLevelManager::userNameForUserID(_QWORD *a1, __int64 a2, int a3, double a4)\n{\n  __int64 v4; // r14\n  cocos2d::CCString *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; // r14\n  cocos2d::CCString *v11; // r14\n  const char *v12; // r15\n  size_t v13; // rax\n  size_t v14; // r14\n  char *v15; // r12\n  char *v16; // r12\n  size_t v17; // r13\n  char v19; // [rsp+0h] [rbp-50h]\n  __int64 v20; // [rsp+8h] [rbp-48h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  if ( a3 <= 0 )\n    goto LABEL_17;\n  v4 = *(_QWORD *)(a2 + 536);\n  v5 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v19);\n  CString = cocos2d::CCString::getCString(v5);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    goto LABEL_24;\n  v8 = v7;\n  if ( v7 >= 0x17 )\n  {\n    v20 = v4;\n    v10 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v10 = (v7 | 7) + 1;\n    v9 = (char *)operator new(v10);\n    __p = v9;\n    __dst[0] = v10 + 1;\n    v4 = v20;\n    __dst[1] = v8;\n    goto LABEL_9;\n  }\n  LOBYTE(__dst[0]) = 2 * v7;\n  v9 = (char *)__dst + 1;\n  if ( v7 )\nLABEL_9:\n    memmove(v9, CString, v8);\n  v9[v8] = 0;\n  v11 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey_1(v4, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  if ( v11 )\n  {\n    v12 = cocos2d::CCString::getCString(v11);\n    v13 = strlen(v12);\n    if ( v13 < 0xFFFFFFFFFFFFFFF8LL )\n    {\n      v14 = v13;\n      if ( v13 >= 0x17 )\n      {\n        v17 = 26;\n        if ( (v13 | 7) != 0x17 )\n          v17 = (v13 | 7) + 1;\n        v15 = (char *)operator new(v17);\n        a1[2] = v15;\n        *a1 = v17 + 1;\n        a1[1] = v14;\n      }\n      else\n      {\n        *(_BYTE *)a1 = 2 * v13;\n        v15 = (char *)a1 + 1;\n        if ( !v13 )\n          goto LABEL_22;\n      }\n      memmove(v15, v12, v14);\nLABEL_22:\n      v16 = &v15[v14];\n      goto LABEL_23;\n    }\nLABEL_24:\n    sub_100006BF0(a4);\n  }\nLABEL_17:\n  *(_WORD *)a1 = 11522;\n  v16 = (char *)a1 + 2;\nLABEL_23:\n  *v16 = 0;\n  return a1;\n}", "assembly": "; \n; GameLevelManager::userNameForUserID from 0x10052e360 to 0x10052e4da (378 bytes)\n; \n; 5 xrefs:\n; > CommentCell::loadFromComment @ 0x1002478b5\n; > LevelBrowserLayer::getSearchTitle @ 0x10049034c\n; > LevelBrowserLayer::getSearchTitle @ 0x1004903de\n; > GameLevelManager::tryGetUsername @ 0x10052e71c\n; > GJGameLevel::create @ 0x10052ffd3\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, 0x10052e360\nmov     rbp, rsp                                                       ; +0x1, 0x10052e361\npush    r15                                                            ; +0x4, 0x10052e364\npush    r14                                                            ; +0x6, 0x10052e366\npush    r13                                                            ; +0x8, 0x10052e368\npush    r12                                                            ; +0xa, 0x10052e36a\npush    rbx                                                            ; +0xc, 0x10052e36c\nsub     rsp, 28h                                                       ; +0xd, 0x10052e36d\nmov     rbx, rdi                                                       ; +0x11, 0x10052e371\ntest    edx, edx                                                       ; +0x14, 0x10052e374\njle     loc_10052E470                                                  ; +0x16, 0x10052e376\nmov     r14, [rsi+218h]                                                ; +0x1c, 0x10052e37c\nlea     rdi, aI; \"%i\"                                                  ; +0x23, 0x10052e383\nmov     esi, edx                                                       ; +0x2a, 0x10052e38a\nxor     eax, eax                                                       ; +0x2c, 0x10052e38c\ncall    sub_1007AB580                                                  ; +0x2e, 0x10052e38e\nmov     rdi, rax                                                       ; +0x33, 0x10052e393\ncall    cocos2d__CCString__getCString                                  ; +0x36, 0x10052e396\nmov     r12, rax                                                       ; +0x3b, 0x10052e39b\nmov     rdi, rax; __s                                                  ; +0x3e, 0x10052e39e\ncall    _strlen                                                        ; +0x41, 0x10052e3a1\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x46, 0x10052e3a6\njnb     loc_10052E4D5                                                  ; +0x4a, 0x10052e3aa\nmov     r15, rax                                                       ; +0x50, 0x10052e3b0\ncmp     rax, 17h                                                       ; +0x53, 0x10052e3b3\njnb     short loc_10052E3CB                                            ; +0x57, 0x10052e3b7\nlea     eax, [r15+r15]                                                 ; +0x59, 0x10052e3b9\nmov     byte ptr [rbp+__dst], al                                       ; +0x5d, 0x10052e3bd\nlea     r13, [rbp+__dst+1]                                             ; +0x60, 0x10052e3c0\ntest    r15, r15                                                       ; +0x64, 0x10052e3c4\njnz     short loc_10052E406                                            ; +0x67, 0x10052e3c7\njmp     short loc_10052E414                                            ; +0x69, 0x10052e3c9\nmov     rax, r15                                                       ; +0x6b, 0x10052e3cb\nor      rax, 7                                                         ; +0x6e, 0x10052e3ce\nlea     rcx, [rax+1]                                                   ; +0x72, 0x10052e3d2\ncmp     rax, 17h                                                       ; +0x76, 0x10052e3d6\nmov     [rbp+var_48], r14                                              ; +0x7a, 0x10052e3da\nmov     r14d, 1Ah                                                      ; +0x7e, 0x10052e3de\ncmovnz  r14, rcx                                                       ; +0x84, 0x10052e3e4\nmov     rdi, r14; __sz                                                 ; +0x88, 0x10052e3e8\ncall    __Znwm; operator new(ulong)                                    ; +0x8b, 0x10052e3eb\nmov     r13, rax                                                       ; +0x90, 0x10052e3f0\nmov     [rbp+__p], rax                                                 ; +0x93, 0x10052e3f3\ninc     r14                                                            ; +0x97, 0x10052e3f7\nmov     [rbp+__dst], r14                                               ; +0x9a, 0x10052e3fa\nmov     r14, [rbp+var_48]                                              ; +0x9e, 0x10052e3fe\nmov     [rbp+var_38], r15                                              ; +0xa2, 0x10052e402\nmov     rdi, r13; __dst                                                ; +0xa6, 0x10052e406\nmov     rsi, r12; __src                                                ; +0xa9, 0x10052e409\nmov     rdx, r15; __len                                                ; +0xac, 0x10052e40c\ncall    _memmove                                                       ; +0xaf, 0x10052e40f\nmov     byte ptr [r13+r15+0], 0                                        ; +0xb4, 0x10052e414\nlea     rsi, [rbp+__dst]                                               ; +0xba, 0x10052e41a\nmov     rdi, r14                                                       ; +0xbe, 0x10052e41e\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0xc1, 0x10052e421\nmov     r14, rax                                                       ; +0xc6, 0x10052e426\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc9, 0x10052e429\njz      short loc_10052E438                                            ; +0xcd, 0x10052e42d\nmov     rdi, [rbp+__p]; __p                                            ; +0xcf, 0x10052e42f\ncall    __ZdlPv; operator delete(void *)                               ; +0xd3, 0x10052e433\ntest    r14, r14                                                       ; +0xd8, 0x10052e438\njz      short loc_10052E470                                            ; +0xdb, 0x10052e43b\nmov     rdi, r14                                                       ; +0xdd, 0x10052e43d\ncall    cocos2d__CCString__getCString                                  ; +0xe0, 0x10052e440\nmov     r15, rax                                                       ; +0xe5, 0x10052e445\nmov     rdi, rax; __s                                                  ; +0xe8, 0x10052e448\ncall    _strlen                                                        ; +0xeb, 0x10052e44b\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xf0, 0x10052e450\njnb     short loc_10052E4D5                                            ; +0xf4, 0x10052e454\nmov     r14, rax                                                       ; +0xf6, 0x10052e456\ncmp     rax, 17h                                                       ; +0xf9, 0x10052e459\njnb     short loc_10052E47B                                            ; +0xfd, 0x10052e45d\nlea     eax, [r14+r14]                                                 ; +0xff, 0x10052e45f\nmov     [rbx], al                                                      ; +0x103, 0x10052e463\nlea     r12, [rbx+1]                                                   ; +0x105, 0x10052e465\ntest    r14, r14                                                       ; +0x109, 0x10052e469\njnz     short loc_10052E4AD                                            ; +0x10c, 0x10052e46c\njmp     short loc_10052E4BB                                            ; +0x10e, 0x10052e46e\nmov     word ptr [rbx], 2D02h                                          ; +0x110, 0x10052e470\nlea     r12, [rbx+2]                                                   ; +0x115, 0x10052e475\njmp     short loc_10052E4BE                                            ; +0x119, 0x10052e479\nmov     rax, r14                                                       ; +0x11b, 0x10052e47b\nor      rax, 7                                                         ; +0x11e, 0x10052e47e\nlea     rcx, [rax+1]                                                   ; +0x122, 0x10052e482\ncmp     rax, 17h                                                       ; +0x126, 0x10052e486\nmov     r13d, 1Ah                                                      ; +0x12a, 0x10052e48a\ncmovnz  r13, rcx                                                       ; +0x130, 0x10052e490\nmov     rdi, r13; __sz                                                 ; +0x134, 0x10052e494\ncall    __Znwm; operator new(ulong)                                    ; +0x137, 0x10052e497\nmov     r12, rax                                                       ; +0x13c, 0x10052e49c\nmov     [rbx+10h], rax                                                 ; +0x13f, 0x10052e49f\ninc     r13                                                            ; +0x143, 0x10052e4a3\nmov     [rbx], r13                                                     ; +0x146, 0x10052e4a6\nmov     [rbx+8], r14                                                   ; +0x149, 0x10052e4a9\nmov     rdi, r12; __dst                                                ; +0x14d, 0x10052e4ad\nmov     rsi, r15; __src                                                ; +0x150, 0x10052e4b0\nmov     rdx, r14; __len                                                ; +0x153, 0x10052e4b3\ncall    _memmove                                                       ; +0x156, 0x10052e4b6\nadd     r12, r14                                                       ; +0x15b, 0x10052e4bb\nmov     byte ptr [r12], 0                                              ; +0x15e, 0x10052e4be\nmov     rax, rbx                                                       ; +0x163, 0x10052e4c3\nadd     rsp, 28h                                                       ; +0x166, 0x10052e4c6\npop     rbx                                                            ; +0x16a, 0x10052e4ca\npop     r12                                                            ; +0x16b, 0x10052e4cb\npop     r13                                                            ; +0x16d, 0x10052e4cd\npop     r14                                                            ; +0x16f, 0x10052e4cf\npop     r15                                                            ; +0x171, 0x10052e4d1\npop     rbp                                                            ; +0x173, 0x10052e4d3\nretn                                                                   ; +0x174, 0x10052e4d4\ncall    sub_100006BF0                                                  ; +0x175, 0x10052e4d5", "xrefs": ["CommentCell::loadFromComment @ 0x1002478b5", "LevelBrowserLayer::getSearchTitle @ 0x10049034c", "LevelBrowserLayer::getSearchTitle @ 0x1004903de", "GameLevelManager::tryGetUsername @ 0x10052e71c", "GJGameLevel::create @ 0x10052ffd3"], "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"}