{"type": "func", "start": 8158828, "end": 8159360, "name": "EditorUI::toggleSpecialEditButtons", "pseudocode": "// \n// EditorUI::toggleSpecialEditButtons from 0x7c7e6c to 0x7c8080 (532 bytes)\n// \n// 4 xrefs:\n// > EditorUI::updateButtons @ 0x7c80b0\n// > EditorUI::toggleEnableRotate @ 0x7c8ab0\n// > EditorUI::activateTransformControl @ 0xc02a30\n// > <???> @ 0xc3490\n// \n// This function is hookable on this platform (idp: arm, 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:54:09 +0000\n// \n\n__int64 __fastcall EditorUI::toggleSpecialEditButtons(cocos2d::CCArray **this, unsigned __int8 a2)\n{\n  int v2; // w27\n  unsigned int i; // w19\n  GameObject *v5; // x0\n  unsigned int v6; // w22\n  GameObject *v7; // x0\n  __int64 v8; // x25\n  const char *j; // x1\n  __int64 v10; // x21\n  cocos2d::CCString *v11; // x0\n  const char *CString; // x0\n  size_t v13; // x0\n  __int64 v14; // x21\n  GameManager *v15; // x0\n  _QWORD *v16; // x0\n  __int64 *v17; // x1\n  GameManager *v19; // x0\n  char *v20; // [xsp+68h] [xbp+68h]\n  __int64 v21[2]; // [xsp+70h] [xbp+70h] BYREF\n  void *v22; // [xsp+80h] [xbp+80h]\n\n  v2 = a2;\n  if ( (unsigned int)cocos2d::CCArray::count(*(this + 112)) )\n  {\n    for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(*(this + 112)); ++i )\n    {\n      v5 = (GameObject *)cocos2d::CCArray::objectAtIndex(*(this + 112), i);\n      if ( !(unsigned __int8)GameObject::canRotateFree(v5) )\n        goto LABEL_9;\n    }\n  }\n  else\n  {\n    v7 = *(this + 187);\n    if ( !v7 || !(unsigned __int8)GameObject::canRotateFree(v7) )\n    {\nLABEL_9:\n      v6 = 0;\n      goto LABEL_10;\n    }\n  }\n  v6 = 1;\nLABEL_10:\n  v8 = 0;\n  for ( j = (char *)&qword_28 + 3; ; j = (const char *)*((unsigned int *)&unk_1142280 + v8++) )\n  {\n    v10 = (__int64)*(this + 102);\n    v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", j);\n    CString = (const char *)cocos2d::CCString::getCString(v11);\n    v21[0] = 0;\n    v21[1] = 0;\n    v22 = nullptr;\n    v20 = (char *)CString;\n    v13 = strlen(CString);\n    std::string::__init(v21, v20, v13);\n    v14 = cocos2d::CCDictionary::objectForKey(v10, v21);\n    v15 = (GameManager *)LOBYTE(v21[0]);\n    if ( (v21[0] & 1) != 0 )\n      operator delete(v22);\n    if ( v14 )\n    {\n      v16 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 1072LL))(v14);\n      v17 = &qword_1142200;\n      if ( !v6 )\n        v17 = &qword_1142270;\n      ButtonSprite::setColor(v16, *v17);\n      v15 = (GameManager *)(*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 1056LL))(v14, v6);\n    }\n    if ( v8 == 3 )\n      break;\n  }\n  if ( v6 )\n  {\n    v19 = (GameManager *)GameManager::sharedState(v15);\n    if ( (unsigned __int8)GameManager::getGameVariable(v19, \"0007\")\n      && (v2 || !(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 99) + 352LL))(*(this + 99))) )\n    {\n      EditorUI::activateRotationControl((EditorUI *)this, nullptr);\n    }\n  }\n  else\n  {\n    EditorUI::deactivateRotationControl((EditorUI *)this);\n  }\n  EditorUI::updateGridNodeSize(this);\n  return _stack_chk_guard;\n}", "assembly": "; \n; EditorUI::toggleSpecialEditButtons from 0x7c7e6c to 0x7c8080 (532 bytes)\n; \n; 4 xrefs:\n; > EditorUI::updateButtons @ 0x7c80b0\n; > EditorUI::toggleEnableRotate @ 0x7c8ab0\n; > EditorUI::activateTransformControl @ 0xc02a30\n; > <???> @ 0xc3490\n; \n; This function is hookable on this platform (idp: arm, 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:54:09 +0000\n; \nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x7c7e6c\nMOV             X29, SP                                                ; +0x4, 0x7c7e70\nSTP             X25, X26, [SP,#0x90+var_50]                            ; +0x8, 0x7c7e74\nADRP            X26, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x7c7e78\nSTP             X27, X28, [SP,#0x90+var_40]                            ; +0x10, 0x7c7e7c\nUXTB            W27, W1                                                ; +0x14, 0x7c7e80\nLDR             X1, [X26,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x7c7e84\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0x1c, 0x7c7e88\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x20, 0x7c7e8c\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x24, 0x7c7e90\nMOV             X20, X0                                                ; +0x28, 0x7c7e94\nLDR             X1, [X1]                                               ; +0x2c, 0x7c7e98\nLDR             X0, [X0,#0x380]; this                                  ; +0x30, 0x7c7e9c\nSTR             X1, [X29,#0x90+var_8]                                  ; +0x34, 0x7c7ea0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x38, 0x7c7ea4\nCBZ             W0, loc_7C7EE8                                         ; +0x3c, 0x7c7ea8\nMOV             W19, #0                                                ; +0x40, 0x7c7eac\nB               loc_7C7ED0                                             ; +0x44, 0x7c7eb0\nLDR             X0, [X20,#0x380]; this                                 ; +0x48, 0x7c7eb4\nMOV             W1, W19; unsigned int                                  ; +0x4c, 0x7c7eb8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x50, 0x7c7ebc\nBL              _ZN10GameObject13canRotateFreeEv; GameObject::canRotateFree(void) ; +0x54, 0x7c7ec0\nUXTB            W0, W0                                                 ; +0x58, 0x7c7ec4\nCBZ             W0, loc_7C7EFC                                         ; +0x5c, 0x7c7ec8\nADD             W19, W19, #1                                           ; +0x60, 0x7c7ecc\nLDR             X0, [X20,#0x380]; this                                 ; +0x64, 0x7c7ed0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x68, 0x7c7ed4\nCMP             W19, W0                                                ; +0x6c, 0x7c7ed8\nB.CC            loc_7C7EB4                                             ; +0x70, 0x7c7edc\nMOV             W22, #1                                                ; +0x74, 0x7c7ee0\nB               loc_7C7F00                                             ; +0x78, 0x7c7ee4\nLDR             X0, [X20,#0x5D8]; this                                 ; +0x7c, 0x7c7ee8\nCBZ             X0, loc_7C7EFC                                         ; +0x80, 0x7c7eec\nBL              _ZN10GameObject13canRotateFreeEv; GameObject::canRotateFree(void) ; +0x84, 0x7c7ef0\nUXTB            W0, W0                                                 ; +0x88, 0x7c7ef4\nCBNZ            W0, loc_7C7EE0                                         ; +0x8c, 0x7c7ef8\nMOV             W22, #0                                                ; +0x90, 0x7c7efc\nADRP            X23, #(aSongidI+8)@PAGE; \"%i\"                          ; +0x94, 0x7c7f00\nADRP            X24, #word_1142210@PAGE                                ; +0x98, 0x7c7f04\nMOV             X25, #0                                                ; +0x9c, 0x7c7f08\nMOV             W1, #(qword_28+3); char *                              ; +0xa0, 0x7c7f0c\nADD             X19, X29, #0x90+var_20                                 ; +0xa4, 0x7c7f10\nADD             X23, X23, #(aSongidI+8)@PAGEOFF; \"%i\"                  ; +0xa8, 0x7c7f14\nADRP            X28, #qword_1142200@PAGE                               ; +0xac, 0x7c7f18\nADD             X24, X24, #word_1142210@PAGEOFF                        ; +0xb0, 0x7c7f1c\nMOV             X0, X23; this                                          ; +0xb4, 0x7c7f20\nLDR             X21, [X20,#0x330]                                      ; +0xb8, 0x7c7f24\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xbc, 0x7c7f28\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xc0, 0x7c7f2c\nSTR             XZR, [X19]                                             ; +0xc4, 0x7c7f30\nSTR             XZR, [X19,#8]                                          ; +0xc8, 0x7c7f34\nSTR             XZR, [X19,#0x10]                                       ; +0xcc, 0x7c7f38\nSTR             X0, [X29,#0x90+var_28]                                 ; +0xd0, 0x7c7f3c\nBL              .strlen                                                ; +0xd4, 0x7c7f40\nMOV             X2, X0                                                 ; +0xd8, 0x7c7f44\nLDR             X1, [X29,#0x90+var_28]                                 ; +0xdc, 0x7c7f48\nMOV             X0, X19                                                ; +0xe0, 0x7c7f4c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0xe4, 0x7c7f50\nMOV             X0, X21                                                ; +0xe8, 0x7c7f54\nMOV             X1, X19                                                ; +0xec, 0x7c7f58\nBL              _ZN7cocos2d12CCDictionary12objectForKeyERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE; cocos2d::CCDictionary::objectForKey(std::string const&) ; +0xf0, 0x7c7f5c\nMOV             X21, X0                                                ; +0xf4, 0x7c7f60\nLDRB            W0, [X19]                                              ; +0xf8, 0x7c7f64\nTBNZ            W0, #0, loc_7C7FC4                                     ; +0xfc, 0x7c7f68\nCBZ             X21, loc_7C7FAC                                        ; +0x100, 0x7c7f6c\nLDR             X1, [X21]                                              ; +0x104, 0x7c7f70\nMOV             X0, X21                                                ; +0x108, 0x7c7f74\nLDR             X1, [X1,#0x430]                                        ; +0x10c, 0x7c7f78\nBLR             X1                                                     ; +0x110, 0x7c7f7c\nADD             X2, X24, #0x60 ; '`'                                   ; +0x114, 0x7c7f80\nCMP             W22, WZR                                               ; +0x118, 0x7c7f84\nADD             X1, X28, #qword_1142200@PAGEOFF                        ; +0x11c, 0x7c7f88\nCSEL            X1, X1, X2, NE                                         ; +0x120, 0x7c7f8c\nLDR             X1, [X1]                                               ; +0x124, 0x7c7f90\nBL              _ZN12ButtonSprite8setColorEN7cocos2d10_ccColor3BE; ButtonSprite::setColor(cocos2d::_ccColor3B) ; +0x128, 0x7c7f94\nLDR             X2, [X21]                                              ; +0x12c, 0x7c7f98\nMOV             X0, X21                                                ; +0x130, 0x7c7f9c\nMOV             W1, W22                                                ; +0x134, 0x7c7fa0\nLDR             X2, [X2,#0x420]                                        ; +0x138, 0x7c7fa4\nBLR             X2                                                     ; +0x13c, 0x7c7fa8\nCMP             X25, #3                                                ; +0x140, 0x7c7fac\nB.EQ            loc_7C7FD0                                             ; +0x144, 0x7c7fb0\nADD             X0, X24, #0x70 ; 'p'                                   ; +0x148, 0x7c7fb4\nLDR             W1, [X0,X25,LSL#2]                                     ; +0x14c, 0x7c7fb8\nADD             X25, X25, #1                                           ; +0x150, 0x7c7fbc\nB               loc_7C7F20                                             ; +0x154, 0x7c7fc0\nLDR             X0, [X19,#0x10]; void *                                ; +0x158, 0x7c7fc4\nBL              _ZdlPv; operator delete(void *)                        ; +0x15c, 0x7c7fc8\nB               loc_7C7F6C                                             ; +0x160, 0x7c7fcc\nCBNZ            W22, loc_7C8014                                        ; +0x164, 0x7c7fd0\nMOV             X0, X20; this                                          ; +0x168, 0x7c7fd4\nBL              _ZN8EditorUI25deactivateRotationControlEv; EditorUI::deactivateRotationControl(void) ; +0x16c, 0x7c7fd8\nMOV             X0, X20; this                                          ; +0x170, 0x7c7fdc\nBL              _ZN8EditorUI18updateGridNodeSizeEv; EditorUI::updateGridNodeSize(void) ; +0x174, 0x7c7fe0\nLDR             X26, [X26,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x178, 0x7c7fe4\nLDR             X19, [X29,#0x90+var_8]                                 ; +0x17c, 0x7c7fe8\nLDR             X0, [X26]                                              ; +0x180, 0x7c7fec\nCMP             X19, X0                                                ; +0x184, 0x7c7ff0\nB.NE            loc_7C8060                                             ; +0x188, 0x7c7ff4\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0x18c, 0x7c7ff8\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0x190, 0x7c7ffc\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0x194, 0x7c8000\nLDP             X25, X26, [SP,#0x90+var_50]                            ; +0x198, 0x7c8004\nLDP             X27, X28, [SP,#0x90+var_40]                            ; +0x19c, 0x7c8008\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x1a0, 0x7c800c\nRET                                                                    ; +0x1a4, 0x7c8010\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1a8, 0x7c8014\nADRL            X1, a0007; \"0007\"                                      ; +0x1ac, 0x7c8018\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x1b4, 0x7c8020\nUXTB            W0, W0                                                 ; +0x1b8, 0x7c8024\nCBZ             W0, loc_7C7FDC                                         ; +0x1bc, 0x7c8028\nCBZ             W27, loc_7C8040                                        ; +0x1c0, 0x7c802c\nMOV             X0, X20; this                                          ; +0x1c4, 0x7c8030\nMOV             X1, #0; cocos2d::CCObject *                            ; +0x1c8, 0x7c8034\nBL              _ZN8EditorUI23activateRotationControlEPN7cocos2d8CCObjectE; EditorUI::activateRotationControl(cocos2d::CCObject *) ; +0x1cc, 0x7c8038\nB               loc_7C7FDC                                             ; +0x1d0, 0x7c803c\nLDR             X1, [X20,#0x318]                                       ; +0x1d4, 0x7c8040\nMOV             X0, X1                                                 ; +0x1d8, 0x7c8044\nLDR             X1, [X1]                                               ; +0x1dc, 0x7c8048\nLDR             X1, [X1,#0x160]                                        ; +0x1e0, 0x7c804c\nBLR             X1                                                     ; +0x1e4, 0x7c8050\nUXTB            W0, W0                                                 ; +0x1e8, 0x7c8054\nCBZ             W0, loc_7C8030                                         ; +0x1ec, 0x7c8058\nB               loc_7C7FDC                                             ; +0x1f0, 0x7c805c\nBL              .__stack_chk_fail                                      ; +0x1f4, 0x7c8060\nLDRB            W1, [X29,#0x90+var_20]                                 ; +0x1f8, 0x7c8064\nMOV             X19, X0                                                ; +0x1fc, 0x7c8068\nTBZ             W1, #0, loc_7C8078                                     ; +0x200, 0x7c806c\nLDR             X0, [X29,#0x90+var_10]; void *                         ; +0x204, 0x7c8070\nBL              _ZdlPv; operator delete(void *)                        ; +0x208, 0x7c8074\nMOV             X0, X19                                                ; +0x20c, 0x7c8078\nBL              _Unwind_Resume                                         ; +0x210, 0x7c807c", "xrefs": ["EditorUI::updateButtons @ 0x7c80b0", "EditorUI::toggleEnableRotate @ 0x7c8ab0", "EditorUI::activateTransformControl @ 0xc02a30", "<???> @ 0xc3490"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}