{"type": "func", "start": 5372052384, "end": 5372052725, "name": "LocalLevelManager::getAllLevelsInDict", "pseudocode": "// \n// LocalLevelManager::getAllLevelsInDict from 0x1403303a0 to 0x1403304f5 (341 bytes)\n// \n// 3 xrefs:\n// > GameLevelManager::createNewLevel @ 0x140144990\n// > GameLevelManager::getNextLevelName @ 0x140144bd4\n// > <???> @ 0x1406d500c\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// Hidden C++ exception states: #wind=3\ncocos2d::CCDictionary *LocalLevelManager::getAllLevelsInDict(LocalLevelManager *a1)\n{\n  cocos2d::CCDictionary *v2; // rbp\n  unsigned int i; // ebx\n  struct cocos2d::CCObject *v4; // rdi\n  _QWORD *v5; // rdx\n  size_t v6; // r8\n  void *v7; // rcx\n  __int128 v9; // [rsp+28h] [rbp-60h] BYREF\n  __int64 v10; // [rsp+38h] [rbp-50h]\n  unsigned __int64 v11; // [rsp+40h] [rbp-48h]\n  _QWORD v12[4]; // [rsp+48h] [rbp-40h] BYREF\n\n  v2 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(a1);\n  for ( i = 0; i < cocos2d::CCArray::count(a1->m_localLevels); ++i )\n  {\n    v4 = cocos2d::CCArray::objectAtIndex(a1->m_localLevels, i);\n    sub_14003BDB0((__int64)v12, (__int64)&v4[6].m_uID);\n    v5 = v12;\n    if ( v12[3] > 0xFu )\n      v5 = (_QWORD *)v12[0];\n    v9 = 0;\n    v10 = 0;\n    v11 = 0;\n    v6 = -1;\n    do\n      ++v6;\n    while ( *((_BYTE *)v5 + v6) );\n    sub_14003A930(&v9, v5, v6);\n    sub_14003A830((__int64)v12);\n    if ( v10 )\n      cocos2d::CCDictionary::setObject(v2, v4, &v9);\n    if ( v11 > 0xF )\n    {\n      v7 = (void *)v9;\n      if ( v11 + 1 >= 0x1000 )\n      {\n        v7 = *(void **)(v9 - 8);\n        if ( (unsigned __int64)(v9 - (_QWORD)v7 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v7);\n    }\n  }\n  return v2;\n}", "assembly": "; \n; LocalLevelManager::getAllLevelsInDict from 0x1403303a0 to 0x1403304f5 (341 bytes)\n; \n; 3 xrefs:\n; > GameLevelManager::createNewLevel @ 0x140144990\n; > GameLevelManager::getNextLevelName @ 0x140144bd4\n; > <???> @ 0x1406d500c\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403303a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1403303a5\npush    rsi                                                            ; +0xa, 0x1403303aa\npush    rdi                                                            ; +0xb, 0x1403303ab\npush    r14                                                            ; +0xc, 0x1403303ac\nsub     rsp, 70h                                                       ; +0xe, 0x1403303ae\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x1403303b2\nxor     rax, rsp                                                       ; +0x19, 0x1403303b9\nmov     [rsp+88h+var_20], rax                                          ; +0x1c, 0x1403303bc\nmov     rsi, rcx                                                       ; +0x21, 0x1403303c1\nxor     r14d, r14d                                                     ; +0x24, 0x1403303c4\ncall    cs:?create@CCDictionary@cocos2d@@SAPEAV12@XZ; cocos2d::CCDictionary::create(void) ; +0x27, 0x1403303c7\nmov     rbp, rax                                                       ; +0x2d, 0x1403303cd\nmov     ebx, r14d                                                      ; +0x30, 0x1403303d0\nmov     rcx, [rsi+168h]                                                ; +0x33, 0x1403303d3\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x3a, 0x1403303da\ntest    eax, eax                                                       ; +0x40, 0x1403303e0\njz      loc_1403304C9                                                  ; +0x42, 0x1403303e2\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x48, 0x1403303e8\nmov     edx, ebx                                                       ; +0x50, 0x1403303f0\nmov     rcx, [rsi+168h]                                                ; +0x52, 0x1403303f2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x59, 0x1403303f9\nmov     rdi, rax                                                       ; +0x5f, 0x1403303ff\nlea     rdx, [rax+158h]                                                ; +0x62, 0x140330402\nlea     rcx, [rsp+88h+var_40]                                          ; +0x69, 0x140330409\ncall    sub_14003BDB0                                                  ; +0x6e, 0x14033040e\nnop                                                                    ; +0x73, 0x140330413\nlea     rdx, [rsp+88h+var_40]                                          ; +0x74, 0x140330414\ncmp     [rsp+88h+var_28], 0Fh                                          ; +0x79, 0x140330419\ncmova   rdx, [rsp+88h+var_40]                                          ; +0x7f, 0x14033041f\nxorps   xmm0, xmm0                                                     ; +0x85, 0x140330425\nmovups  [rsp+88h+var_60], xmm0                                         ; +0x88, 0x140330428\nmov     [rsp+88h+var_50], r14                                          ; +0x8d, 0x14033042d\nmov     [rsp+88h+var_48], r14                                          ; +0x92, 0x140330432\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x97, 0x140330437\nxchg    ax, ax                                                         ; +0x9e, 0x14033043e\ninc     r8                                                             ; +0xa0, 0x140330440\ncmp     byte ptr [rdx+r8], 0                                           ; +0xa3, 0x140330443\njnz     short loc_140330440                                            ; +0xa8, 0x140330448\nlea     rcx, [rsp+88h+var_60]                                          ; +0xaa, 0x14033044a\ncall    sub_14003A930                                                  ; +0xaf, 0x14033044f\nnop                                                                    ; +0xb4, 0x140330454\nlea     rcx, [rsp+88h+var_40]                                          ; +0xb5, 0x140330455\ncall    sub_14003A830                                                  ; +0xba, 0x14033045a\ncmp     [rsp+88h+var_50], 0                                            ; +0xbf, 0x14033045f\njbe     short loc_140330479                                            ; +0xc5, 0x140330465\nlea     r8, [rsp+88h+var_60]                                           ; +0xc7, 0x140330467\nmov     rdx, rdi                                                       ; +0xcc, 0x14033046c\nmov     rcx, rbp                                                       ; +0xcf, 0x14033046f\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0xd2, 0x140330472\nnop                                                                    ; +0xd8, 0x140330478\nmov     rdx, [rsp+88h+var_48]                                          ; +0xd9, 0x140330479\ncmp     rdx, 0Fh                                                       ; +0xde, 0x14033047e\njbe     short loc_1403304B2                                            ; +0xe2, 0x140330482\ninc     rdx                                                            ; +0xe4, 0x140330484\nmov     rcx, qword ptr [rsp+88h+var_60]                                ; +0xe7, 0x140330487\nmov     rax, rcx                                                       ; +0xec, 0x14033048c\ncmp     rdx, 1000h                                                     ; +0xef, 0x14033048f\njb      short loc_1403304AD                                            ; +0xf6, 0x140330496\nadd     rdx, 27h ; '''                                                 ; +0xf8, 0x140330498\nmov     rcx, [rcx-8]; Block                                            ; +0xfc, 0x14033049c\nsub     rax, rcx                                                       ; +0x100, 0x1403304a0\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x103, 0x1403304a3\ncmp     rax, 1Fh                                                       ; +0x107, 0x1403304a7\nja      short loc_1403304EE                                            ; +0x10b, 0x1403304ab\ncall    j_j_free                                                       ; +0x10d, 0x1403304ad\ninc     ebx                                                            ; +0x112, 0x1403304b2\nmov     rcx, [rsi+168h]                                                ; +0x114, 0x1403304b4\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x11b, 0x1403304bb\ncmp     ebx, eax                                                       ; +0x121, 0x1403304c1\njb      loc_1403303F0                                                  ; +0x123, 0x1403304c3\nmov     rax, rbp                                                       ; +0x129, 0x1403304c9\nmov     rcx, [rsp+88h+var_20]                                          ; +0x12c, 0x1403304cc\nxor     rcx, rsp; StackCookie                                          ; +0x131, 0x1403304d1\ncall    __security_check_cookie                                        ; +0x134, 0x1403304d4\nlea     r11, [rsp+88h+var_18]                                          ; +0x139, 0x1403304d9\nmov     rbx, [r11+28h]                                                 ; +0x13e, 0x1403304de\nmov     rbp, [r11+30h]                                                 ; +0x142, 0x1403304e2\nmov     rsp, r11                                                       ; +0x146, 0x1403304e6\npop     r14                                                            ; +0x149, 0x1403304e9\npop     rdi                                                            ; +0x14b, 0x1403304eb\npop     rsi                                                            ; +0x14c, 0x1403304ec\nretn                                                                   ; +0x14d, 0x1403304ed\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x14e, 0x1403304ee\ndb 0CCh                                                                ; +0x154, 0x1403304f4", "xrefs": ["GameLevelManager::createNewLevel @ 0x140144990", "GameLevelManager::getNextLevelName @ 0x140144bd4", "<???> @ 0x1406d500c"], "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"}