{"type": "func", "start": 4298928992, "end": 4298929108, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x1003c7360 to 0x1003c73d4 (116 bytes)\n// \n// 3 xrefs:\n// > EditorUI::init @ 0x1003c6dd0\n// > EditorUI::keyDown @ 0x1003fa1d8\n// > EditorUI::init @ 0x1003c558c\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 EditorUI::toggleSnap(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  _BOOL4 GameVariable; // w21\n  GameManager *v5; // x0\n  ButtonSprite *v6; // x0\n  const char *v7; // x1\n\n  v3 = GameManager::sharedState();\n  GameVariable = GameManager::getGameVariable(v3, \"0008\");\n  v5 = GameManager::sharedState();\n  GameManager::setGameVariable(v5, \"0008\", !GameVariable);\n  v6 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_snapBtn->getNormalImage)(a1->m_snapBtn);\n  if ( GameVariable )\n    v7 = \"GJ_button_01.png\";\n  else\n    v7 = \"GJ_button_02.png\";\n  ButtonSprite::updateBGImage(v6, v7);\n}", "assembly": "; \n; EditorUI::toggleSnap from 0x1003c7360 to 0x1003c73d4 (116 bytes)\n; \n; 3 xrefs:\n; > EditorUI::init @ 0x1003c6dd0\n; > EditorUI::keyDown @ 0x1003fa1d8\n; > EditorUI::init @ 0x1003c558c\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\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1003c7360\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003c7364\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003c7368\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003c736c\nMOV             X19, X0                                                ; +0x10, 0x1003c7370\nBL              GameManager__sharedState                               ; +0x14, 0x1003c7374\nADRL            X20, a0008; \"0008\"                                     ; +0x18, 0x1003c7378\nMOV             X1, X20                                                ; +0x20, 0x1003c7380\nBL              GameManager__getGameVariable                           ; +0x24, 0x1003c7384\nMOV             X21, X0                                                ; +0x28, 0x1003c7388\nBL              GameManager__sharedState                               ; +0x2c, 0x1003c738c\nEOR             W2, W21, #1                                            ; +0x30, 0x1003c7390\nMOV             X1, X20                                                ; +0x34, 0x1003c7394\nBL              GameManager__setGameVariable                           ; +0x38, 0x1003c7398\nLDR             X0, [X19,#0x370]                                       ; +0x3c, 0x1003c739c\nLDR             X8, [X0]                                               ; +0x40, 0x1003c73a0\nLDR             X8, [X8,#0x420]                                        ; +0x44, 0x1003c73a4\nBLR             X8                                                     ; +0x48, 0x1003c73a8\nADRL            X8, aGjButton02Png; \"GJ_button_02.png\"                 ; +0x4c, 0x1003c73ac\nADRL            X9, aGjButton01Png; \"GJ_button_01.png\"                 ; +0x54, 0x1003c73b4\nCMP             W21, #0                                                ; +0x5c, 0x1003c73bc\nCSEL            X1, X9, X8, NE                                         ; +0x60, 0x1003c73c0\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x64, 0x1003c73c4\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x68, 0x1003c73c8\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x6c, 0x1003c73cc\nB               ButtonSprite__updateBGImage                            ; +0x70, 0x1003c73d0", "xrefs": ["EditorUI::init @ 0x1003c6dd0", "EditorUI::keyDown @ 0x1003fa1d8", "EditorUI::init @ 0x1003c558c"], "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"}