{"type": "func", "start": 4298137296, "end": 4298137476, "name": "GJItemIcon::toggleEnabledState", "pseudocode": "// \n// GJItemIcon::toggleEnabledState from 0x100305ed0 to 0x100305f84 (180 bytes)\n// \n// 2 xrefs:\n// > GJGarageLayer::setupSpecialPage @ 0x1003054e8\n// > GJGarageLayer::onToggleItem @ 0x100306028\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 GJItemIcon::toggleEnabledState(GJItemIcon *a1, bool a2)\n{\n  cocos2d::CCSprite *m_player; // x19\n  __int16 v3; // w8\n  __int64 v4; // x0\n  __int64 v5; // x19\n  unsigned int v6; // w20\n  __int64 v7; // x0\n  __int16 v8; // [xsp+Ch] [xbp-14h] BYREF\n  char v9; // [xsp+Eh] [xbp-12h]\n\n  if ( !a1->m_isIcon )\n  {\n    m_player = a1->m_player;\n    if ( a2 )\n    {\n      v3 = -1;\n      v9 = -1;\n    }\n    else\n    {\n      v9 = 100;\n      v3 = 25700;\n    }\n    v8 = v3;\n    ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))m_player->setColor)(m_player, &v8);\n    v4 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))m_player->getChildren)(m_player);\n    if ( v4 )\n    {\n      v5 = v4;\n      if ( (unsigned int)sub_10024A36C(v4) )\n      {\n        v6 = 0;\n        do\n        {\n          v7 = sub_10024A388(v5, v6);\n          (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 328LL))(v7, 1);\n          ++v6;\n        }\n        while ( v6 < (unsigned int)sub_10024A36C(v5) );\n      }\n    }\n  }\n}", "assembly": "; \n; GJItemIcon::toggleEnabledState from 0x100305ed0 to 0x100305f84 (180 bytes)\n; \n; 2 xrefs:\n; > GJGarageLayer::setupSpecialPage @ 0x1003054e8\n; > GJGarageLayer::onToggleItem @ 0x100306028\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\nLDRB            W8, [X0,#0x26C]                                        ; +0x0, 0x100305ed0\nTBNZ            W8, #0, locret_100305F80                               ; +0x4, 0x100305ed4\nSUB             SP, SP, #0x30                                          ; +0x8, 0x100305ed8\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0xc, 0x100305edc\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x10, 0x100305ee0\nADD             X29, SP, #0x20                                         ; +0x14, 0x100305ee4\nLDR             X19, [X0,#0x258]                                       ; +0x18, 0x100305ee8\nCBZ             W1, loc_100305EFC                                      ; +0x1c, 0x100305eec\nMOV             W8, #0xFFFFFFFF                                        ; +0x20, 0x100305ef0\nSTRB            W8, [SP,#0x20+var_12]                                  ; +0x24, 0x100305ef4\nB               loc_100305F08                                          ; +0x28, 0x100305ef8\nMOV             W8, #0x64 ; 'd'                                        ; +0x2c, 0x100305efc\nSTRB            W8, [SP,#0x20+var_12]                                  ; +0x30, 0x100305f00\nMOV             W8, #0x6464                                            ; +0x34, 0x100305f04\nSTRH            W8, [SP,#0x20+var_14]                                  ; +0x38, 0x100305f08\nLDR             X8, [X19]                                              ; +0x3c, 0x100305f0c\nLDR             X8, [X8,#0x3B0]                                        ; +0x40, 0x100305f10\nADD             X1, SP, #0x20+var_14                                   ; +0x44, 0x100305f14\nMOV             X0, X19                                                ; +0x48, 0x100305f18\nBLR             X8                                                     ; +0x4c, 0x100305f1c\nLDR             X8, [X19]                                              ; +0x50, 0x100305f20\nLDR             X8, [X8,#0x1D8]                                        ; +0x54, 0x100305f24\nMOV             X0, X19                                                ; +0x58, 0x100305f28\nBLR             X8                                                     ; +0x5c, 0x100305f2c\nCBZ             X0, loc_100305F74                                      ; +0x60, 0x100305f30\nMOV             X19, X0                                                ; +0x64, 0x100305f34\nBL              sub_10024A36C                                          ; +0x68, 0x100305f38\nCBZ             W0, loc_100305F74                                      ; +0x6c, 0x100305f3c\nMOV             W20, #0                                                ; +0x70, 0x100305f40\nMOV             X0, X19                                                ; +0x74, 0x100305f44\nMOV             X1, X20                                                ; +0x78, 0x100305f48\nBL              sub_10024A388                                          ; +0x7c, 0x100305f4c\nLDR             X8, [X0]                                               ; +0x80, 0x100305f50\nLDR             X8, [X8,#0x148]                                        ; +0x84, 0x100305f54\nMOV             W1, #1                                                 ; +0x88, 0x100305f58\nBLR             X8                                                     ; +0x8c, 0x100305f5c\nADD             W20, W20, #1                                           ; +0x90, 0x100305f60\nMOV             X0, X19                                                ; +0x94, 0x100305f64\nBL              sub_10024A36C                                          ; +0x98, 0x100305f68\nCMP             W20, W0                                                ; +0x9c, 0x100305f6c\nB.CC            loc_100305F44                                          ; +0xa0, 0x100305f70\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xa4, 0x100305f74\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xa8, 0x100305f78\nADD             SP, SP, #0x30 ; '0'                                    ; +0xac, 0x100305f7c\nRET                                                                    ; +0xb0, 0x100305f80", "xrefs": ["GJGarageLayer::setupSpecialPage @ 0x1003054e8", "GJGarageLayer::onToggleItem @ 0x100306028"], "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"}