{"type": "func", "start": 5370698704, "end": 5370698848, "name": "GameStatsManager::toggleEnableItem", "pseudocode": "// \n// GameStatsManager::toggleEnableItem from 0x1401e5bd0 to 0x1401e5c60 (144 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::onToggleItem @ 0x1402779b7\n// > GameOptionsLayer::onPracticeMusicSync @ 0x1402a03b7\n// > <???> @ 0x1406cc60c\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 GameStatsManager::toggleEnableItem(GameStatsManager *a1, UnlockType a2, int a3, bool a4)\n{\n  struct cocos2d::CCString *v6; // rax\n  _QWORD v7[4]; // [rsp+20h] [rbp-38h] BYREF\n\n  GameStatsManager::getItemKey((__int64)a1, v7, a3, a2);\n  if ( a4 )\n  {\n    v6 = cocos2d::CCString::createWithFormat(\"%i\", 1);\n    cocos2d::CCDictionary::setObject(a1->m_enabledItems, v6, v7);\n  }\n  else\n  {\n    cocos2d::CCDictionary::removeObjectForKey(a1->m_enabledItems, v7);\n  }\n  sub_14003A830((__int64)v7);\n}", "assembly": "; \n; GameStatsManager::toggleEnableItem from 0x1401e5bd0 to 0x1401e5c60 (144 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::onToggleItem @ 0x1402779b7\n; > GameOptionsLayer::onPracticeMusicSync @ 0x1402a03b7\n; > <???> @ 0x1406cc60c\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_18], rbx                                              ; +0x0, 0x1401e5bd0\npush    rdi                                                            ; +0x5, 0x1401e5bd5\nsub     rsp, 50h                                                       ; +0x6, 0x1401e5bd6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1401e5bda\nxor     rax, rsp                                                       ; +0x11, 0x1401e5be1\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x1401e5be4\nmovzx   ebx, r9b                                                       ; +0x19, 0x1401e5be9\nmov     rdi, rcx                                                       ; +0x1d, 0x1401e5bed\nmov     r9d, edx                                                       ; +0x20, 0x1401e5bf0\nlea     rdx, [rsp+58h+var_38]                                          ; +0x23, 0x1401e5bf3\ncall    GameStatsManager__getItemKey                                   ; +0x28, 0x1401e5bf8\nnop                                                                    ; +0x2d, 0x1401e5bfd\ntest    bl, bl                                                         ; +0x2e, 0x1401e5bfe\njz      short loc_1401E5C2B                                            ; +0x30, 0x1401e5c00\nmov     edx, 1                                                         ; +0x32, 0x1401e5c02\nlea     rcx, aI_11; \"%i\"                                               ; +0x37, 0x1401e5c07\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x3e, 0x1401e5c0e\nmov     rdx, rax                                                       ; +0x44, 0x1401e5c14\nlea     r8, [rsp+58h+var_38]                                           ; +0x47, 0x1401e5c17\nmov     rcx, [rdi+378h]                                                ; +0x4c, 0x1401e5c1c\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 &) ; +0x53, 0x1401e5c23\njmp     short loc_1401E5C3E                                            ; +0x59, 0x1401e5c29\nlea     rdx, [rsp+58h+var_38]                                          ; +0x5b, 0x1401e5c2b\nmov     rcx, [rdi+378h]                                                ; +0x60, 0x1401e5c30\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 &) ; +0x67, 0x1401e5c37\nnop                                                                    ; +0x6d, 0x1401e5c3d\nlea     rcx, [rsp+58h+var_38]                                          ; +0x6e, 0x1401e5c3e\ncall    sub_14003A830                                                  ; +0x73, 0x1401e5c43\nmov     rcx, [rsp+58h+var_18]                                          ; +0x78, 0x1401e5c48\nxor     rcx, rsp; StackCookie                                          ; +0x7d, 0x1401e5c4d\ncall    __security_check_cookie                                        ; +0x80, 0x1401e5c50\nmov     rbx, [rsp+58h+arg_18]                                          ; +0x85, 0x1401e5c55\nadd     rsp, 50h                                                       ; +0x8a, 0x1401e5c5a\npop     rdi                                                            ; +0x8e, 0x1401e5c5e\nretn                                                                   ; +0x8f, 0x1401e5c5f", "xrefs": ["GJGarageLayer::onToggleItem @ 0x1402779b7", "GameOptionsLayer::onPracticeMusicSync @ 0x1402a03b7", "<???> @ 0x1406cc60c"], "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"}