{"type": "func", "start": 4295016288, "end": 4295016588, "name": "EditorUI::toggleEnableRotate", "pseudocode": "// \n// EditorUI::toggleEnableRotate from 0x10000bf60 to 0x10000c08c (300 bytes)\n// \n// 3 xrefs:\n// > EditorUI::init @ 0x10000b5ed\n// > EditorUI::keyDown @ 0x100050d7d\n// > EditorUI::init @ 0x100009bbf\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::toggleEnableRotate(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v2; // rax\n  bool v3; // r15\n  GameManager *v4; // rax\n  ButtonSprite *v5; // rax\n  GJRotationControl *m_rotationControl; // r14\n  cocos2d::CCSprite *m_controlSprite; // rbx\n  cocos2d::CCSpriteFrameCache *v8; // rax\n  cocos2d::CCSpriteFrame *v9; // rax\n  GJRotationControlDelegate *m_delegate; // rdi\n\n  v2 = GameManager::sharedState();\n  v3 = !GameManager::getGameVariable(v2, \"0007\");\n  v4 = GameManager::sharedState();\n  GameManager::setGameVariable(v4, \"0007\", v3);\n  v5 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_rotateBtn->getNormalImage)(a1->m_rotateBtn);\n  if ( v3 )\n  {\n    ButtonSprite::updateBGImage(v5, \"GJ_button_02.png\");\n    EditorUI::toggleSpecialEditButtons(a1);\n  }\n  else\n  {\n    ButtonSprite::updateBGImage(v5, \"GJ_button_01.png\");\n    a1->m_rotationTouchID = -1;\n    if ( ((unsigned __int8 (__fastcall *)(GJRotationControl *))a1->m_rotationControl->isVisible)(a1->m_rotationControl) )\n    {\n      ((void (__fastcall *)(GJRotationControl *, _QWORD))a1->m_rotationControl->setVisible)(a1->m_rotationControl, 0);\n      m_rotationControl = a1->m_rotationControl;\n      if ( m_rotationControl->m_touchID != -1 )\n      {\n        m_rotationControl->m_touchID = -1;\n        m_controlSprite = m_rotationControl->m_controlSprite;\n        v8 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n        v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v8, \"GJ_rotationControlBtn01_001.png\");\n        ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_controlSprite->setDisplayFrame)(\n          m_controlSprite,\n          v9);\n        m_delegate = m_rotationControl->m_delegate;\n        if ( m_delegate )\n          ((void (__fastcall *)(GJRotationControlDelegate *))m_delegate->angleChangeEnded)(m_delegate);\n      }\n    }\n  }\n}", "assembly": "; \n; EditorUI::toggleEnableRotate from 0x10000bf60 to 0x10000c08c (300 bytes)\n; \n; 3 xrefs:\n; > EditorUI::init @ 0x10000b5ed\n; > EditorUI::keyDown @ 0x100050d7d\n; > EditorUI::init @ 0x100009bbf\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, 0x10000bf60\nmov     rbp, rsp                                                       ; +0x1, 0x10000bf61\npush    r15                                                            ; +0x4, 0x10000bf64\npush    r14                                                            ; +0x6, 0x10000bf66\npush    rbx                                                            ; +0x8, 0x10000bf68\npush    rax                                                            ; +0x9, 0x10000bf69\nmov     rbx, rdi                                                       ; +0xa, 0x10000bf6a\ncall    GameManager__sharedState                                       ; +0xd, 0x10000bf6d\nlea     r14, a0007; \"0007\"                                             ; +0x12, 0x10000bf72\nmov     rdi, rax                                                       ; +0x19, 0x10000bf79\nmov     rsi, r14                                                       ; +0x1c, 0x10000bf7c\ncall    GameManager__getGameVariable                                   ; +0x1f, 0x10000bf7f\nmov     r15d, eax                                                      ; +0x24, 0x10000bf84\nxor     r15b, 1                                                        ; +0x27, 0x10000bf87\ncall    GameManager__sharedState                                       ; +0x2b, 0x10000bf8b\nmovzx   r15d, r15b                                                     ; +0x30, 0x10000bf90\nmov     rdi, rax                                                       ; +0x34, 0x10000bf94\nmov     rsi, r14                                                       ; +0x37, 0x10000bf97\nmov     edx, r15d                                                      ; +0x3a, 0x10000bf9a\ncall    GameManager__setGameVariable                                   ; +0x3d, 0x10000bf9d\nmov     rdi, [rbx+378h]                                                ; +0x42, 0x10000bfa2\nmov     rax, [rdi]                                                     ; +0x49, 0x10000bfa9\ncall    qword ptr [rax+420h]                                           ; +0x4c, 0x10000bfac\ntest    r15b, r15b                                                     ; +0x52, 0x10000bfb2\njnz     loc_10000C060                                                  ; +0x55, 0x10000bfb5\nlea     rsi, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x5b, 0x10000bfbb\nmov     rdi, rax                                                       ; +0x62, 0x10000bfc2\ncall    ButtonSprite__updateBGImage                                    ; +0x65, 0x10000bfc5\nmov     dword ptr [rbx+288h], 0FFFFFFFFh                               ; +0x6a, 0x10000bfca\nmov     rdi, [rbx+2A0h]                                                ; +0x74, 0x10000bfd4\nmov     rax, [rdi]                                                     ; +0x7b, 0x10000bfdb\ncall    qword ptr [rax+150h]                                           ; +0x7e, 0x10000bfde\ntest    al, al                                                         ; +0x84, 0x10000bfe4\njz      loc_10000C081                                                  ; +0x86, 0x10000bfe6\nmov     rdi, [rbx+2A0h]                                                ; +0x8c, 0x10000bfec\nmov     rax, [rdi]                                                     ; +0x93, 0x10000bff3\nxor     esi, esi                                                       ; +0x96, 0x10000bff6\ncall    qword ptr [rax+148h]                                           ; +0x98, 0x10000bff8\nmov     r14, [rbx+2A0h]                                                ; +0x9e, 0x10000bffe\ncmp     dword ptr [r14+1B8h], 0FFFFFFFFh                               ; +0xa5, 0x10000c005\njz      short loc_10000C081                                            ; +0xad, 0x10000c00d\nmov     dword ptr [r14+1B8h], 0FFFFFFFFh                               ; +0xaf, 0x10000c00f\nmov     rbx, [r14+1A8h]                                                ; +0xba, 0x10000c01a\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0xc1, 0x10000c021\nlea     rsi, aGjRotationcont; \"GJ_rotationControlBtn01_001.png\"        ; +0xc6, 0x10000c026\nmov     rdi, rax                                                       ; +0xcd, 0x10000c02d\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0xd0, 0x10000c030\nmov     rcx, [rbx]                                                     ; +0xd5, 0x10000c035\nmov     rdi, rbx                                                       ; +0xd8, 0x10000c038\nmov     rsi, rax                                                       ; +0xdb, 0x10000c03b\ncall    qword ptr [rcx+478h]                                           ; +0xde, 0x10000c03e\nmov     rdi, [r14+1C0h]                                                ; +0xe4, 0x10000c044\ntest    rdi, rdi                                                       ; +0xeb, 0x10000c04b\njz      short loc_10000C081                                            ; +0xee, 0x10000c04e\nmov     rax, [rdi]                                                     ; +0xf0, 0x10000c050\nadd     rsp, 8                                                         ; +0xf3, 0x10000c053\npop     rbx                                                            ; +0xf7, 0x10000c057\npop     r14                                                            ; +0xf8, 0x10000c058\npop     r15                                                            ; +0xfa, 0x10000c05a\npop     rbp                                                            ; +0xfc, 0x10000c05c\njmp     qword ptr [rax+10h]                                            ; +0xfd, 0x10000c05d\nlea     rsi, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x100, 0x10000c060\nmov     rdi, rax                                                       ; +0x107, 0x10000c067\ncall    ButtonSprite__updateBGImage                                    ; +0x10a, 0x10000c06a\nmov     rdi, rbx                                                       ; +0x10f, 0x10000c06f\nadd     rsp, 8                                                         ; +0x112, 0x10000c072\npop     rbx                                                            ; +0x116, 0x10000c076\npop     r14                                                            ; +0x117, 0x10000c077\npop     r15                                                            ; +0x119, 0x10000c079\npop     rbp                                                            ; +0x11b, 0x10000c07b\njmp     EditorUI__toggleSpecialEditButtons                             ; +0x11c, 0x10000c07c\nadd     rsp, 8                                                         ; +0x121, 0x10000c081\npop     rbx                                                            ; +0x125, 0x10000c085\npop     r14                                                            ; +0x126, 0x10000c086\npop     r15                                                            ; +0x128, 0x10000c088\npop     rbp                                                            ; +0x12a, 0x10000c08a\nretn                                                                   ; +0x12b, 0x10000c08b", "xrefs": ["EditorUI::init @ 0x10000b5ed", "EditorUI::keyDown @ 0x100050d7d", "EditorUI::init @ 0x100009bbf"], "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"}