{"type": "func", "start": 5370042624, "end": 5370042883, "name": "GameLevelManager::deleteLevelList", "pseudocode": "// \n// GameLevelManager::deleteLevelList from 0x140145900 to 0x140145a03 (259 bytes)\n// \n// 4 xrefs:\n// > LevelBrowserLayer::FLAlert_Clicked @ 0x1402cf93c\n// > LevelListLayer::FLAlert_Clicked @ 0x1403076b5\n// > LevelListLayer::onFavorite @ 0x14030783c\n// > <???> @ 0x1406ca578\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=1\nvoid GameLevelManager::deleteLevelList(GameLevelManager *a1, GJLevelList *a2)\n{\n  LocalLevelManager *v4; // rax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  void *v8; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v10; // [rsp+30h] [rbp-28h]\n\n  if ( a2->m_listType == Editor )\n  {\n    v4 = LocalLevelManager::sharedState();\n    cocos2d::CCArray::removeObject(v4->m_localLists, a2, 1);\n  }\n  else\n  {\n    v5 = cocos2d::CCString::createWithFormat(\"%i\", a2->m_listID);\n    CString = cocos2d::CCString::getCString(v5);\n    *(_OWORD *)Block = 0;\n    v10 = 0;\n    v7 = -1;\n    do\n      ++v7;\n    while ( CString[v7] );\n    sub_14003A930(Block, CString, v7);\n    cocos2d::CCDictionary::removeObjectForKey(a1->m_favoriteLists, Block);\n    if ( *((_QWORD *)&v10 + 1) > 0xFu )\n    {\n      v8 = Block[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v10 + 1) + 1LL) >= 0x1000 )\n      {\n        v8 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v8);\n    }\n  }\n}", "assembly": "; \n; GameLevelManager::deleteLevelList from 0x140145900 to 0x140145a03 (259 bytes)\n; \n; 4 xrefs:\n; > LevelBrowserLayer::FLAlert_Clicked @ 0x1402cf93c\n; > LevelListLayer::FLAlert_Clicked @ 0x1403076b5\n; > LevelListLayer::onFavorite @ 0x14030783c\n; > <???> @ 0x1406ca578\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_10], rbx                                              ; +0x0, 0x140145900\npush    rdi                                                            ; +0x5, 0x140145905\nsub     rsp, 50h                                                       ; +0x6, 0x140145906\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14014590a\nxor     rax, rsp                                                       ; +0x11, 0x140145911\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x140145914\nmov     rbx, rdx                                                       ; +0x19, 0x140145919\nmov     rdi, rcx                                                       ; +0x1c, 0x14014591c\ncmp     dword ptr [rdx+240h], 2                                        ; +0x1f, 0x14014591f\njnz     short loc_140145945                                            ; +0x26, 0x140145926\ncall    LocalLevelManager__sharedState                                 ; +0x28, 0x140145928\nmov     r8b, 1                                                         ; +0x2d, 0x14014592d\nmov     rdx, rbx                                                       ; +0x30, 0x140145930\nmov     rcx, [rax+170h]                                                ; +0x33, 0x140145933\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0x3a, 0x14014593a\njmp     loc_1401459EB                                                  ; +0x40, 0x140145940\nmov     edx, [rdx+158h]                                                ; +0x45, 0x140145945\nlea     rcx, aI_11; \"%i\"                                               ; +0x4b, 0x14014594b\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x52, 0x140145952\nmov     rcx, rax                                                       ; +0x58, 0x140145958\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5b, 0x14014595b\nxorps   xmm0, xmm0                                                     ; +0x61, 0x140145961\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x64, 0x140145964\nxorps   xmm1, xmm1                                                     ; +0x69, 0x140145969\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x6c, 0x14014596c\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x72, 0x140145972\nnop     dword ptr [rax+00000000h]                                      ; +0x79, 0x140145979\ninc     r8                                                             ; +0x80, 0x140145980\ncmp     byte ptr [rax+r8], 0                                           ; +0x83, 0x140145983\njnz     short loc_140145980                                            ; +0x88, 0x140145988\nmov     rdx, rax                                                       ; +0x8a, 0x14014598a\nlea     rcx, [rsp+58h+Block]                                           ; +0x8d, 0x14014598d\ncall    sub_14003A930                                                  ; +0x92, 0x140145992\nnop                                                                    ; +0x97, 0x140145997\nlea     rdx, [rsp+58h+Block]                                           ; +0x98, 0x140145998\nmov     rcx, [rdi+178h]                                                ; +0x9d, 0x14014599d\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0xa4, 0x1401459a4\nnop                                                                    ; +0xaa, 0x1401459aa\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0xab, 0x1401459ab\ncmp     rdx, 0Fh                                                       ; +0xb0, 0x1401459b0\njbe     short loc_1401459EB                                            ; +0xb4, 0x1401459b4\ninc     rdx                                                            ; +0xb6, 0x1401459b6\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0xb9, 0x1401459b9\nmov     rax, rcx                                                       ; +0xbe, 0x1401459be\ncmp     rdx, 1000h                                                     ; +0xc1, 0x1401459c1\njb      short loc_1401459E6                                            ; +0xc8, 0x1401459c8\nadd     rdx, 27h ; '''                                                 ; +0xca, 0x1401459ca\nmov     rcx, [rcx-8]                                                   ; +0xce, 0x1401459ce\nsub     rax, rcx                                                       ; +0xd2, 0x1401459d2\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xd5, 0x1401459d5\ncmp     rax, 1Fh                                                       ; +0xd9, 0x1401459d9\njbe     short loc_1401459E6                                            ; +0xdd, 0x1401459dd\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xdf, 0x1401459df\nalign 2                                                                ; +0xe5, 0x1401459e5\ncall    j_j_free                                                       ; +0xe6, 0x1401459e6\nmov     rcx, [rsp+58h+var_18]                                          ; +0xeb, 0x1401459eb\nxor     rcx, rsp; StackCookie                                          ; +0xf0, 0x1401459f0\ncall    __security_check_cookie                                        ; +0xf3, 0x1401459f3\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xf8, 0x1401459f8\nadd     rsp, 50h                                                       ; +0xfd, 0x1401459fd\npop     rdi                                                            ; +0x101, 0x140145a01\nretn                                                                   ; +0x102, 0x140145a02", "xrefs": ["LevelBrowserLayer::FLAlert_Clicked @ 0x1402cf93c", "LevelListLayer::FLAlert_Clicked @ 0x1403076b5", "LevelListLayer::onFavorite @ 0x14030783c", "<???> @ 0x1406ca578"], "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"}