{"type": "func", "start": 5370492096, "end": 5370492296, "name": "EditorUI::toggleFreeMove", "pseudocode": "// \n// EditorUI::toggleFreeMove from 0x1401b34c0 to 0x1401b3588 (200 bytes)\n// \n// 4 xrefs:\n// > EditorUI::init @ 0x1401ac316\n// > EditorUI::handleEditorAction @ 0x1401c2920\n// > EditorUI::init @ 0x1401aa609\n// > <???> @ 0x14091a024\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 11:27:56 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditorUI::toggleFreeMove(__int64 a1)\n{\n  __int64 v2; // rax\n  const char *v3; // rdx\n  __int64 v4; // rcx\n  _QWORD *v5; // rbx\n  bool hasSoundsForAction; // al\n  void *v7; // [rsp+30h] [rbp+8h]\n\n  *(_BYTE *)(a1 + 912) = *(_BYTE *)(a1 + 912) == 0;\n  v2 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1008) + 952LL))(*(_QWORD *)(a1 + 1008));\n  v3 = \"GJ_button_01.png\";\n  if ( *(_BYTE *)(a1 + 912) )\n    v3 = \"GJ_button_02.png\";\n  ButtonSprite::updateBGImage(v2, v3);\n  v4 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v7 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v4 = qword_14090BFD0;\n  }\n  GameManager::setGameVariable(v4, \"0004\", *(unsigned __int8 *)(a1 + 912));\n  v5 = (_QWORD *)EditorSFXManager::sharedState();\n  hasSoundsForAction = EditorSFXManager::hasSoundsForAction(v5, 191);\n  EditorSFXManager::playAction((__int64)v5, 2 * hasSoundsForAction + 189);\n}", "assembly": "; \n; EditorUI::toggleFreeMove from 0x1401b34c0 to 0x1401b3588 (200 bytes)\n; \n; 4 xrefs:\n; > EditorUI::init @ 0x1401ac316\n; > EditorUI::handleEditorAction @ 0x1401c2920\n; > EditorUI::init @ 0x1401aa609\n; > <???> @ 0x14091a024\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 11:27:56 +0000\n; \npush    rbx                                                            ; +0x0, 0x1401b34c0\nsub     rsp, 20h                                                       ; +0x2, 0x1401b34c2\nmov     rbx, rcx                                                       ; +0x6, 0x1401b34c6\ncmp     byte ptr [rcx+390h], 0                                         ; +0x9, 0x1401b34c9\nsetz    al                                                             ; +0x10, 0x1401b34d0\nmov     [rcx+390h], al                                                 ; +0x13, 0x1401b34d3\nmov     rcx, [rcx+3F0h]                                                ; +0x19, 0x1401b34d9\nmov     rax, [rcx]                                                     ; +0x20, 0x1401b34e0\ncall    qword ptr [rax+3B8h]                                           ; +0x23, 0x1401b34e3\nlea     rcx, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x29, 0x1401b34e9\nlea     rdx, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x30, 0x1401b34f0\ncmp     byte ptr [rbx+390h], 0                                         ; +0x37, 0x1401b34f7\ncmovnz  rdx, rcx                                                       ; +0x3e, 0x1401b34fe\nmov     rcx, rax                                                       ; +0x42, 0x1401b3502\ncall    ButtonSprite__updateBGImage                                    ; +0x45, 0x1401b3505\nmov     rcx, cs:qword_14090BFD0                                        ; +0x4a, 0x1401b350a\ntest    rcx, rcx                                                       ; +0x51, 0x1401b3511\njnz     short loc_1401B3548                                            ; +0x54, 0x1401b3514\nmov     ecx, 6E8h; Size                                                ; +0x56, 0x1401b3516\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5b, 0x1401b351b\nmov     [rsp+28h+arg_0], rax                                           ; +0x60, 0x1401b3520\nmov     rcx, rax                                                       ; +0x65, 0x1401b3525\ncall    GameManager__GameManager                                       ; +0x68, 0x1401b3528\nnop                                                                    ; +0x6d, 0x1401b352d\nmov     cs:qword_14090BFD0, rax                                        ; +0x6e, 0x1401b352e\nmov     rcx, [rax]                                                     ; +0x75, 0x1401b3535\nmov     rdx, [rcx+48h]                                                 ; +0x78, 0x1401b3538\nmov     rcx, rax                                                       ; +0x7c, 0x1401b353c\ncall    rdx                                                            ; +0x7f, 0x1401b353f\nmov     rcx, cs:qword_14090BFD0                                        ; +0x81, 0x1401b3541\nmovzx   r8d, byte ptr [rbx+390h]                                       ; +0x88, 0x1401b3548\nlea     rdx, a0004; \"0004\"                                             ; +0x90, 0x1401b3550\ncall    GameManager__setGameVariable                                   ; +0x97, 0x1401b3557\ncall    EditorSFXManager__sharedState                                  ; +0x9c, 0x1401b355c\nmov     rbx, rax                                                       ; +0xa1, 0x1401b3561\nmov     edx, 0BFh                                                      ; +0xa4, 0x1401b3564\nmov     rcx, rax                                                       ; +0xa9, 0x1401b3569\ncall    EditorSFXManager__hasSoundsForAction                           ; +0xac, 0x1401b356c\nmovzx   edx, al                                                        ; +0xb1, 0x1401b3571\nlea     edx, ds:0BDh[rdx*2]                                            ; +0xb4, 0x1401b3574\nmov     rcx, rbx                                                       ; +0xbb, 0x1401b357b\nadd     rsp, 20h                                                       ; +0xbe, 0x1401b357e\npop     rbx                                                            ; +0xc2, 0x1401b3582\njmp     EditorSFXManager__playAction                                   ; +0xc3, 0x1401b3583", "xrefs": ["EditorUI::init @ 0x1401ac316", "EditorUI::handleEditorAction @ 0x1401c2920", "EditorUI::init @ 0x1401aa609", "<???> @ 0x14091a024"], "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"}