{"type": "func", "start": 4299636048, "end": 4299636524, "name": "EditorUI::toggleSpecialEditButtons", "pseudocode": "// \n// EditorUI::toggleSpecialEditButtons from 0x100473d50 to 0x100473f2c (476 bytes)\n// \n// 3 xrefs:\n// > EditorUI::activateTransformControl @ 0x10015f950\n// > EditorUI::toggleEnableRotate @ 0x100470f4c\n// > EditorUI::updateButtons @ 0x100472ec4\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 11:05:39 +0000\n// \n\n__int64 __fastcall EditorUI::toggleSpecialEditButtons(__int64 a1, char a2)\n{\n  unsigned __int64 v2; // x23\n  unsigned int v5; // w21\n  __int64 v6; // x0\n  __int64 *v7; // x25\n  char v8; // w21\n  __int64 v9; // x0\n  __int64 v10; // x26\n  unsigned int i; // w27\n  int v12; // w8\n  __int64 v13; // x24\n  void *v14; // x0\n  char *CString; // x0\n  __int64 v16; // x0\n  __int64 v17; // x24\n  _QWORD *v18; // x0\n  __int64 v19; // x0\n  void *__p[2]; // [xsp+8h] [xbp-68h] BYREF\n  char v22; // [xsp+1Fh] [xbp-51h]\n\n  if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 896)) )\n  {\n    if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 896)) )\n    {\n      v5 = 0;\n      do\n      {\n        v6 = sub_1002E75A0(*(_QWORD *)(a1 + 896), v5);\n        if ( (sub_1002FA54C(v6) & 1) == 0 )\n          goto LABEL_10;\n      }\n      while ( ++v5 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 896)) );\n    }\n    v7 = (__int64 *)(a1 + 816);\n    v8 = 1;\n  }\n  else\n  {\n    v9 = *(_QWORD *)(a1 + 1496);\n    if ( !v9 )\n    {\nLABEL_10:\n      v8 = 0;\n      v10 = 10921638;\n      v7 = (__int64 *)(a1 + 816);\n      goto LABEL_12;\n    }\n    v8 = sub_1002FA54C(v9);\n    v7 = (__int64 *)(a1 + 816);\n    if ( (v8 & 1) == 0 )\n    {\n      v10 = 10921638;\n      goto LABEL_12;\n    }\n  }\n  v10 = 0xFFFFFF;\nLABEL_12:\n  for ( i = -1; i != 3; ++i )\n  {\n    if ( i > 2 )\n      v12 = 43;\n    else\n      v12 = dword_10076F2A4[i];\n    v13 = *v7;\n    v14 = sub_1003065B0(\"%i\", v12);\n    CString = (char *)cocos2d::CCString::getCString((__int64)v14);\n    sub_100009900(__p, CString);\n    v16 = cocos2d::CCDictionary::objectForKey(v13, __p);\n    v17 = v16;\n    if ( (v22 & 0x80000000) == 0 )\n    {\n      if ( !v16 )\n        continue;\nLABEL_18:\n      v18 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v17 + 1072LL))(v17);\n      v2 = v2 & 0xFFFFFFFFFF000000LL | v10;\n      ButtonSprite::setColor(v18, v2);\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v17 + 1056LL))(v17, v8 & 1);\n      continue;\n    }\n    operator delete(__p[0]);\n    if ( v17 )\n      goto LABEL_18;\n  }\n  if ( (v8 & 1) != 0 )\n  {\n    v19 = GameManager::sharedState();\n    if ( GameManager::getGameVariable(v19, \"0007\")\n      && ((a2 & 1) != 0\n       || ((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 792) + 352LL))(*(_QWORD *)(a1 + 792)) & 1) == 0) )\n    {\n      EditorUI::activateRotationControl(a1);\n    }\n  }\n  else\n  {\n    EditorUI::deactivateRotationControl(a1);\n  }\n  return EditorUI::updateGridNodeSize(a1);\n}", "assembly": "; \n; EditorUI::toggleSpecialEditButtons from 0x100473d50 to 0x100473f2c (476 bytes)\n; \n; 3 xrefs:\n; > EditorUI::activateTransformControl @ 0x10015f950\n; > EditorUI::toggleEnableRotate @ 0x100470f4c\n; > EditorUI::updateButtons @ 0x100472ec4\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 11:05:39 +0000\n; \nSUB             SP, SP, #0x80                                          ; +0x0, 0x100473d50\nSTP             X28, X27, [SP,#0x70+var_50]                            ; +0x4, 0x100473d54\nSTP             X26, X25, [SP,#0x70+var_40]                            ; +0x8, 0x100473d58\nSTP             X24, X23, [SP,#0x70+var_30]                            ; +0xc, 0x100473d5c\nSTP             X22, X21, [SP,#0x70+var_20]                            ; +0x10, 0x100473d60\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0x14, 0x100473d64\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x18, 0x100473d68\nADD             X29, SP, #0x70                                         ; +0x1c, 0x100473d6c\nMOV             X20, X1                                                ; +0x20, 0x100473d70\nMOV             X19, X0                                                ; +0x24, 0x100473d74\nLDR             X0, [X0,#0x380]                                        ; +0x28, 0x100473d78\nBL              sub_1002E757C                                          ; +0x2c, 0x100473d7c\nCBZ             W0, loc_100473DC8                                      ; +0x30, 0x100473d80\nLDR             X0, [X19,#0x380]                                       ; +0x34, 0x100473d84\nBL              sub_1002E757C                                          ; +0x38, 0x100473d88\nCBZ             W0, loc_100473DBC                                      ; +0x3c, 0x100473d8c\nMOV             W21, #0                                                ; +0x40, 0x100473d90\nLDR             X0, [X19,#0x380]                                       ; +0x44, 0x100473d94\nMOV             X1, X21                                                ; +0x48, 0x100473d98\nBL              sub_1002E75A0                                          ; +0x4c, 0x100473d9c\nBL              sub_1002FA54C                                          ; +0x50, 0x100473da0\nTBZ             W0, #0, loc_100473DE8                                  ; +0x54, 0x100473da4\nADD             W21, W21, #1                                           ; +0x58, 0x100473da8\nLDR             X0, [X19,#0x380]                                       ; +0x5c, 0x100473dac\nBL              sub_1002E757C                                          ; +0x60, 0x100473db0\nCMP             W21, W0                                                ; +0x64, 0x100473db4\nB.CC            loc_100473D94                                          ; +0x68, 0x100473db8\nADD             X25, X19, #0x330                                       ; +0x6c, 0x100473dbc\nMOV             W21, #1                                                ; +0x70, 0x100473dc0\nB               loc_100473DE0                                          ; +0x74, 0x100473dc4\nLDR             X0, [X19,#0x5D8]                                       ; +0x78, 0x100473dc8\nCBZ             X0, loc_100473DE8                                      ; +0x7c, 0x100473dcc\nBL              sub_1002FA54C                                          ; +0x80, 0x100473dd0\nMOV             X21, X0                                                ; +0x84, 0x100473dd4\nADD             X25, X19, #0x330                                       ; +0x88, 0x100473dd8\nTBZ             W0, #0, loc_100473DFC                                  ; +0x8c, 0x100473ddc\nMOV             W26, #0xFFFFFF                                         ; +0x90, 0x100473de0\nB               loc_100473E04                                          ; +0x94, 0x100473de4\nMOV             W21, #0                                                ; +0x98, 0x100473de8\nMOV             W26, #0xA6A6A6                                         ; +0x9c, 0x100473dec\nADD             X25, X19, #0x330                                       ; +0xa4, 0x100473df4\nB               loc_100473E04                                          ; +0xa8, 0x100473df8\nMOV             W26, #0xA6A6A6                                         ; +0xac, 0x100473dfc\nMOV             W27, #0xFFFFFFFF                                       ; +0xb4, 0x100473e04\nADRL            X28, dword_10076F2A4                                   ; +0xb8, 0x100473e08\nADRL            X22, aI; \"%i\"                                          ; +0xc0, 0x100473e10\nCMP             W27, #2                                                ; +0xc8, 0x100473e18\nB.HI            loc_100473E28                                          ; +0xcc, 0x100473e1c\nLDR             W8, [X28,W27,UXTW#2]                                   ; +0xd0, 0x100473e20\nB               loc_100473E2C                                          ; +0xd4, 0x100473e24\nMOV             W8, #0x2B ; '+'                                        ; +0xd8, 0x100473e28\nLDR             X24, [X25]                                             ; +0xdc, 0x100473e2c\nSTR             X8, [SP,#0x70+var_70]                                  ; +0xe0, 0x100473e30\nMOV             X0, X22                                                ; +0xe4, 0x100473e34\nBL              sub_1003065B0                                          ; +0xe8, 0x100473e38\nBL              cocos2d__CCString__getCString                          ; +0xec, 0x100473e3c\nMOV             X1, X0; __s                                            ; +0xf0, 0x100473e40\nADD             X0, SP, #0x70+__p; int                                 ; +0xf4, 0x100473e44\nBL              sub_100009900                                          ; +0xf8, 0x100473e48\nADD             X1, SP, #0x70+__p                                      ; +0xfc, 0x100473e4c\nMOV             X0, X24                                                ; +0x100, 0x100473e50\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x104, 0x100473e54\nMOV             X24, X0                                                ; +0x108, 0x100473e58\nLDRSB           W8, [SP,#0x70+var_51]                                  ; +0x10c, 0x100473e5c\nTBNZ            W8, #0x1F, loc_100473EAC                               ; +0x110, 0x100473e60\nCBZ             X24, loc_100473E9C                                     ; +0x114, 0x100473e64\nLDR             X8, [X24]                                              ; +0x118, 0x100473e68\nLDR             X8, [X8,#0x430]                                        ; +0x11c, 0x100473e6c\nMOV             X0, X24                                                ; +0x120, 0x100473e70\nBLR             X8                                                     ; +0x124, 0x100473e74\nAND             X8, X23, #0xFFFFFFFFFF000000                           ; +0x128, 0x100473e78\nORR             X23, X8, X26                                           ; +0x12c, 0x100473e7c\nMOV             X1, X23                                                ; +0x130, 0x100473e80\nBL              ButtonSprite__setColor                                 ; +0x134, 0x100473e84\nLDR             X8, [X24]                                              ; +0x138, 0x100473e88\nLDR             X8, [X8,#0x420]                                        ; +0x13c, 0x100473e8c\nAND             W1, W21, #1                                            ; +0x140, 0x100473e90\nMOV             X0, X24                                                ; +0x144, 0x100473e94\nBLR             X8                                                     ; +0x148, 0x100473e98\nADD             W27, W27, #1                                           ; +0x14c, 0x100473e9c\nCMP             W27, #3                                                ; +0x150, 0x100473ea0\nB.NE            loc_100473E18                                          ; +0x154, 0x100473ea4\nB               loc_100473EBC                                          ; +0x158, 0x100473ea8\nLDR             X0, [SP,#0x70+__p]; __p                                ; +0x15c, 0x100473eac\nBL              __ZdlPv; operator delete(void *)                       ; +0x160, 0x100473eb0\nCBNZ            X24, loc_100473E68                                     ; +0x164, 0x100473eb4\nB               loc_100473E9C                                          ; +0x168, 0x100473eb8\nTBZ             W21, #0, loc_100473EFC                                 ; +0x16c, 0x100473ebc\nBL              GameManager__sharedState                               ; +0x170, 0x100473ec0\nADRL            X1, a0007; \"0007\"                                      ; +0x174, 0x100473ec4\nBL              GameManager__getGameVariable                           ; +0x17c, 0x100473ecc\nCBZ             W0, loc_100473F04                                      ; +0x180, 0x100473ed0\nTBNZ            W20, #0, loc_100473EEC                                 ; +0x184, 0x100473ed4\nLDR             X0, [X19,#0x318]                                       ; +0x188, 0x100473ed8\nLDR             X8, [X0]                                               ; +0x18c, 0x100473edc\nLDR             X8, [X8,#0x160]                                        ; +0x190, 0x100473ee0\nBLR             X8                                                     ; +0x194, 0x100473ee4\nTBNZ            W0, #0, loc_100473F04                                  ; +0x198, 0x100473ee8\nMOV             X0, X19                                                ; +0x19c, 0x100473eec\nMOV             X1, #0                                                 ; +0x1a0, 0x100473ef0\nBL              EditorUI__activateRotationControl                      ; +0x1a4, 0x100473ef4\nB               loc_100473F04                                          ; +0x1a8, 0x100473ef8\nMOV             X0, X19                                                ; +0x1ac, 0x100473efc\nBL              EditorUI__deactivateRotationControl                    ; +0x1b0, 0x100473f00\nMOV             X0, X19                                                ; +0x1b4, 0x100473f04\nBL              EditorUI__updateGridNodeSize                           ; +0x1b8, 0x100473f08\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x1bc, 0x100473f0c\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x1c0, 0x100473f10\nLDP             X22, X21, [SP,#0x70+var_20]                            ; +0x1c4, 0x100473f14\nLDP             X24, X23, [SP,#0x70+var_30]                            ; +0x1c8, 0x100473f18\nLDP             X26, X25, [SP,#0x70+var_40]                            ; +0x1cc, 0x100473f1c\nLDP             X28, X27, [SP,#0x70+var_50]                            ; +0x1d0, 0x100473f20\nADD             SP, SP, #0x80                                          ; +0x1d4, 0x100473f24\nRET                                                                    ; +0x1d8, 0x100473f28", "xrefs": ["EditorUI::activateTransformControl @ 0x10015f950", "EditorUI::toggleEnableRotate @ 0x100470f4c", "EditorUI::updateButtons @ 0x100472ec4"], "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"}