{"type": "func", "start": 4300613792, "end": 4300613972, "name": "GameLevelManager::getLeaderboardKey", "pseudocode": "// \n// GameLevelManager::getLeaderboardKey from 0x1005628a0 to 0x100562954 (180 bytes)\n// \n// 14 xrefs:\n// > LeaderboardsLayer::init @ 0x1005133ec\n// > LeaderboardsLayer::init @ 0x100513436\n// > LeaderboardsLayer::init @ 0x100513480\n// > LeaderboardsLayer::init @ 0x1005134ca\n// > LeaderboardsLayer::init @ 0x100513511\n// > LeaderboardsLayer::init @ 0x10051355b\n// > LeaderboardsLayer::init @ 0x1005135a5\n// > LeaderboardsLayer::init @ 0x1005135ef\n// > LeaderboardsLayer::init @ 0x100513636\n// > LeaderboardsLayer::init @ 0x100513680\n// > LeaderboardsLayer::init @ 0x1005136ca\n// > LeaderboardsLayer::init @ 0x100513714\n// > LeaderboardsLayer::selectLeaderboard @ 0x1005145cd\n// > LeaderboardsLayer::isCorrect @ 0x100514ec0\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:32:09 +0000\n// \n\n_QWORD *__fastcall GameLevelManager::getLeaderboardKey(_QWORD *a1)\n{\n  char v1; // al\n  __int64 v2; // rax\n  const char *CString; // r15\n  size_t v4; // rax\n  size_t v5; // r14\n  void *v6; // r12\n  size_t v7; // r13\n\n  v2 = sub_10088E820(\"lb_%i_%i\", v1);\n  CString = (const char *)cocos2d::CCString::getCString(v2);\n  v4 = strlen(CString);\n  if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v5 = v4;\n  if ( v4 >= 0x17 )\n  {\n    v7 = 26;\n    if ( (v4 | 7) != 0x17 )\n      v7 = (v4 | 7) + 1;\n    v6 = operator new(v7);\n    a1[2] = v6;\n    *a1 = v7 + 1;\n    a1[1] = v5;\n  }\n  else\n  {\n    *(_BYTE *)a1 = 2 * v4;\n    v6 = (char *)a1 + 1;\n    if ( !v4 )\n      goto LABEL_9;\n  }\n  memmove(v6, CString, v5);\nLABEL_9:\n  *((_BYTE *)v6 + v5) = 0;\n  return a1;\n}", "assembly": "; \n; GameLevelManager::getLeaderboardKey from 0x1005628a0 to 0x100562954 (180 bytes)\n; \n; 14 xrefs:\n; > LeaderboardsLayer::init @ 0x1005133ec\n; > LeaderboardsLayer::init @ 0x100513436\n; > LeaderboardsLayer::init @ 0x100513480\n; > LeaderboardsLayer::init @ 0x1005134ca\n; > LeaderboardsLayer::init @ 0x100513511\n; > LeaderboardsLayer::init @ 0x10051355b\n; > LeaderboardsLayer::init @ 0x1005135a5\n; > LeaderboardsLayer::init @ 0x1005135ef\n; > LeaderboardsLayer::init @ 0x100513636\n; > LeaderboardsLayer::init @ 0x100513680\n; > LeaderboardsLayer::init @ 0x1005136ca\n; > LeaderboardsLayer::init @ 0x100513714\n; > LeaderboardsLayer::selectLeaderboard @ 0x1005145cd\n; > LeaderboardsLayer::isCorrect @ 0x100514ec0\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:32:09 +0000\n; \npush    rbp                                                            ; +0x0, 0x1005628a0\nmov     rbp, rsp                                                       ; +0x1, 0x1005628a1\npush    r15                                                            ; +0x4, 0x1005628a4\npush    r14                                                            ; +0x6, 0x1005628a6\npush    r13                                                            ; +0x8, 0x1005628a8\npush    r12                                                            ; +0xa, 0x1005628aa\npush    rbx                                                            ; +0xc, 0x1005628ac\npush    rax; char                                                      ; +0xd, 0x1005628ad\nmov     rbx, rdi                                                       ; +0xe, 0x1005628ae\nlea     rdi, aLbII; \"lb_%i_%i\"                                         ; +0x11, 0x1005628b1\nmov     esi, edx                                                       ; +0x18, 0x1005628b8\nmov     edx, ecx                                                       ; +0x1a, 0x1005628ba\nxor     eax, eax                                                       ; +0x1c, 0x1005628bc\ncall    sub_10088E820                                                  ; +0x1e, 0x1005628be\nmov     rdi, rax                                                       ; +0x23, 0x1005628c3\ncall    cocos2d__CCString__getCString                                  ; +0x26, 0x1005628c6\nmov     r15, rax                                                       ; +0x2b, 0x1005628cb\nmov     rdi, rax; __s                                                  ; +0x2e, 0x1005628ce\ncall    _strlen                                                        ; +0x31, 0x1005628d1\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x36, 0x1005628d6\njnb     short loc_10056294F                                            ; +0x3a, 0x1005628da\nmov     r14, rax                                                       ; +0x3c, 0x1005628dc\ncmp     rax, 17h                                                       ; +0x3f, 0x1005628df\njnb     short loc_1005628F8                                            ; +0x43, 0x1005628e3\nlea     eax, [r14+r14]                                                 ; +0x45, 0x1005628e5\nmov     [rbx], al                                                      ; +0x49, 0x1005628e9\nmov     r12, rbx                                                       ; +0x4b, 0x1005628eb\ninc     r12                                                            ; +0x4e, 0x1005628ee\ntest    r14, r14                                                       ; +0x51, 0x1005628f1\njnz     short loc_10056292A                                            ; +0x54, 0x1005628f4\njmp     short loc_100562938                                            ; +0x56, 0x1005628f6\nmov     rax, r14                                                       ; +0x58, 0x1005628f8\nor      rax, 7                                                         ; +0x5b, 0x1005628fb\nlea     rcx, [rax+1]                                                   ; +0x5f, 0x1005628ff\ncmp     rax, 17h                                                       ; +0x63, 0x100562903\nmov     r13d, 1Ah                                                      ; +0x67, 0x100562907\ncmovnz  r13, rcx                                                       ; +0x6d, 0x10056290d\nmov     rdi, r13; __sz                                                 ; +0x71, 0x100562911\ncall    __Znwm; operator new(ulong)                                    ; +0x74, 0x100562914\nmov     r12, rax                                                       ; +0x79, 0x100562919\nmov     [rbx+10h], rax                                                 ; +0x7c, 0x10056291c\ninc     r13                                                            ; +0x80, 0x100562920\nmov     [rbx], r13                                                     ; +0x83, 0x100562923\nmov     [rbx+8], r14                                                   ; +0x86, 0x100562926\nmov     rdi, r12; __dst                                                ; +0x8a, 0x10056292a\nmov     rsi, r15; __src                                                ; +0x8d, 0x10056292d\nmov     rdx, r14; __len                                                ; +0x90, 0x100562930\ncall    _memmove                                                       ; +0x93, 0x100562933\nmov     byte ptr [r12+r14], 0                                          ; +0x98, 0x100562938\nmov     rax, rbx                                                       ; +0x9d, 0x10056293d\nadd     rsp, 8                                                         ; +0xa0, 0x100562940\npop     rbx                                                            ; +0xa4, 0x100562944\npop     r12                                                            ; +0xa5, 0x100562945\npop     r13                                                            ; +0xa7, 0x100562947\npop     r14                                                            ; +0xa9, 0x100562949\npop     r15                                                            ; +0xab, 0x10056294b\npop     rbp                                                            ; +0xad, 0x10056294d\nretn                                                                   ; +0xae, 0x10056294e\ncall    sub_100003630                                                  ; +0xaf, 0x10056294f", "xrefs": ["LeaderboardsLayer::init @ 0x1005133ec", "LeaderboardsLayer::init @ 0x100513436", "LeaderboardsLayer::init @ 0x100513480", "LeaderboardsLayer::init @ 0x1005134ca", "LeaderboardsLayer::init @ 0x100513511", "LeaderboardsLayer::init @ 0x10051355b", "LeaderboardsLayer::init @ 0x1005135a5", "LeaderboardsLayer::init @ 0x1005135ef", "LeaderboardsLayer::init @ 0x100513636", "LeaderboardsLayer::init @ 0x100513680", "LeaderboardsLayer::init @ 0x1005136ca", "LeaderboardsLayer::init @ 0x100513714", "LeaderboardsLayer::selectLeaderboard @ 0x1005145cd", "LeaderboardsLayer::isCorrect @ 0x100514ec0"], "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"}