{"type": "func", "start": 4299623976, "end": 4299624108, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x100470e28 to 0x100470eac (132 bytes)\n// \n// 3 xrefs:\n// > EditorUI::handleEditorAction @ 0x100163128\n// > EditorUI::init @ 0x10047095c\n// > EditorUI::init @ 0x10046ee10\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 11:05:38 +0000\n// \n\n__int64 __fastcall EditorUI::toggleSnap(__int64 a1)\n{\n  __int64 v2; // x0\n  _BOOL4 GameVariable; // w21\n  __int64 v4; // x0\n  __int64 v5; // x0\n  const char *v6; // x1\n  __n128 v7; // q0\n  __int64 v8; // x0\n\n  v2 = GameManager::sharedState();\n  GameVariable = GameManager::getGameVariable(v2, \"0008\");\n  v4 = GameManager::sharedState();\n  GameManager::setGameVariable(v4, \"0008\", !GameVariable);\n  v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 976) + 1072LL))(*(_QWORD *)(a1 + 976));\n  if ( GameVariable )\n    v6 = \"GJ_button_01.png\";\n  else\n    v6 = \"GJ_button_02.png\";\n  ButtonSprite::updateBGImage(v5, (__int64)v6);\n  v8 = EditorSFXManager::sharedState(v7);\n  return EditorSFXManager::playAction(v8, 190, 189);\n}", "assembly": "; \n; EditorUI::toggleSnap from 0x100470e28 to 0x100470eac (132 bytes)\n; \n; 3 xrefs:\n; > EditorUI::handleEditorAction @ 0x100163128\n; > EditorUI::init @ 0x10047095c\n; > EditorUI::init @ 0x10046ee10\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 11:05:38 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x100470e28\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x100470e2c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x100470e30\nADD             X29, SP, #0x20                                         ; +0xc, 0x100470e34\nMOV             X19, X0                                                ; +0x10, 0x100470e38\nBL              GameManager__sharedState                               ; +0x14, 0x100470e3c\nADRL            X20, a0008; \"0008\"                                     ; +0x18, 0x100470e40\nMOV             X1, X20                                                ; +0x20, 0x100470e48\nBL              GameManager__getGameVariable                           ; +0x24, 0x100470e4c\nMOV             X21, X0                                                ; +0x28, 0x100470e50\nBL              GameManager__sharedState                               ; +0x2c, 0x100470e54\nEOR             W2, W21, #1                                            ; +0x30, 0x100470e58\nMOV             X1, X20                                                ; +0x34, 0x100470e5c\nBL              GameManager__setGameVariable                           ; +0x38, 0x100470e60\nLDR             X0, [X19,#0x3D0]                                       ; +0x3c, 0x100470e64\nLDR             X8, [X0]                                               ; +0x40, 0x100470e68\nLDR             X8, [X8,#0x430]                                        ; +0x44, 0x100470e6c\nBLR             X8                                                     ; +0x48, 0x100470e70\nADRL            X8, aGjButton02Png; \"GJ_button_02.png\"                 ; +0x4c, 0x100470e74\nADRL            X9, aGjButton01Png; \"GJ_button_01.png\"                 ; +0x54, 0x100470e7c\nCMP             W21, #0                                                ; +0x5c, 0x100470e84\nCSEL            X1, X9, X8, NE                                         ; +0x60, 0x100470e88\nBL              ButtonSprite__updateBGImage                            ; +0x64, 0x100470e8c\nBL              EditorSFXManager__sharedState                          ; +0x68, 0x100470e90\nMOV             W1, #0xBE                                              ; +0x6c, 0x100470e94\nMOV             W2, #0xBD                                              ; +0x70, 0x100470e98\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x74, 0x100470e9c\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x78, 0x100470ea0\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x7c, 0x100470ea4\nB               EditorSFXManager__playAction                           ; +0x80, 0x100470ea8", "xrefs": ["EditorUI::handleEditorAction @ 0x100163128", "EditorUI::init @ 0x10047095c", "EditorUI::init @ 0x10046ee10"], "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"}