{"type": "func", "start": 4722596, "end": 4722676, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x480fa4 to 0x480ff4 (80 bytes)\n// \n// 2 xrefs:\n// > EditorUI::init @ 0x48bf5e\n// > EditorUI::handleEditorAction @ 0x6f1bb2\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:22 +0000\n// \n\nint __fastcall EditorUI::toggleSnap(EditorUI *this, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // r0\n  GameManager *GameVariable; // r4\n  GameManager *v5; // r0\n  char *v6; // r0\n  const char *v7; // r1\n  char *updated; // r0\n  EditorSFXManager *v9; // r0\n\n  v3 = (GameManager *)GameManager::sharedState(this);\n  GameVariable = (GameManager *)GameManager::getGameVariable(v3, \"0008\");\n  v5 = (GameManager *)GameManager::sharedState(GameVariable);\n  GameManager::setGameVariable(v5, \"0008\", (const char *)((unsigned __int8)GameVariable ^ 1));\n  v6 = (char *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 177) + 536))(*((_DWORD *)this + 177));\n  if ( GameVariable )\n    v7 = \"GJ_button_01.png\";\n  else\n    v7 = \"GJ_button_02.png\";\n  updated = ButtonSprite::updateBGImage(v6, v7);\n  v9 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)updated);\n  return EditorSFXManager::playAction(v9, 190, 189);\n}", "assembly": "; \n; EditorUI::toggleSnap from 0x480fa4 to 0x480ff4 (80 bytes)\n; \n; 2 xrefs:\n; > EditorUI::init @ 0x48bf5e\n; > EditorUI::handleEditorAction @ 0x6f1bb2\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:22 +0000\n; \nPUSH            {R4-R6,LR}                                             ; +0x0, 0x480fa4\nMOV             R6, R0                                                 ; +0x2, 0x480fa6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x4, 0x480fa8\nLDR             R5, =(a0008 - 0x480FB2); \"0008\"                        ; +0x8, 0x480fac\nADD             R5, PC; \"0008\"                                         ; +0xa, 0x480fae\nMOV             R1, R5; char *                                         ; +0xc, 0x480fb0\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0xe, 0x480fb2\nMOV             R4, R0                                                 ; +0x12, 0x480fb6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x480fb8\nEOR.W           R2, R4, #1                                             ; +0x18, 0x480fbc\nMOV             R1, R5; char *                                         ; +0x1c, 0x480fc0\nUXTB            R2, R2; bool                                           ; +0x1e, 0x480fc2\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x20, 0x480fc4\nLDR.W           R0, [R6,#0x2C4]                                        ; +0x24, 0x480fc8\nLDR             R3, [R0]                                               ; +0x28, 0x480fcc\nLDR.W           R3, [R3,#0x218]                                        ; +0x2a, 0x480fce\nBLX             R3                                                     ; +0x2e, 0x480fd2\nCBZ             R4, loc_480FDC                                         ; +0x30, 0x480fd4\nLDR             R1, =(aGjButton01Png - 0x480FDC); \"GJ_button_01.png\"   ; +0x32, 0x480fd6\nADD             R1, PC; \"GJ_button_01.png\"                             ; +0x34, 0x480fd8\nB               loc_480FE0                                             ; +0x36, 0x480fda\nLDR             R1, =(aGjButton02Png - 0x480FE2); \"GJ_button_02.png\"   ; +0x38, 0x480fdc\nADD             R1, PC; \"GJ_button_02.png\"                             ; +0x3a, 0x480fde\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x3c, 0x480fe0\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x40, 0x480fe4\nMOVS            R1, #0xBE; int                                         ; +0x44, 0x480fe8\nMOVS            R2, #0xBD; int                                         ; +0x46, 0x480fea\nPOP.W           {R4-R6,LR}                                             ; +0x48, 0x480fec\nB.W             _ZN16EditorSFXManager10playActionEii; EditorSFXManager::playAction(int,int) ; +0x4c, 0x480ff0", "xrefs": ["EditorUI::init @ 0x48bf5e", "EditorUI::handleEditorAction @ 0x6f1bb2"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}