{"type": "func", "start": 4300472928, "end": 4300473306, "name": "GameLevelManager::userNameForUserID", "pseudocode": "// \n// GameLevelManager::userNameForUserID from 0x100540260 to 0x1005403da (378 bytes)\n// \n// 5 xrefs:\n// > CommentCell::loadFromComment @ 0x10022d535\n// > LevelBrowserLayer::getSearchTitle @ 0x1004863dc\n// > LevelBrowserLayer::getSearchTitle @ 0x10048646e\n// > GameLevelManager::tryGetUsername @ 0x10054044d\n// > GJGameLevel::create @ 0x100541964\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:31:57 +0000\n// \n\n_QWORD *__fastcall GameLevelManager::userNameForUserID(_QWORD *a1, __int64 a2, int a3)\n{\n  __int64 v3; // r14\n  __int64 v4; // rax\n  const char *CString; // r12\n  size_t v6; // rax\n  size_t v7; // r15\n  char *v8; // r13\n  size_t v9; // r14\n  __int64 v10; // r14\n  const char *v11; // r15\n  size_t v12; // rax\n  size_t v13; // r14\n  char *v14; // r12\n  char *v15; // r12\n  size_t v16; // r13\n  char v18; // [rsp+0h] [rbp-50h]\n  __int64 v19; // [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  v3 = *(_QWORD *)(a2 + 976);\n  v4 = sub_10088E820(\"%i\", v18);\n  CString = (const char *)cocos2d::CCString::getCString(v4);\n  v6 = strlen(CString);\n  if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )\n    goto LABEL_24;\n  v7 = v6;\n  if ( v6 >= 0x17 )\n  {\n    v19 = v3;\n    v9 = 26;\n    if ( (v6 | 7) != 0x17 )\n      v9 = (v6 | 7) + 1;\n    v8 = (char *)operator new(v9);\n    __p = v8;\n    __dst[0] = v9 + 1;\n    v3 = v19;\n    __dst[1] = v7;\n    goto LABEL_9;\n  }\n  LOBYTE(__dst[0]) = 2 * v6;\n  v8 = (char *)__dst + 1;\n  if ( v6 )\nLABEL_9:\n    memmove(v8, CString, v7);\n  v8[v7] = 0;\n  v10 = cocos2d::CCDictionary::objectForKey(v3, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  if ( v10 )\n  {\n    v11 = (const char *)cocos2d::CCString::getCString(v10);\n    v12 = strlen(v11);\n    if ( v12 < 0xFFFFFFFFFFFFFFF8LL )\n    {\n      v13 = v12;\n      if ( v12 >= 0x17 )\n      {\n        v16 = 26;\n        if ( (v12 | 7) != 0x17 )\n          v16 = (v12 | 7) + 1;\n        v14 = (char *)operator new(v16);\n        a1[2] = v14;\n        *a1 = v16 + 1;\n        a1[1] = v13;\n      }\n      else\n      {\n        *(_BYTE *)a1 = 2 * v12;\n        v14 = (char *)a1 + 1;\n        if ( !v12 )\n          goto LABEL_22;\n      }\n      memmove(v14, v11, v13);\nLABEL_22:\n      v15 = &v14[v13];\n      goto LABEL_23;\n    }\nLABEL_24:\n    sub_100003630();\n  }\nLABEL_17:\n  *(_WORD *)a1 = 11522;\n  v15 = (char *)a1 + 2;\nLABEL_23:\n  *v15 = 0;\n  return a1;\n}", "assembly": "; \n; GameLevelManager::userNameForUserID from 0x100540260 to 0x1005403da (378 bytes)\n; \n; 5 xrefs:\n; > CommentCell::loadFromComment @ 0x10022d535\n; > LevelBrowserLayer::getSearchTitle @ 0x1004863dc\n; > LevelBrowserLayer::getSearchTitle @ 0x10048646e\n; > GameLevelManager::tryGetUsername @ 0x10054044d\n; > GJGameLevel::create @ 0x100541964\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:31:57 +0000\n; \npush    rbp                                                            ; +0x0, 0x100540260\nmov     rbp, rsp                                                       ; +0x1, 0x100540261\npush    r15                                                            ; +0x4, 0x100540264\npush    r14                                                            ; +0x6, 0x100540266\npush    r13                                                            ; +0x8, 0x100540268\npush    r12                                                            ; +0xa, 0x10054026a\npush    rbx                                                            ; +0xc, 0x10054026c\nsub     rsp, 28h                                                       ; +0xd, 0x10054026d\nmov     rbx, rdi                                                       ; +0x11, 0x100540271\ntest    edx, edx                                                       ; +0x14, 0x100540274\njle     loc_100540370                                                  ; +0x16, 0x100540276\nmov     r14, [rsi+3D0h]                                                ; +0x1c, 0x10054027c\nlea     rdi, aI_14; \"%i\"                                               ; +0x23, 0x100540283\nmov     esi, edx                                                       ; +0x2a, 0x10054028a\nxor     eax, eax                                                       ; +0x2c, 0x10054028c\ncall    sub_10088E820                                                  ; +0x2e, 0x10054028e\nmov     rdi, rax                                                       ; +0x33, 0x100540293\ncall    cocos2d__CCString__getCString                                  ; +0x36, 0x100540296\nmov     r12, rax                                                       ; +0x3b, 0x10054029b\nmov     rdi, rax; __s                                                  ; +0x3e, 0x10054029e\ncall    _strlen                                                        ; +0x41, 0x1005402a1\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x46, 0x1005402a6\njnb     loc_1005403D5                                                  ; +0x4a, 0x1005402aa\nmov     r15, rax                                                       ; +0x50, 0x1005402b0\ncmp     rax, 17h                                                       ; +0x53, 0x1005402b3\njnb     short loc_1005402CB                                            ; +0x57, 0x1005402b7\nlea     eax, [r15+r15]                                                 ; +0x59, 0x1005402b9\nmov     byte ptr [rbp+__dst], al                                       ; +0x5d, 0x1005402bd\nlea     r13, [rbp+__dst+1]                                             ; +0x60, 0x1005402c0\ntest    r15, r15                                                       ; +0x64, 0x1005402c4\njnz     short loc_100540306                                            ; +0x67, 0x1005402c7\njmp     short loc_100540314                                            ; +0x69, 0x1005402c9\nmov     rax, r15                                                       ; +0x6b, 0x1005402cb\nor      rax, 7                                                         ; +0x6e, 0x1005402ce\nlea     rcx, [rax+1]                                                   ; +0x72, 0x1005402d2\ncmp     rax, 17h                                                       ; +0x76, 0x1005402d6\nmov     [rbp+var_48], r14                                              ; +0x7a, 0x1005402da\nmov     r14d, 1Ah                                                      ; +0x7e, 0x1005402de\ncmovnz  r14, rcx                                                       ; +0x84, 0x1005402e4\nmov     rdi, r14; __sz                                                 ; +0x88, 0x1005402e8\ncall    __Znwm; operator new(ulong)                                    ; +0x8b, 0x1005402eb\nmov     r13, rax                                                       ; +0x90, 0x1005402f0\nmov     [rbp+__p], rax                                                 ; +0x93, 0x1005402f3\ninc     r14                                                            ; +0x97, 0x1005402f7\nmov     [rbp+__dst], r14                                               ; +0x9a, 0x1005402fa\nmov     r14, [rbp+var_48]                                              ; +0x9e, 0x1005402fe\nmov     [rbp+var_38], r15                                              ; +0xa2, 0x100540302\nmov     rdi, r13; __dst                                                ; +0xa6, 0x100540306\nmov     rsi, r12; __src                                                ; +0xa9, 0x100540309\nmov     rdx, r15; __len                                                ; +0xac, 0x10054030c\ncall    _memmove                                                       ; +0xaf, 0x10054030f\nmov     byte ptr [r13+r15+0], 0                                        ; +0xb4, 0x100540314\nlea     rsi, [rbp+__dst]                                               ; +0xba, 0x10054031a\nmov     rdi, r14                                                       ; +0xbe, 0x10054031e\ncall    cocos2d__CCDictionary__objectForKey                            ; +0xc1, 0x100540321\nmov     r14, rax                                                       ; +0xc6, 0x100540326\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc9, 0x100540329\njz      short loc_100540338                                            ; +0xcd, 0x10054032d\nmov     rdi, [rbp+__p]; __p                                            ; +0xcf, 0x10054032f\ncall    __ZdlPv; operator delete(void *)                               ; +0xd3, 0x100540333\ntest    r14, r14                                                       ; +0xd8, 0x100540338\njz      short loc_100540370                                            ; +0xdb, 0x10054033b\nmov     rdi, r14                                                       ; +0xdd, 0x10054033d\ncall    cocos2d__CCString__getCString                                  ; +0xe0, 0x100540340\nmov     r15, rax                                                       ; +0xe5, 0x100540345\nmov     rdi, rax; __s                                                  ; +0xe8, 0x100540348\ncall    _strlen                                                        ; +0xeb, 0x10054034b\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xf0, 0x100540350\njnb     short loc_1005403D5                                            ; +0xf4, 0x100540354\nmov     r14, rax                                                       ; +0xf6, 0x100540356\ncmp     rax, 17h                                                       ; +0xf9, 0x100540359\njnb     short loc_10054037B                                            ; +0xfd, 0x10054035d\nlea     eax, [r14+r14]                                                 ; +0xff, 0x10054035f\nmov     [rbx], al                                                      ; +0x103, 0x100540363\nlea     r12, [rbx+1]                                                   ; +0x105, 0x100540365\ntest    r14, r14                                                       ; +0x109, 0x100540369\njnz     short loc_1005403AD                                            ; +0x10c, 0x10054036c\njmp     short loc_1005403BB                                            ; +0x10e, 0x10054036e\nmov     word ptr [rbx], 2D02h                                          ; +0x110, 0x100540370\nlea     r12, [rbx+2]                                                   ; +0x115, 0x100540375\njmp     short loc_1005403BE                                            ; +0x119, 0x100540379\nmov     rax, r14                                                       ; +0x11b, 0x10054037b\nor      rax, 7                                                         ; +0x11e, 0x10054037e\nlea     rcx, [rax+1]                                                   ; +0x122, 0x100540382\ncmp     rax, 17h                                                       ; +0x126, 0x100540386\nmov     r13d, 1Ah                                                      ; +0x12a, 0x10054038a\ncmovnz  r13, rcx                                                       ; +0x130, 0x100540390\nmov     rdi, r13; __sz                                                 ; +0x134, 0x100540394\ncall    __Znwm; operator new(ulong)                                    ; +0x137, 0x100540397\nmov     r12, rax                                                       ; +0x13c, 0x10054039c\nmov     [rbx+10h], rax                                                 ; +0x13f, 0x10054039f\ninc     r13                                                            ; +0x143, 0x1005403a3\nmov     [rbx], r13                                                     ; +0x146, 0x1005403a6\nmov     [rbx+8], r14                                                   ; +0x149, 0x1005403a9\nmov     rdi, r12; __dst                                                ; +0x14d, 0x1005403ad\nmov     rsi, r15; __src                                                ; +0x150, 0x1005403b0\nmov     rdx, r14; __len                                                ; +0x153, 0x1005403b3\ncall    _memmove                                                       ; +0x156, 0x1005403b6\nadd     r12, r14                                                       ; +0x15b, 0x1005403bb\nmov     byte ptr [r12], 0                                              ; +0x15e, 0x1005403be\nmov     rax, rbx                                                       ; +0x163, 0x1005403c3\nadd     rsp, 28h                                                       ; +0x166, 0x1005403c6\npop     rbx                                                            ; +0x16a, 0x1005403ca\npop     r12                                                            ; +0x16b, 0x1005403cb\npop     r13                                                            ; +0x16d, 0x1005403cd\npop     r14                                                            ; +0x16f, 0x1005403cf\npop     r15                                                            ; +0x171, 0x1005403d1\npop     rbp                                                            ; +0x173, 0x1005403d3\nretn                                                                   ; +0x174, 0x1005403d4\ncall    sub_100003630                                                  ; +0x175, 0x1005403d5", "xrefs": ["CommentCell::loadFromComment @ 0x10022d535", "LevelBrowserLayer::getSearchTitle @ 0x1004863dc", "LevelBrowserLayer::getSearchTitle @ 0x10048646e", "GameLevelManager::tryGetUsername @ 0x10054044d", "GJGameLevel::create @ 0x100541964"], "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"}