{"type": "func", "start": 8127156, "end": 8127320, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x7c02b4 to 0x7c0358 (164 bytes)\n// \n// 5 xrefs:\n// > EditorUI::init @ 0x7d100c\n// > EditorUI::handleEditorAction @ 0xbd80b4\n// > <???> @ 0xc5158\n// > EditorUI::init @ 0x7cf548\n// > <???> @ 0x1545c30\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:54:06 +0000\n// \n\n__int64 __fastcall EditorUI::toggleSnap(EditorUI *this, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  GameManager *GameVariable; // x0\n  int v5; // w20\n  GameManager *v6; // x0\n  ButtonSprite *v7; // x0\n  EditorSFXManager *updated; // x0\n  EditorSFXManager *v9; // x0\n\n  v3 = (GameManager *)GameManager::sharedState(this);\n  GameVariable = (GameManager *)GameManager::getGameVariable(v3, \"0008\");\n  v5 = (unsigned __int8)GameVariable;\n  v6 = (GameManager *)GameManager::sharedState(GameVariable);\n  GameManager::setGameVariable(v6, \"0008\", v5 ^ 1);\n  v7 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 122) + 1072LL))(*((_QWORD *)this + 122));\n  if ( v5 )\n    updated = (EditorSFXManager *)ButtonSprite::updateBGImage(v7, \"GJ_button_01.png\");\n  else\n    updated = (EditorSFXManager *)ButtonSprite::updateBGImage(v7, \"GJ_button_02.png\");\n  v9 = (EditorSFXManager *)EditorSFXManager::sharedState(updated);\n  return EditorSFXManager::playAction(v9, 190, 189);\n}", "assembly": "; \n; EditorUI::toggleSnap from 0x7c02b4 to 0x7c0358 (164 bytes)\n; \n; 5 xrefs:\n; > EditorUI::init @ 0x7d100c\n; > EditorUI::handleEditorAction @ 0xbd80b4\n; > <???> @ 0xc5158\n; > EditorUI::init @ 0x7cf548\n; > <???> @ 0x1545c30\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:54:06 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x7c02b4\nMOV             X29, SP                                                ; +0x4, 0x7c02b8\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x7c02bc\nADRP            X19, #a0008@PAGE; \"0008\"                               ; +0xc, 0x7c02c0\nSTR             X21, [SP,#0x30+var_10]                                 ; +0x10, 0x7c02c4\nADD             X19, X19, #a0008@PAGEOFF; \"0008\"                       ; +0x14, 0x7c02c8\nMOV             X21, X0                                                ; +0x18, 0x7c02cc\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1c, 0x7c02d0\nMOV             X1, X19; char *                                        ; +0x20, 0x7c02d4\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x24, 0x7c02d8\nUXTB            W20, W0                                                ; +0x28, 0x7c02dc\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2c, 0x7c02e0\nMOV             X1, X19; char *                                        ; +0x30, 0x7c02e4\nEOR             W2, W20, #1; bool                                      ; +0x34, 0x7c02e8\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x38, 0x7c02ec\nLDR             X1, [X21,#0x3D0]                                       ; +0x3c, 0x7c02f0\nMOV             X0, X1                                                 ; +0x40, 0x7c02f4\nLDR             X1, [X1]                                               ; +0x44, 0x7c02f8\nLDR             X1, [X1,#0x430]                                        ; +0x48, 0x7c02fc\nBLR             X1                                                     ; +0x4c, 0x7c0300\nCBNZ            W20, loc_7C0330                                        ; +0x50, 0x7c0304\nADRL            X1, aGjButton02Png; \"GJ_button_02.png\"                 ; +0x54, 0x7c0308\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x5c, 0x7c0310\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x60, 0x7c0314\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x64, 0x7c0318\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x68, 0x7c031c\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x6c, 0x7c0320\nMOV             W1, #0xBE; int                                         ; +0x70, 0x7c0324\nMOV             W2, #0xBD; int                                         ; +0x74, 0x7c0328\nB               _ZN16EditorSFXManager10playActionEii; EditorSFXManager::playAction(int,int) ; +0x78, 0x7c032c\nADRL            X1, aGjButton01Png; \"GJ_button_01.png\"                 ; +0x7c, 0x7c0330\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x84, 0x7c0338\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x88, 0x7c033c\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x8c, 0x7c0340\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x90, 0x7c0344\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x94, 0x7c0348\nMOV             W1, #0xBE; int                                         ; +0x98, 0x7c034c\nMOV             W2, #0xBD; int                                         ; +0x9c, 0x7c0350\nB               _ZN16EditorSFXManager10playActionEii; EditorSFXManager::playAction(int,int) ; +0xa0, 0x7c0354", "xrefs": ["EditorUI::init @ 0x7d100c", "EditorUI::handleEditorAction @ 0xbd80b4", "<???> @ 0xc5158", "EditorUI::init @ 0x7cf548", "<???> @ 0x1545c30"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}