{"type": "func", "start": 4298334900, "end": 4298335036, "name": "GameStatsManager::toggleEnableItem", "pseudocode": "// \n// GameStatsManager::toggleEnableItem from 0x1003362b4 to 0x10033633c (136 bytes)\n// \n// 2 xrefs:\n// > GameOptionsLayer::onPracticeMusicSync @ 0x1002e1cfc\n// > GJGarageLayer::onToggleItem @ 0x100306000\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// local variable allocation has failed, the output may be wrong!\nvoid __fastcall GameStatsManager::toggleEnableItem(GameStatsManager *a1, UnlockType a2, int a3, bool a4)\n{\n  _BOOL4 v4; // w20\n  cocos2d::CCDictionary *m_enabledItems; // x19\n  cocos2d::CCObject *v7; // x0\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v9; // [xsp+1Fh] [xbp-11h]\n\n  v4 = a4;\n  GameStatsManager::getItemKey(*(__int64 *)&a3, *(__int64 *)&a2, __p);\n  m_enabledItems = a1->m_enabledItems;\n  if ( v4 )\n  {\n    v7 = sub_100268F4C(\"%i\", 1);\n    cocos2d::CCDictionary::setObject_1(m_enabledItems, v7, __p);\n  }\n  else\n  {\n    cocos2d::CCDictionary::removeObjectForKey_1((int)m_enabledItems, (char *)__p);\n  }\n  if ( v9 < 0 )\n    operator delete(__p[0]);\n}", "assembly": "; \n; GameStatsManager::toggleEnableItem from 0x1003362b4 to 0x10033633c (136 bytes)\n; \n; 2 xrefs:\n; > GameOptionsLayer::onPracticeMusicSync @ 0x1002e1cfc\n; > GJGarageLayer::onToggleItem @ 0x100306000\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, #0x40                                          ; +0x0, 0x1003362b4\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x1003362b8\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x1003362bc\nADD             X29, SP, #0x30                                         ; +0xc, 0x1003362c0\nMOV             X20, X3                                                ; +0x10, 0x1003362c4\nMOV             X9, X1                                                 ; +0x14, 0x1003362c8\nMOV             X19, X0                                                ; +0x18, 0x1003362cc\nADD             X8, SP, #0x30+__p                                      ; +0x1c, 0x1003362d0\nMOV             X1, X2                                                 ; +0x20, 0x1003362d4\nMOV             X2, X9                                                 ; +0x24, 0x1003362d8\nBL              GameStatsManager__getItemKey                           ; +0x28, 0x1003362dc\nLDR             X19, [X19,#0x310]                                      ; +0x2c, 0x1003362e0\nCBZ             W20, loc_100336310                                     ; +0x30, 0x1003362e4\nMOV             W8, #1                                                 ; +0x34, 0x1003362e8\nSTR             X8, [SP,#0x30+var_30]                                  ; +0x38, 0x1003362ec\nADRL            X0, aI; \"%i\"                                           ; +0x3c, 0x1003362f0\nBL              sub_100268F4C                                          ; +0x44, 0x1003362f8\nMOV             X1, X0                                                 ; +0x48, 0x1003362fc\nADD             X2, SP, #0x30+__p                                      ; +0x4c, 0x100336300\nMOV             X0, X19                                                ; +0x50, 0x100336304\nBL              cocos2d__CCDictionary__setObject_1                     ; +0x54, 0x100336308\nB               loc_10033631C                                          ; +0x58, 0x10033630c\nADD             X1, SP, #0x30+__p; __s                                 ; +0x5c, 0x100336310\nMOV             X0, X19; int                                           ; +0x60, 0x100336314\nBL              cocos2d__CCDictionary__removeObjectForKey_1            ; +0x64, 0x100336318\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x68, 0x10033631c\nTBZ             W8, #0x1F, loc_10033632C                               ; +0x6c, 0x100336320\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0x70, 0x100336324\nBL              __ZdlPv; operator delete(void *)                       ; +0x74, 0x100336328\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x78, 0x10033632c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x7c, 0x100336330\nADD             SP, SP, #0x40 ; '@'                                    ; +0x80, 0x100336334\nRET                                                                    ; +0x84, 0x100336338", "xrefs": ["GameOptionsLayer::onPracticeMusicSync @ 0x1002e1cfc", "GJGarageLayer::onToggleItem @ 0x100306000"], "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"}