{"type": "func", "start": 4295457056, "end": 4295457168, "name": "GameStatsManager::toggleEnableItem", "pseudocode": "// \n// GameStatsManager::toggleEnableItem from 0x100077920 to 0x100077990 (112 bytes)\n// \n// 2 xrefs:\n// > GameOptionsLayer::onPracticeMusicSync @ 0x1002b1859\n// > GJGarageLayer::onToggleItem @ 0x10036e790\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  double v4; // xmm0_8\n  _BOOL4 v5; // r14d\n  cocos2d::CCDictionary *m_enabledItems; // rbx\n  __int64 v7; // rax\n  char v8; // [rsp+0h] [rbp-30h]\n  size_t v9[5]; // [rsp+8h] [rbp-28h] BYREF\n\n  v5 = a4;\n  GameStatsManager::getItemKey(v9, v4, *(__int64 *)&a2, a3, a2);\n  m_enabledItems = a1->m_enabledItems;\n  if ( v5 )\n  {\n    v7 = sub_1007AB580(\"%i\", v8);\n    cocos2d::CCDictionary::setObject_1(m_enabledItems, v7, v9);\n  }\n  else\n  {\n    cocos2d::CCDictionary::removeObjectForKey_1(m_enabledItems, v9);\n  }\n  if ( (v9[0] & 1) != 0 )\n    operator delete((void *)v9[2]);\n}", "assembly": "; \n; GameStatsManager::toggleEnableItem from 0x100077920 to 0x100077990 (112 bytes)\n; \n; 2 xrefs:\n; > GameOptionsLayer::onPracticeMusicSync @ 0x1002b1859\n; > GJGarageLayer::onToggleItem @ 0x10036e790\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, 0x100077920\nmov     rbp, rsp                                                       ; +0x1, 0x100077921\npush    r14                                                            ; +0x4, 0x100077924\npush    rbx                                                            ; +0x6, 0x100077926\nsub     rsp, 20h                                                       ; +0x7, 0x100077927\nmov     r14d, ecx                                                      ; +0xb, 0x10007792b\nmov     ecx, esi                                                       ; +0xe, 0x10007792e\nmov     rbx, rdi                                                       ; +0x10, 0x100077930\nlea     rdi, [rbp+var_28]                                              ; +0x13, 0x100077933\ncall    GameStatsManager__getItemKey                                   ; +0x17, 0x100077937\nmov     rbx, [rbx+310h]                                                ; +0x1c, 0x10007793c\ntest    r14d, r14d                                                     ; +0x23, 0x100077943\njz      short loc_10007796C                                            ; +0x26, 0x100077946\nlea     rdi, aI; \"%i\"                                                  ; +0x28, 0x100077948\nmov     esi, 1                                                         ; +0x2f, 0x10007794f\nxor     eax, eax                                                       ; +0x34, 0x100077954\ncall    sub_1007AB580                                                  ; +0x36, 0x100077956\nlea     rdx, [rbp+var_28]                                              ; +0x3b, 0x10007795b\nmov     rdi, rbx                                                       ; +0x3f, 0x10007795f\nmov     rsi, rax                                                       ; +0x42, 0x100077962\ncall    cocos2d__CCDictionary__setObject_1                             ; +0x45, 0x100077965\njmp     short loc_100077978                                            ; +0x4a, 0x10007796a\nlea     rsi, [rbp+var_28]                                              ; +0x4c, 0x10007796c\nmov     rdi, rbx                                                       ; +0x50, 0x100077970\ncall    cocos2d__CCDictionary__removeObjectForKey_1                    ; +0x53, 0x100077973\ntest    [rbp+var_28], 1                                                ; +0x58, 0x100077978\njz      short loc_100077987                                            ; +0x5c, 0x10007797c\nmov     rdi, [rbp+__p]; __p                                            ; +0x5e, 0x10007797e\ncall    __ZdlPv; operator delete(void *)                               ; +0x62, 0x100077982\nadd     rsp, 20h                                                       ; +0x67, 0x100077987\npop     rbx                                                            ; +0x6b, 0x10007798b\npop     r14                                                            ; +0x6c, 0x10007798c\npop     rbp                                                            ; +0x6e, 0x10007798e\nretn                                                                   ; +0x6f, 0x10007798f", "xrefs": ["GameOptionsLayer::onPracticeMusicSync @ 0x1002b1859", "GJGarageLayer::onToggleItem @ 0x10036e790"], "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"}