{"type": "func", "start": 3652392, "end": 3652460, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x37bb28 to 0x37bb6c (68 bytes)\n// \n// 2 xrefs:\n// > EditorUI::init @ 0x3a28ce\n// > EditorUI::keyDown @ 0x3a7402\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; // r0\n  _BOOL4 GameVariable; // r4\n  GameManager *v5; // r0\n  ButtonSprite *v6; // r0\n  const char *v7; // r1\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 0x37bb28 to 0x37bb6c (68 bytes)\n; \n; 2 xrefs:\n; > EditorUI::init @ 0x3a28ce\n; > EditorUI::keyDown @ 0x3a7402\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            {R4-R6,LR}                                             ; +0x0, 0x37bb28\nMOV             R6, R0                                                 ; +0x2, 0x37bb2a\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x4, 0x37bb2c\nLDR             R5, =(a0008 - 0x37BB36); \"0008\"                        ; +0x8, 0x37bb30\nADD             R5, PC; \"0008\"                                         ; +0xa, 0x37bb32\nMOV             R1, R5; char *                                         ; +0xc, 0x37bb34\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0xe, 0x37bb36\nMOV             R4, R0                                                 ; +0x12, 0x37bb3a\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x37bb3c\nEOR.W           R2, R4, #1                                             ; +0x18, 0x37bb40\nMOV             R1, R5; char *                                         ; +0x1c, 0x37bb44\nUXTB            R2, R2; bool                                           ; +0x1e, 0x37bb46\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x20, 0x37bb48\nLDR.W           R0, [R6,#0x284]                                        ; +0x24, 0x37bb4c\nLDR             R3, [R0]                                               ; +0x28, 0x37bb50\nLDR.W           R3, [R3,#0x210]                                        ; +0x2a, 0x37bb52\nBLX             R3                                                     ; +0x2e, 0x37bb56\nCBZ             R4, loc_37BB60                                         ; +0x30, 0x37bb58\nLDR             R1, =(aGjButton01Png - 0x37BB60); \"GJ_button_01.png\"   ; +0x32, 0x37bb5a\nADD             R1, PC; \"GJ_button_01.png\"                             ; +0x34, 0x37bb5c\nB               loc_37BB64                                             ; +0x36, 0x37bb5e\nLDR             R1, =(aGjButton02Png - 0x37BB66); \"GJ_button_02.png\"   ; +0x38, 0x37bb60\nADD             R1, PC; \"GJ_button_02.png\"                             ; +0x3a, 0x37bb62\nPOP.W           {R4-R6,LR}                                             ; +0x3c, 0x37bb64\nB.W             _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x40, 0x37bb68", "xrefs": ["EditorUI::init @ 0x3a28ce", "EditorUI::keyDown @ 0x3a7402"], "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"}