{"type": "func", "start": 4295000016, "end": 4295000159, "name": "EditorUI::toggleSnap", "pseudocode": "// \n// EditorUI::toggleSnap from 0x100007fd0 to 0x10000805f (143 bytes)\n// \n// 2 xrefs:\n// > EditorUI::handleEditorAction @ 0x10060c654\n// > EditorUI::init @ 0x100005cee\n// \n// This function is hookable on this platform (idp: pc, 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:18:48 +0000\n// \n\n__int64 __fastcall EditorUI::toggleSnap(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 v4; // rdi\n  unsigned __int8 GameVariable; // r15\n  __int64 v6; // rdx\n  __int64 v7; // rax\n  __int64 v8; // rax\n  const char *v9; // rsi\n  __int64 v10; // rax\n\n  v4 = GameManager::sharedState(a1, a2, a3);\n  GameVariable = GameManager::getGameVariable(v4, \"0008\");\n  v7 = GameManager::sharedState(v4, \"0008\", v6);\n  GameManager::setGameVariable(v7, \"0008\", GameVariable ^ 1u);\n  v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 976) + 1072LL))(*(_QWORD *)(a1 + 976));\n  v9 = \"GJ_button_02.png\";\n  if ( GameVariable )\n    v9 = \"GJ_button_01.png\";\n  ButtonSprite::updateBGImage(v8, v9);\n  v10 = EditorSFXManager::sharedState();\n  return EditorSFXManager::playAction(v10, 190, 189);\n}", "assembly": "; \n; EditorUI::toggleSnap from 0x100007fd0 to 0x10000805f (143 bytes)\n; \n; 2 xrefs:\n; > EditorUI::handleEditorAction @ 0x10060c654\n; > EditorUI::init @ 0x100005cee\n; \n; This function is hookable on this platform (idp: pc, 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:18:48 +0000\n; \npush    rbp                                                            ; +0x0, 0x100007fd0\nmov     rbp, rsp                                                       ; +0x1, 0x100007fd1\npush    r15                                                            ; +0x4, 0x100007fd4\npush    r14                                                            ; +0x6, 0x100007fd6\npush    r12                                                            ; +0x8, 0x100007fd8\npush    rbx                                                            ; +0xa, 0x100007fda\nmov     rbx, rdi                                                       ; +0xb, 0x100007fdb\ncall    GameManager__sharedState                                       ; +0xe, 0x100007fde\nlea     r14, a0008; \"0008\"                                             ; +0x13, 0x100007fe3\nmov     rdi, rax                                                       ; +0x1a, 0x100007fea\nmov     rsi, r14                                                       ; +0x1d, 0x100007fed\ncall    GameManager__getGameVariable                                   ; +0x20, 0x100007ff0\nmov     r15d, eax                                                      ; +0x25, 0x100007ff5\nmov     r12d, eax                                                      ; +0x28, 0x100007ff8\nxor     r12b, 1                                                        ; +0x2b, 0x100007ffb\ncall    GameManager__sharedState                                       ; +0x2f, 0x100007fff\nmovzx   edx, r12b                                                      ; +0x34, 0x100008004\nmov     rdi, rax                                                       ; +0x38, 0x100008008\nmov     rsi, r14                                                       ; +0x3b, 0x10000800b\ncall    GameManager__setGameVariable                                   ; +0x3e, 0x10000800e\nmov     rdi, [rbx+3D0h]                                                ; +0x43, 0x100008013\nmov     rax, [rdi]                                                     ; +0x4a, 0x10000801a\ncall    qword ptr [rax+430h]                                           ; +0x4d, 0x10000801d\nlea     rcx, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x53, 0x100008023\nlea     rsi, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x5a, 0x10000802a\ntest    r15b, r15b                                                     ; +0x61, 0x100008031\ncmovnz  rsi, rcx                                                       ; +0x64, 0x100008034\nmov     rdi, rax                                                       ; +0x68, 0x100008038\ncall    ButtonSprite__updateBGImage                                    ; +0x6b, 0x10000803b\ncall    EditorSFXManager__sharedState                                  ; +0x70, 0x100008040\nmov     rdi, rax                                                       ; +0x75, 0x100008045\nmov     esi, 0BEh                                                      ; +0x78, 0x100008048\nmov     edx, 0BDh                                                      ; +0x7d, 0x10000804d\npop     rbx                                                            ; +0x82, 0x100008052\npop     r12                                                            ; +0x83, 0x100008053\npop     r14                                                            ; +0x85, 0x100008055\npop     r15                                                            ; +0x87, 0x100008057\npop     rbp                                                            ; +0x89, 0x100008059\njmp     EditorSFXManager__playAction                                   ; +0x8a, 0x10000805a", "xrefs": ["EditorUI::handleEditorAction @ 0x10060c654", "EditorUI::init @ 0x100005cee"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}