{"type": "func", "start": 6840420, "end": 6840552, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x686064 to 0x6860e8 (132 bytes)\n// \n// 5 xrefs:\n// > EditorUI::init @ 0x6bdd1c\n// > EditorUI::keyDown @ 0x6c5ebc\n// > <???> @ 0x95280\n// > EditorUI::init @ 0x6bc560\n// > <???> @ 0x122d188\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 EditorUI::toggleSnap(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  _BOOL4 GameVariable; // w20\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 *)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 0x686064 to 0x6860e8 (132 bytes)\n; \n; 5 xrefs:\n; > EditorUI::init @ 0x6bdd1c\n; > EditorUI::keyDown @ 0x6c5ebc\n; > <???> @ 0x95280\n; > EditorUI::init @ 0x6bc560\n; > <???> @ 0x122d188\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             X29, X30, [SP,#var_30]!                                ; +0x0, 0x686064\nMOV             X29, SP                                                ; +0x4, 0x686068\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x68606c\nADRP            X19, #a0008@PAGE; \"0008\"                               ; +0xc, 0x686070\nSTR             X21, [SP,#0x30+var_10]                                 ; +0x10, 0x686074\nADD             X19, X19, #a0008@PAGEOFF; \"0008\"                       ; +0x14, 0x686078\nMOV             X21, X0                                                ; +0x18, 0x68607c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1c, 0x686080\nMOV             X1, X19; char *                                        ; +0x20, 0x686084\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x24, 0x686088\nUXTB            W20, W0                                                ; +0x28, 0x68608c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2c, 0x686090\nMOV             X1, X19; char *                                        ; +0x30, 0x686094\nEOR             W2, W20, #1; bool                                      ; +0x34, 0x686098\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x38, 0x68609c\nLDR             X1, [X21,#0x380]                                       ; +0x3c, 0x6860a0\nMOV             X0, X1                                                 ; +0x40, 0x6860a4\nLDR             X1, [X1]                                               ; +0x44, 0x6860a8\nLDR             X1, [X1,#0x420]                                        ; +0x48, 0x6860ac\nBLR             X1                                                     ; +0x4c, 0x6860b0\nCBNZ            W20, loc_6860D0                                        ; +0x50, 0x6860b4\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x54, 0x6860b8\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x58, 0x6860bc\nADRP            X1, #aGjButton02Png@PAGE; \"GJ_button_02.png\"           ; +0x5c, 0x6860c0\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x60, 0x6860c4\nADD             X1, X1, #aGjButton02Png@PAGEOFF; \"GJ_button_02.png\"    ; +0x64, 0x6860c8\nB               _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x68, 0x6860cc\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x6c, 0x6860d0\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x70, 0x6860d4\nADRP            X1, #aGjButton01Png@PAGE; \"GJ_button_01.png\"           ; +0x74, 0x6860d8\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x78, 0x6860dc\nADD             X1, X1, #aGjButton01Png@PAGEOFF; \"GJ_button_01.png\"    ; +0x7c, 0x6860e0\nB               _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x80, 0x6860e4", "xrefs": ["EditorUI::init @ 0x6bdd1c", "EditorUI::keyDown @ 0x6c5ebc", "<???> @ 0x95280", "EditorUI::init @ 0x6bc560", "<???> @ 0x122d188"], "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"}