{"type": "func", "start": 4295568164, "end": 4295568544, "name": "GameLevelManager::deleteLevel", "pseudocode": "// \n// GameLevelManager::deleteLevel from 0x100092b24 to 0x100092ca0 (380 bytes)\n// \n// 4 xrefs:\n// > LevelInfoLayer::onDelete @ 0x10002aae4\n// > EditLevelLayer::onDelete @ 0x1000ec084\n// > LevelBrowserLayer::deleteSelected @ 0x10041945c\n// > LevelBrowserLayer::FLAlert_Clicked @ 0x1004196f8\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\nvoid __fastcall GameLevelManager::deleteLevel(GameLevelManager *a1, GJGameLevel *a2)\n{\n  LocalLevelManager *v3; // x0\n  cocos2d::CCDictionary *m_onlineLevels; // x21\n  cocos2d::CCString *v6; // x0\n  char *CString; // x0\n  __int64 v8; // x0\n  __int64 v9; // x21\n  cocos2d::CCDictionary *v10; // x20\n  cocos2d::CCString *v11; // x0\n  char *v12; // x0\n  std::string __str; // [xsp+10h] [xbp-50h] BYREF\n  void *__p[2]; // [xsp+28h] [xbp-38h] BYREF\n  char v15; // [xsp+3Fh] [xbp-21h]\n\n  if ( a2->m_levelType == Editor )\n  {\n    v3 = LocalLevelManager::sharedState();\n    sub_10024A444(v3->m_localLevels, a2, 1);\n    return;\n  }\n  m_onlineLevels = a1->m_onlineLevels;\n  v6 = (cocos2d::CCString *)sub_100268F4C(\"%i\", a2->m_levelID.random - a2->m_levelID.seed);\n  CString = (char *)cocos2d::CCString::getCString(v6);\n  sub_100009900(__p, CString);\n  v8 = cocos2d::CCDictionary::objectForKey_1(m_onlineLevels, __p);\n  v9 = v8;\n  if ( v15 < 0 )\n  {\n    operator delete(__p[0]);\n    if ( !v9 )\n      goto LABEL_15;\n  }\n  else if ( !v8 )\n  {\nLABEL_15:\n    v10 = a1->m_onlineLevels;\n    v11 = (cocos2d::CCString *)sub_100268F4C(\"%i\", a2->m_levelID.random - a2->m_levelID.seed);\n    v12 = (char *)cocos2d::CCString::getCString(v11);\n    sub_100009900(__p, v12);\n    cocos2d::CCDictionary::removeObjectForKey_1((int)v10, (char *)__p);\n    if ( v15 < 0 )\n      operator delete(__p[0]);\n    return;\n  }\n  if ( *(_DWORD *)(v9 + 744) <= *(_DWORD *)(v9 + 740)\n    && *(int *)(v9 + 772) <= 0\n    && *(int *)(v9 + 1180) <= 0\n    && !*(_DWORD *)(v9 + 1224)\n    && *(_BYTE *)(v9 + 796) != 1 )\n  {\n    goto LABEL_15;\n  }\n  sub_100009900(&__str, \"\");\n  std::string::operator=((std::string *)(v9 + 392), &__str);\n  if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__str.__r_.__value_.__l.__data_);\n  *(_BYTE *)(v9 + 993) = 1;\n}", "assembly": "; \n; GameLevelManager::deleteLevel from 0x100092b24 to 0x100092ca0 (380 bytes)\n; \n; 4 xrefs:\n; > LevelInfoLayer::onDelete @ 0x10002aae4\n; > EditLevelLayer::onDelete @ 0x1000ec084\n; > LevelBrowserLayer::deleteSelected @ 0x10041945c\n; > LevelBrowserLayer::FLAlert_Clicked @ 0x1004196f8\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x100092b24\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x4, 0x100092b28\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x100092b2c\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x100092b30\nADD             X29, SP, #0x60                                         ; +0x10, 0x100092b34\nMOV             X19, X1                                                ; +0x14, 0x100092b38\nLDR             W8, [X1,#0x404]                                        ; +0x18, 0x100092b3c\nCMP             W8, #2                                                 ; +0x1c, 0x100092b40\nB.NE            loc_100092B6C                                          ; +0x20, 0x100092b44\nBL              LocalLevelManager__sharedState                         ; +0x24, 0x100092b48\nLDR             X0, [X0,#0x160]                                        ; +0x28, 0x100092b4c\nMOV             X1, X19                                                ; +0x2c, 0x100092b50\nMOV             W2, #1                                                 ; +0x30, 0x100092b54\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x34, 0x100092b58\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x38, 0x100092b5c\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x3c, 0x100092b60\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x40, 0x100092b64\nB               sub_10024A444                                          ; +0x44, 0x100092b68\nMOV             X20, X0                                                ; +0x48, 0x100092b6c\nLDR             X21, [X0,#0x168]                                       ; +0x4c, 0x100092b70\nLDR             W8, [X19,#0x148]                                       ; +0x50, 0x100092b74\nLDR             W9, [X19,#0x14C]                                       ; +0x54, 0x100092b78\nSUB             W8, W8, W9                                             ; +0x58, 0x100092b7c\nSTR             X8, [SP,#0x60+var_60]                                  ; +0x5c, 0x100092b80\nADRL            X0, aI; \"%i\"                                           ; +0x60, 0x100092b84\nBL              sub_100268F4C                                          ; +0x68, 0x100092b8c\nBL              cocos2d__CCString__getCString                          ; +0x6c, 0x100092b90\nMOV             X1, X0; __s                                            ; +0x70, 0x100092b94\nADD             X0, SP, #0x60+__p; int                                 ; +0x74, 0x100092b98\nBL              sub_100009900                                          ; +0x78, 0x100092b9c\nADD             X1, SP, #0x60+__p                                      ; +0x7c, 0x100092ba0\nMOV             X0, X21                                                ; +0x80, 0x100092ba4\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x84, 0x100092ba8\nMOV             X21, X0                                                ; +0x88, 0x100092bac\nLDRSB           W8, [SP,#0x60+var_21]                                  ; +0x8c, 0x100092bb0\nTBNZ            W8, #0x1F, loc_100092BC0                               ; +0x90, 0x100092bb4\nCBNZ            X21, loc_100092BCC                                     ; +0x94, 0x100092bb8\nB               loc_100092C40                                          ; +0x98, 0x100092bbc\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x9c, 0x100092bc0\nBL              __ZdlPv; operator delete(void *)                       ; +0xa0, 0x100092bc4\nCBZ             X21, loc_100092C40                                     ; +0xa4, 0x100092bc8\nLDR             W8, [X21,#0x2E8]                                       ; +0xa8, 0x100092bcc\nLDR             W9, [X21,#0x2E4]                                       ; +0xac, 0x100092bd0\nCMP             W8, W9                                                 ; +0xb0, 0x100092bd4\nB.GT            loc_100092C08                                          ; +0xb4, 0x100092bd8\nLDR             W8, [X21,#0x304]                                       ; +0xb8, 0x100092bdc\nCMP             W8, #0                                                 ; +0xbc, 0x100092be0\nB.GT            loc_100092C08                                          ; +0xc0, 0x100092be4\nLDR             W8, [X21,#0x49C]                                       ; +0xc4, 0x100092be8\nCMP             W8, #0                                                 ; +0xc8, 0x100092bec\nB.GT            loc_100092C08                                          ; +0xcc, 0x100092bf0\nLDR             W8, [X21,#0x4C8]                                       ; +0xd0, 0x100092bf4\nCBNZ            W8, loc_100092C08                                      ; +0xd4, 0x100092bf8\nLDRB            W8, [X21,#0x31C]                                       ; +0xd8, 0x100092bfc\nCMP             W8, #1                                                 ; +0xdc, 0x100092c00\nB.NE            loc_100092C40                                          ; +0xe0, 0x100092c04\nADRL            X1, asc_100746688; \"\"                                  ; +0xe4, 0x100092c08\nADD             X0, SP, #0x60+__str; int                               ; +0xec, 0x100092c10\nBL              sub_100009900                                          ; +0xf0, 0x100092c14\nADD             X0, X21, #0x188; this                                  ; +0xf4, 0x100092c18\nADD             X1, SP, #0x60+__str; __str                             ; +0xf8, 0x100092c1c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0xfc, 0x100092c20\nLDRSB           W8, [SP,#0x60+__str.__r_.__value_+0x17]                ; +0x100, 0x100092c24\nTBZ             W8, #0x1F, loc_100092C34                               ; +0x104, 0x100092c28\nLDR             X0, [SP,#0x60+__str]; __p                              ; +0x108, 0x100092c2c\nBL              __ZdlPv; operator delete(void *)                       ; +0x10c, 0x100092c30\nMOV             W8, #1                                                 ; +0x110, 0x100092c34\nSTRB            W8, [X21,#0x3E1]                                       ; +0x114, 0x100092c38\nB               loc_100092C8C                                          ; +0x118, 0x100092c3c\nLDR             X20, [X20,#0x168]                                      ; +0x11c, 0x100092c40\nLDR             W8, [X19,#0x148]                                       ; +0x120, 0x100092c44\nLDR             W9, [X19,#0x14C]                                       ; +0x124, 0x100092c48\nSUB             W8, W8, W9                                             ; +0x128, 0x100092c4c\nSTR             X8, [SP,#0x60+var_60]                                  ; +0x12c, 0x100092c50\nADRL            X0, aI; \"%i\"                                           ; +0x130, 0x100092c54\nBL              sub_100268F4C                                          ; +0x138, 0x100092c5c\nBL              cocos2d__CCString__getCString                          ; +0x13c, 0x100092c60\nMOV             X1, X0; __s                                            ; +0x140, 0x100092c64\nADD             X0, SP, #0x60+__p; int                                 ; +0x144, 0x100092c68\nBL              sub_100009900                                          ; +0x148, 0x100092c6c\nADD             X1, SP, #0x60+__p; __s                                 ; +0x14c, 0x100092c70\nMOV             X0, X20; int                                           ; +0x150, 0x100092c74\nBL              cocos2d__CCDictionary__removeObjectForKey_1            ; +0x154, 0x100092c78\nLDRSB           W8, [SP,#0x60+var_21]                                  ; +0x158, 0x100092c7c\nTBZ             W8, #0x1F, loc_100092C8C                               ; +0x15c, 0x100092c80\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x160, 0x100092c84\nBL              __ZdlPv; operator delete(void *)                       ; +0x164, 0x100092c88\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x168, 0x100092c8c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x16c, 0x100092c90\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x170, 0x100092c94\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x174, 0x100092c98\nRET                                                                    ; +0x178, 0x100092c9c", "xrefs": ["LevelInfoLayer::onDelete @ 0x10002aae4", "EditLevelLayer::onDelete @ 0x1000ec084", "LevelBrowserLayer::deleteSelected @ 0x10041945c", "LevelBrowserLayer::FLAlert_Clicked @ 0x1004196f8"], "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"}