{"type": "func", "start": 5369823712, "end": 5369824016, "name": "EditorUI::toggleEnableRotate", "pseudocode": "// \n// EditorUI::toggleEnableRotate from 0x1401101e0 to 0x140110310 (304 bytes)\n// \n// 4 xrefs:\n// > EditorUI::init @ 0x1400e185c\n// > EditorUI::keyDown @ 0x140125be2\n// > EditorUI::init @ 0x1400dff9b\n// > <???> @ 0x1406c8ea4\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\n// Hidden C++ exception states: #wind=2\nvoid EditorUI::toggleEnableRotate(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  bool v4; // di\n  GameManager *v5; // rcx\n  ButtonSprite *v6; // rcx\n  void *v7; // [rsp+30h] [rbp+8h]\n  void *v8; // [rsp+30h] [rbp+8h]\n\n  v3 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v7 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = (GameManager *)qword_1406C2ED8;\n  }\n  v4 = !GameManager::getGameVariable(v3, \"0007\");\n  v5 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v8 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v5, \"0007\", v4);\n  v6 = (ButtonSprite *)a1->m_rotateBtn->getNormalImage(a1->m_rotateBtn);\n  if ( v4 )\n  {\n    ButtonSprite::updateBGImage(v6, \"GJ_button_02.png\");\n    EditorUI::toggleSpecialEditButtons(a1);\n  }\n  else\n  {\n    ButtonSprite::updateBGImage(v6, \"GJ_button_01.png\");\n    a1->m_rotationTouchID = -1;\n    if ( a1->m_rotationControl->isVisible(a1->m_rotationControl) )\n    {\n      a1->m_rotationControl->setVisible(a1->m_rotationControl, 0);\n      GJRotationControl::finishTouch(a1->m_rotationControl);\n    }\n  }\n}", "assembly": "; \n; EditorUI::toggleEnableRotate from 0x1401101e0 to 0x140110310 (304 bytes)\n; \n; 4 xrefs:\n; > EditorUI::init @ 0x1400e185c\n; > EditorUI::keyDown @ 0x140125be2\n; > EditorUI::init @ 0x1400dff9b\n; > <???> @ 0x1406c8ea4\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401101e0\npush    rdi                                                            ; +0x5, 0x1401101e5\nsub     rsp, 20h                                                       ; +0x6, 0x1401101e6\nmov     rbx, rcx                                                       ; +0xa, 0x1401101ea\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xd, 0x1401101ed\ntest    rcx, rcx                                                       ; +0x14, 0x1401101f4\njnz     short loc_140110228                                            ; +0x17, 0x1401101f7\nmov     ecx, 668h; Size                                                ; +0x19, 0x1401101f9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x1401101fe\nmov     [rsp+28h+arg_0], rax                                           ; +0x23, 0x140110203\nmov     rcx, rax                                                       ; +0x28, 0x140110208\ncall    sub_14017AB00                                                  ; +0x2b, 0x14011020b\nnop                                                                    ; +0x30, 0x140110210\nmov     cs:qword_1406C2ED8, rax                                        ; +0x31, 0x140110211\nmov     rdx, [rax]                                                     ; +0x38, 0x140110218\nmov     rcx, rax                                                       ; +0x3b, 0x14011021b\ncall    qword ptr [rdx+48h]                                            ; +0x3e, 0x14011021e\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x41, 0x140110221\nlea     rdx, a0007; \"0007\"                                             ; +0x48, 0x140110228\ncall    GameManager__getGameVariable                                   ; +0x4f, 0x14011022f\nmovzx   edi, al                                                        ; +0x54, 0x140110234\nxor     dil, 1                                                         ; +0x57, 0x140110237\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5b, 0x14011023b\ntest    rcx, rcx                                                       ; +0x62, 0x140110242\njnz     short loc_140110277                                            ; +0x65, 0x140110245\nmov     ecx, 668h; Size                                                ; +0x67, 0x140110247\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x6c, 0x14011024c\nmov     [rsp+28h+arg_0], rax                                           ; +0x71, 0x140110251\nmov     rcx, rax                                                       ; +0x76, 0x140110256\ncall    sub_14017AB00                                                  ; +0x79, 0x140110259\nnop                                                                    ; +0x7e, 0x14011025e\nmov     cs:qword_1406C2ED8, rax                                        ; +0x7f, 0x14011025f\nmov     r8, [rax]                                                      ; +0x86, 0x140110266\nmov     rcx, rax                                                       ; +0x89, 0x140110269\ncall    qword ptr [r8+48h]                                             ; +0x8c, 0x14011026c\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x90, 0x140110270\nmovzx   r8d, dil                                                       ; +0x97, 0x140110277\nlea     rdx, a0007; \"0007\"                                             ; +0x9b, 0x14011027b\ncall    GameManager__setGameVariable                                   ; +0xa2, 0x140110282\nmov     rcx, [rbx+390h]                                                ; +0xa7, 0x140110287\nmov     rax, [rcx]                                                     ; +0xae, 0x14011028e\ncall    qword ptr [rax+3A8h]                                           ; +0xb1, 0x140110291\nmov     rcx, rax                                                       ; +0xb7, 0x140110297\ntest    dil, dil                                                       ; +0xba, 0x14011029a\njnz     short loc_1401102F1                                            ; +0xbd, 0x14011029d\nlea     rdx, aGjButton01Png; \"GJ_button_01.png\"                        ; +0xbf, 0x14011029f\ncall    ButtonSprite__updateBGImage                                    ; +0xc6, 0x1401102a6\nmov     dword ptr [rbx+2A0h], 0FFFFFFFFh                               ; +0xcb, 0x1401102ab\nmov     rcx, [rbx+2B8h]                                                ; +0xd5, 0x1401102b5\nmov     rax, [rcx]                                                     ; +0xdc, 0x1401102bc\ncall    qword ptr [rax+148h]                                           ; +0xdf, 0x1401102bf\ntest    al, al                                                         ; +0xe5, 0x1401102c5\njz      short loc_140110305                                            ; +0xe7, 0x1401102c7\nmov     rcx, [rbx+2B8h]                                                ; +0xe9, 0x1401102c9\nmov     rax, [rcx]                                                     ; +0xf0, 0x1401102d0\nxor     edx, edx                                                       ; +0xf3, 0x1401102d3\ncall    qword ptr [rax+140h]                                           ; +0xf5, 0x1401102d5\nmov     rcx, [rbx+2B8h]                                                ; +0xfb, 0x1401102db\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x102, 0x1401102e2\nadd     rsp, 20h                                                       ; +0x107, 0x1401102e7\npop     rdi                                                            ; +0x10b, 0x1401102eb\njmp     GJRotationControl__finishTouch                                 ; +0x10c, 0x1401102ec\nlea     rdx, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x111, 0x1401102f1\ncall    ButtonSprite__updateBGImage                                    ; +0x118, 0x1401102f8\nmov     rcx, rbx                                                       ; +0x11d, 0x1401102fd\ncall    EditorUI__toggleSpecialEditButtons                             ; +0x120, 0x140110300\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x125, 0x140110305\nadd     rsp, 20h                                                       ; +0x12a, 0x14011030a\npop     rdi                                                            ; +0x12e, 0x14011030e\nretn                                                                   ; +0x12f, 0x14011030f", "xrefs": ["EditorUI::init @ 0x1400e185c", "EditorUI::keyDown @ 0x140125be2", "EditorUI::init @ 0x1400dff9b", "<???> @ 0x1406c8ea4"], "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"}