{"type": "func", "start": 4295016160, "end": 4295016280, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x10000bee0 to 0x10000bf58 (120 bytes)\n// \n// 2 xrefs:\n// > EditorUI::keyDown @ 0x100050d4c\n// > EditorUI::init @ 0x100009af6\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 __fastcall EditorUI::toggleSnap(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v2; // rax\n  bool GameVariable; // r15\n  GameManager *v4; // rax\n  ButtonSprite *v5; // rax\n  const char *v6; // rsi\n\n  v2 = GameManager::sharedState();\n  GameVariable = GameManager::getGameVariable(v2, \"0008\");\n  v4 = GameManager::sharedState();\n  GameManager::setGameVariable(v4, \"0008\", !GameVariable);\n  v5 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_snapBtn->getNormalImage)(a1->m_snapBtn);\n  v6 = \"GJ_button_02.png\";\n  if ( GameVariable )\n    v6 = \"GJ_button_01.png\";\n  ButtonSprite::updateBGImage(v5, v6);\n}", "assembly": "; \n; EditorUI::toggleSnap from 0x10000bee0 to 0x10000bf58 (120 bytes)\n; \n; 2 xrefs:\n; > EditorUI::keyDown @ 0x100050d4c\n; > EditorUI::init @ 0x100009af6\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    rbp                                                            ; +0x0, 0x10000bee0\nmov     rbp, rsp                                                       ; +0x1, 0x10000bee1\npush    r15                                                            ; +0x4, 0x10000bee4\npush    r14                                                            ; +0x6, 0x10000bee6\npush    r12                                                            ; +0x8, 0x10000bee8\npush    rbx                                                            ; +0xa, 0x10000beea\nmov     rbx, rdi                                                       ; +0xb, 0x10000beeb\ncall    GameManager__sharedState                                       ; +0xe, 0x10000beee\nlea     r14, a0008; \"0008\"                                             ; +0x13, 0x10000bef3\nmov     rdi, rax                                                       ; +0x1a, 0x10000befa\nmov     rsi, r14                                                       ; +0x1d, 0x10000befd\ncall    GameManager__getGameVariable                                   ; +0x20, 0x10000bf00\nmov     r15d, eax                                                      ; +0x25, 0x10000bf05\nmov     r12d, eax                                                      ; +0x28, 0x10000bf08\nxor     r12b, 1                                                        ; +0x2b, 0x10000bf0b\ncall    GameManager__sharedState                                       ; +0x2f, 0x10000bf0f\nmovzx   edx, r12b                                                      ; +0x34, 0x10000bf14\nmov     rdi, rax                                                       ; +0x38, 0x10000bf18\nmov     rsi, r14                                                       ; +0x3b, 0x10000bf1b\ncall    GameManager__setGameVariable                                   ; +0x3e, 0x10000bf1e\nmov     rdi, [rbx+370h]                                                ; +0x43, 0x10000bf23\nmov     rax, [rdi]                                                     ; +0x4a, 0x10000bf2a\ncall    qword ptr [rax+420h]                                           ; +0x4d, 0x10000bf2d\nlea     rcx, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x53, 0x10000bf33\nlea     rsi, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x5a, 0x10000bf3a\ntest    r15b, r15b                                                     ; +0x61, 0x10000bf41\ncmovnz  rsi, rcx                                                       ; +0x64, 0x10000bf44\nmov     rdi, rax                                                       ; +0x68, 0x10000bf48\npop     rbx                                                            ; +0x6b, 0x10000bf4b\npop     r12                                                            ; +0x6c, 0x10000bf4c\npop     r14                                                            ; +0x6e, 0x10000bf4e\npop     r15                                                            ; +0x70, 0x10000bf50\npop     rbp                                                            ; +0x72, 0x10000bf52\njmp     ButtonSprite__updateBGImage                                    ; +0x73, 0x10000bf53", "xrefs": ["EditorUI::keyDown @ 0x100050d4c", "EditorUI::init @ 0x100009af6"], "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"}