{"type": "func", "start": 5369823328, "end": 5369823486, "name": "EditorUI::toggleFreeMove", "pseudocode": "// \n// EditorUI::toggleFreeMove from 0x140110060 to 0x1401100fe (158 bytes)\n// \n// 4 xrefs:\n// > EditorUI::init @ 0x1400e1848\n// > EditorUI::keyDown @ 0x140125bfa\n// > EditorUI::init @ 0x1400dff13\n// > <???> @ 0x1406c8e8c\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 EditorUI::toggleFreeMove(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  ButtonSprite *v3; // rax\n  const char *v4; // rdx\n  GameManager *v5; // rcx\n  void *v6; // [rsp+30h] [rbp+8h]\n\n  a1->m_freeMoveEnabled = !a1->m_freeMoveEnabled;\n  v3 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCObject *))a1->m_freeMoveBtn->getNormalImage)(\n                         a1->m_freeMoveBtn,\n                         a2);\n  v4 = \"GJ_button_01.png\";\n  if ( a1->m_freeMoveEnabled )\n    v4 = \"GJ_button_02.png\";\n  ButtonSprite::updateBGImage(v3, v4);\n  v5 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v6 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v6);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v5, \"0004\", a1->m_freeMoveEnabled);\n}", "assembly": "; \n; EditorUI::toggleFreeMove from 0x140110060 to 0x1401100fe (158 bytes)\n; \n; 4 xrefs:\n; > EditorUI::init @ 0x1400e1848\n; > EditorUI::keyDown @ 0x140125bfa\n; > EditorUI::init @ 0x1400dff13\n; > <???> @ 0x1406c8e8c\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    rbx                                                            ; +0x0, 0x140110060\nsub     rsp, 20h                                                       ; +0x2, 0x140110062\nmov     rbx, rcx                                                       ; +0x6, 0x140110066\ncmp     byte ptr [rcx+320h], 0                                         ; +0x9, 0x140110069\nsetz    al                                                             ; +0x10, 0x140110070\nmov     [rcx+320h], al                                                 ; +0x13, 0x140110073\nmov     rcx, [rcx+378h]                                                ; +0x19, 0x140110079\nmov     rax, [rcx]                                                     ; +0x20, 0x140110080\ncall    qword ptr [rax+3A8h]                                           ; +0x23, 0x140110083\nlea     rcx, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x29, 0x140110089\nlea     rdx, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x30, 0x140110090\ncmp     byte ptr [rbx+320h], 0                                         ; +0x37, 0x140110097\ncmovnz  rdx, rcx                                                       ; +0x3e, 0x14011009e\nmov     rcx, rax                                                       ; +0x42, 0x1401100a2\ncall    ButtonSprite__updateBGImage                                    ; +0x45, 0x1401100a5\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x4a, 0x1401100aa\ntest    rcx, rcx                                                       ; +0x51, 0x1401100b1\njnz     short loc_1401100E5                                            ; +0x54, 0x1401100b4\nmov     ecx, 668h; Size                                                ; +0x56, 0x1401100b6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5b, 0x1401100bb\nmov     [rsp+28h+arg_0], rax                                           ; +0x60, 0x1401100c0\nmov     rcx, rax                                                       ; +0x65, 0x1401100c5\ncall    sub_14017AB00                                                  ; +0x68, 0x1401100c8\nnop                                                                    ; +0x6d, 0x1401100cd\nmov     cs:qword_1406C2ED8, rax                                        ; +0x6e, 0x1401100ce\nmov     rdx, [rax]                                                     ; +0x75, 0x1401100d5\nmov     rcx, rax                                                       ; +0x78, 0x1401100d8\ncall    qword ptr [rdx+48h]                                            ; +0x7b, 0x1401100db\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x7e, 0x1401100de\nmovzx   r8d, byte ptr [rbx+320h]                                       ; +0x85, 0x1401100e5\nlea     rdx, a0004; \"0004\"                                             ; +0x8d, 0x1401100ed\nadd     rsp, 20h                                                       ; +0x94, 0x1401100f4\npop     rbx                                                            ; +0x98, 0x1401100f8\njmp     GameManager__setGameVariable                                   ; +0x99, 0x1401100f9", "xrefs": ["EditorUI::init @ 0x1400e1848", "EditorUI::keyDown @ 0x140125bfa", "EditorUI::init @ 0x1400dff13", "<???> @ 0x1406c8e8c"], "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"}