{"type": "func", "start": 4298654784, "end": 4298654929, "name": "GameManager::getNextUniqueObjectKey", "pseudocode": "// \n// GameManager::getNextUniqueObjectKey from 0x100384440 to 0x1003844d1 (145 bytes)\n// \n// 0 xrefs:\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\nint __fastcall GameManager::getNextUniqueObjectKey(GameManager *a1)\n{\n  cocos2d::CCArray *v1; // rbx\n  cocos2d::ccArray *data; // rax\n  cocos2d::CCString **arr; // r14\n  unsigned __int64 v4; // r15\n  int v5; // ebx\n  int v6; // eax\n\n  v1 = cocos2d::CCDictionary::allKeys(a1->m_customObjectDict);\n  if ( (unsigned int)sub_100720070(v1) )\n  {\n    qsort(v1->data->arr, v1->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_1003768B0);\n  }\n  else if ( !v1 )\n  {\n    return -1;\n  }\n  data = v1->data;\n  if ( !data->num )\n    return -1;\n  arr = (cocos2d::CCString **)data->arr;\n  v4 = (unsigned __int64)&arr[data->num - 1];\n  v5 = 0;\n  do\n  {\n    if ( !*arr )\n      break;\n    v6 = cocos2d::CCString::intValue(*arr);\n    if ( v6 < v5 )\n      v5 = v6;\n    ++arr;\n  }\n  while ( (unsigned __int64)arr <= v4 );\n  return v5 - 1;\n}", "assembly": "; \n; GameManager::getNextUniqueObjectKey from 0x100384440 to 0x1003844d1 (145 bytes)\n; \n; 0 xrefs:\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, 0x100384440\nmov     rbp, rsp                                                       ; +0x1, 0x100384441\npush    r15                                                            ; +0x4, 0x100384444\npush    r14                                                            ; +0x6, 0x100384446\npush    rbx                                                            ; +0x8, 0x100384448\npush    rax                                                            ; +0x9, 0x100384449\nmov     rdi, [rdi+1A0h]                                                ; +0xa, 0x10038444a\ncall    cocos2d__CCDictionary__allKeys                                 ; +0x11, 0x100384451\nmov     rbx, rax                                                       ; +0x16, 0x100384456\nmov     rdi, rax                                                       ; +0x19, 0x100384459\ncall    sub_100720070                                                  ; +0x1c, 0x10038445c\ntest    eax, eax                                                       ; +0x21, 0x100384461\njz      short loc_100384482                                            ; +0x23, 0x100384463\nmov     rax, [rbx+38h]                                                 ; +0x25, 0x100384465\nmov     rdi, [rax+10h]; __base                                         ; +0x29, 0x100384469\nmov     esi, [rax]; __nel                                              ; +0x2d, 0x10038446d\nlea     rcx, sub_1003768B0; __compar                                   ; +0x2f, 0x10038446f\nmov     edx, 8; __width                                                ; +0x36, 0x100384476\ncall    _qsort                                                         ; +0x3b, 0x10038447b\njmp     short loc_100384487                                            ; +0x40, 0x100384480\ntest    rbx, rbx                                                       ; +0x42, 0x100384482\njz      short loc_1003844BF                                            ; +0x45, 0x100384485\nmov     rax, [rbx+38h]                                                 ; +0x47, 0x100384487\nmov     ecx, [rax]                                                     ; +0x4b, 0x10038448b\ntest    rcx, rcx                                                       ; +0x4d, 0x10038448d\njz      short loc_1003844BF                                            ; +0x50, 0x100384490\nmov     r14, [rax+10h]                                                 ; +0x52, 0x100384492\nlea     r15, [r14+rcx*8]                                               ; +0x56, 0x100384496\nadd     r15, 0FFFFFFFFFFFFFFF8h                                        ; +0x5a, 0x10038449a\nxor     ebx, ebx                                                       ; +0x5e, 0x10038449e\nmov     rdi, [r14]                                                     ; +0x60, 0x1003844a0\ntest    rdi, rdi                                                       ; +0x63, 0x1003844a3\njz      short loc_1003844BB                                            ; +0x66, 0x1003844a6\ncall    cocos2d__CCString__intValue                                    ; +0x68, 0x1003844a8\ncmp     eax, ebx                                                       ; +0x6d, 0x1003844ad\ncmovl   ebx, eax                                                       ; +0x6f, 0x1003844af\nadd     r14, 8                                                         ; +0x72, 0x1003844b2\ncmp     r14, r15                                                       ; +0x76, 0x1003844b6\njbe     short loc_1003844A0                                            ; +0x79, 0x1003844b9\ndec     ebx                                                            ; +0x7b, 0x1003844bb\njmp     short loc_1003844C4                                            ; +0x7d, 0x1003844bd\nmov     ebx, 0FFFFFFFFh                                                ; +0x7f, 0x1003844bf\nmov     eax, ebx                                                       ; +0x84, 0x1003844c4\nadd     rsp, 8                                                         ; +0x86, 0x1003844c6\npop     rbx                                                            ; +0x8a, 0x1003844ca\npop     r14                                                            ; +0x8b, 0x1003844cb\npop     r15                                                            ; +0x8d, 0x1003844cd\npop     rbp                                                            ; +0x8f, 0x1003844cf\nretn                                                                   ; +0x90, 0x1003844d0", "xrefs": [], "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"}