{"type": "func", "start": 4298562192, "end": 4298562337, "name": "GameManager::getNextUniqueObjectKey", "pseudocode": "// \n// GameManager::getNextUniqueObjectKey from 0x10036da90 to 0x10036db21 (145 bytes)\n// \n// 0 xrefs:\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:29:01 +0000\n// \n\n__int64 __fastcall GameManager::getNextUniqueObjectKey(__int64 a1)\n{\n  __int64 v1; // rbx\n  unsigned int *v2; // rax\n  _QWORD *v3; // r14\n  unsigned __int64 v4; // r15\n  int v5; // ebx\n  int v6; // eax\n\n  v1 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 456));\n  if ( (unsigned int)sub_1007FEF90(v1) )\n  {\n    qsort(\n      *(void **)(*(_QWORD *)(v1 + 56) + 16LL),\n      **(unsigned int **)(v1 + 56),\n      8u,\n      (int (__cdecl *)(const void *, const void *))sub_10035FC40);\n  }\n  else if ( !v1 )\n  {\n    return (unsigned int)-1;\n  }\n  v2 = *(unsigned int **)(v1 + 56);\n  if ( !*v2 )\n    return (unsigned int)-1;\n  v3 = *((_QWORD **)v2 + 2);\n  v4 = (unsigned __int64)&v3[*v2 - 1];\n  v5 = 0;\n  do\n  {\n    if ( !*v3 )\n      break;\n    v6 = cocos2d::CCString::intValue(*v3);\n    if ( v6 < v5 )\n      v5 = v6;\n    ++v3;\n  }\n  while ( (unsigned __int64)v3 <= v4 );\n  return (unsigned int)(v5 - 1);\n}", "assembly": "; \n; GameManager::getNextUniqueObjectKey from 0x10036da90 to 0x10036db21 (145 bytes)\n; \n; 0 xrefs:\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:29:01 +0000\n; \npush    rbp                                                            ; +0x0, 0x10036da90\nmov     rbp, rsp                                                       ; +0x1, 0x10036da91\npush    r15                                                            ; +0x4, 0x10036da94\npush    r14                                                            ; +0x6, 0x10036da96\npush    rbx                                                            ; +0x8, 0x10036da98\npush    rax                                                            ; +0x9, 0x10036da99\nmov     rdi, [rdi+1C8h]                                                ; +0xa, 0x10036da9a\ncall    cocos2d__CCDictionary__allKeys                                 ; +0x11, 0x10036daa1\nmov     rbx, rax                                                       ; +0x16, 0x10036daa6\nmov     rdi, rax                                                       ; +0x19, 0x10036daa9\ncall    sub_1007FEF90                                                  ; +0x1c, 0x10036daac\ntest    eax, eax                                                       ; +0x21, 0x10036dab1\njz      short loc_10036DAD2                                            ; +0x23, 0x10036dab3\nmov     rax, [rbx+38h]                                                 ; +0x25, 0x10036dab5\nmov     rdi, [rax+10h]; __base                                         ; +0x29, 0x10036dab9\nmov     esi, [rax]; __nel                                              ; +0x2d, 0x10036dabd\nlea     rcx, sub_10035FC40; __compar                                   ; +0x2f, 0x10036dabf\nmov     edx, 8; __width                                                ; +0x36, 0x10036dac6\ncall    _qsort                                                         ; +0x3b, 0x10036dacb\njmp     short loc_10036DAD7                                            ; +0x40, 0x10036dad0\ntest    rbx, rbx                                                       ; +0x42, 0x10036dad2\njz      short loc_10036DB0F                                            ; +0x45, 0x10036dad5\nmov     rax, [rbx+38h]                                                 ; +0x47, 0x10036dad7\nmov     ecx, [rax]                                                     ; +0x4b, 0x10036dadb\ntest    rcx, rcx                                                       ; +0x4d, 0x10036dadd\njz      short loc_10036DB0F                                            ; +0x50, 0x10036dae0\nmov     r14, [rax+10h]                                                 ; +0x52, 0x10036dae2\nlea     r15, [r14+rcx*8]                                               ; +0x56, 0x10036dae6\nadd     r15, 0FFFFFFFFFFFFFFF8h                                        ; +0x5a, 0x10036daea\nxor     ebx, ebx                                                       ; +0x5e, 0x10036daee\nmov     rdi, [r14]                                                     ; +0x60, 0x10036daf0\ntest    rdi, rdi                                                       ; +0x63, 0x10036daf3\njz      short loc_10036DB0B                                            ; +0x66, 0x10036daf6\ncall    cocos2d__CCString__intValue                                    ; +0x68, 0x10036daf8\ncmp     eax, ebx                                                       ; +0x6d, 0x10036dafd\ncmovl   ebx, eax                                                       ; +0x6f, 0x10036daff\nadd     r14, 8                                                         ; +0x72, 0x10036db02\ncmp     r14, r15                                                       ; +0x76, 0x10036db06\njbe     short loc_10036DAF0                                            ; +0x79, 0x10036db09\ndec     ebx                                                            ; +0x7b, 0x10036db0b\njmp     short loc_10036DB14                                            ; +0x7d, 0x10036db0d\nmov     ebx, 0FFFFFFFFh                                                ; +0x7f, 0x10036db0f\nmov     eax, ebx                                                       ; +0x84, 0x10036db14\nadd     rsp, 8                                                         ; +0x86, 0x10036db16\npop     rbx                                                            ; +0x8a, 0x10036db1a\npop     r14                                                            ; +0x8b, 0x10036db1b\npop     r15                                                            ; +0x8d, 0x10036db1d\npop     rbp                                                            ; +0x8f, 0x10036db1f\nretn                                                                   ; +0x90, 0x10036db20", "xrefs": [], "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"}