{"type": "func", "start": 4300536912, "end": 4300537098, "name": "GameLevelManager::getCommentKey", "pseudocode": "// \n// GameLevelManager::getCommentKey from 0x10054fc50 to 0x10054fd0a (186 bytes)\n// \n// 2 xrefs:\n// > InfoLayer::init @ 0x1007aff62\n// > InfoLayer::loadPage @ 0x1007b1336\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::getCommentKey(_QWORD *a1, double a2)\n{\n  char v2; // al\n  cocos2d::CCString *v3; // rax\n  const char *CString; // r15\n  size_t v5; // rax\n  size_t v6; // r14\n  void *v7; // r12\n  size_t v8; // r13\n\n  v3 = (cocos2d::CCString *)sub_1007AB580(\"comment_%i_%i_%i_%i\", v2);\n  CString = cocos2d::CCString::getCString(v3);\n  v5 = strlen(CString);\n  if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(a2);\n  v6 = v5;\n  if ( v5 >= 0x17 )\n  {\n    v8 = 26;\n    if ( (v5 | 7) != 0x17 )\n      v8 = (v5 | 7) + 1;\n    v7 = operator new(v8);\n    a1[2] = v7;\n    *a1 = v8 + 1;\n    a1[1] = v6;\n  }\n  else\n  {\n    *(_BYTE *)a1 = 2 * v5;\n    v7 = (char *)a1 + 1;\n    if ( !v5 )\n      goto LABEL_9;\n  }\n  memmove(v7, CString, v6);\nLABEL_9:\n  *((_BYTE *)v7 + v6) = 0;\n  return a1;\n}", "assembly": "; \n; GameLevelManager::getCommentKey from 0x10054fc50 to 0x10054fd0a (186 bytes)\n; \n; 2 xrefs:\n; > InfoLayer::init @ 0x1007aff62\n; > InfoLayer::loadPage @ 0x1007b1336\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, 0x10054fc50\nmov     rbp, rsp                                                       ; +0x1, 0x10054fc51\npush    r15                                                            ; +0x4, 0x10054fc54\npush    r14                                                            ; +0x6, 0x10054fc56\npush    r13                                                            ; +0x8, 0x10054fc58\npush    r12                                                            ; +0xa, 0x10054fc5a\npush    rbx                                                            ; +0xc, 0x10054fc5c\npush    rax; char                                                      ; +0xd, 0x10054fc5d\nmov     rbx, rdi                                                       ; +0xe, 0x10054fc5e\nlea     rdi, aCommentIIII; \"comment_%i_%i_%i_%i\"                       ; +0x11, 0x10054fc61\nmov     esi, edx                                                       ; +0x18, 0x10054fc68\nmov     edx, ecx                                                       ; +0x1a, 0x10054fc6a\nmov     ecx, r8d                                                       ; +0x1c, 0x10054fc6c\nmov     r8d, r9d                                                       ; +0x1f, 0x10054fc6f\nxor     eax, eax                                                       ; +0x22, 0x10054fc72\ncall    sub_1007AB580                                                  ; +0x24, 0x10054fc74\nmov     rdi, rax                                                       ; +0x29, 0x10054fc79\ncall    cocos2d__CCString__getCString                                  ; +0x2c, 0x10054fc7c\nmov     r15, rax                                                       ; +0x31, 0x10054fc81\nmov     rdi, rax; __s                                                  ; +0x34, 0x10054fc84\ncall    _strlen                                                        ; +0x37, 0x10054fc87\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x3c, 0x10054fc8c\njnb     short loc_10054FD05                                            ; +0x40, 0x10054fc90\nmov     r14, rax                                                       ; +0x42, 0x10054fc92\ncmp     rax, 17h                                                       ; +0x45, 0x10054fc95\njnb     short loc_10054FCAE                                            ; +0x49, 0x10054fc99\nlea     eax, [r14+r14]                                                 ; +0x4b, 0x10054fc9b\nmov     [rbx], al                                                      ; +0x4f, 0x10054fc9f\nmov     r12, rbx                                                       ; +0x51, 0x10054fca1\ninc     r12                                                            ; +0x54, 0x10054fca4\ntest    r14, r14                                                       ; +0x57, 0x10054fca7\njnz     short loc_10054FCE0                                            ; +0x5a, 0x10054fcaa\njmp     short loc_10054FCEE                                            ; +0x5c, 0x10054fcac\nmov     rax, r14                                                       ; +0x5e, 0x10054fcae\nor      rax, 7                                                         ; +0x61, 0x10054fcb1\nlea     rcx, [rax+1]                                                   ; +0x65, 0x10054fcb5\ncmp     rax, 17h                                                       ; +0x69, 0x10054fcb9\nmov     r13d, 1Ah                                                      ; +0x6d, 0x10054fcbd\ncmovnz  r13, rcx                                                       ; +0x73, 0x10054fcc3\nmov     rdi, r13; __sz                                                 ; +0x77, 0x10054fcc7\ncall    __Znwm; operator new(ulong)                                    ; +0x7a, 0x10054fcca\nmov     r12, rax                                                       ; +0x7f, 0x10054fccf\nmov     [rbx+10h], rax                                                 ; +0x82, 0x10054fcd2\ninc     r13                                                            ; +0x86, 0x10054fcd6\nmov     [rbx], r13                                                     ; +0x89, 0x10054fcd9\nmov     [rbx+8], r14                                                   ; +0x8c, 0x10054fcdc\nmov     rdi, r12; __dst                                                ; +0x90, 0x10054fce0\nmov     rsi, r15; __src                                                ; +0x93, 0x10054fce3\nmov     rdx, r14; __len                                                ; +0x96, 0x10054fce6\ncall    _memmove                                                       ; +0x99, 0x10054fce9\nmov     byte ptr [r12+r14], 0                                          ; +0x9e, 0x10054fcee\nmov     rax, rbx                                                       ; +0xa3, 0x10054fcf3\nadd     rsp, 8                                                         ; +0xa6, 0x10054fcf6\npop     rbx                                                            ; +0xaa, 0x10054fcfa\npop     r12                                                            ; +0xab, 0x10054fcfb\npop     r13                                                            ; +0xad, 0x10054fcfd\npop     r14                                                            ; +0xaf, 0x10054fcff\npop     r15                                                            ; +0xb1, 0x10054fd01\npop     rbp                                                            ; +0xb3, 0x10054fd03\nretn                                                                   ; +0xb4, 0x10054fd04\ncall    sub_100006BF0                                                  ; +0xb5, 0x10054fd05", "xrefs": ["InfoLayer::init @ 0x1007aff62", "InfoLayer::loadPage @ 0x1007b1336"], "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"}