{"type": "func", "start": 6865352, "end": 6865984, "name": "EditorUI::editButton2Usable", "pseudocode": "// \n// EditorUI::editButton2Usable from 0x68c1c8 to 0x68c440 (632 bytes)\n// \n// 2 xrefs:\n// > EditorUI::toggleEditObjectButton @ 0x68ce60\n// > <???> @ 0xb96a0\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\nbool EditorUI::editButton2Usable(EditorUI *a1)\n{\n  GameObject *m_selectedObject; // x1\n  cocos2d::CCArray *m_selectedObjects; // x2\n  bool result; // w0\n  GameObject *v5; // x1\n  GameObject *v6; // x0\n  int m_objectID; // w1\n  unsigned int i; // w21\n  __int64 v9; // x0\n  unsigned int j; // w21\n  __int64 v11; // x0\n  __int64 v12; // [xsp+3Ch] [xbp+3Ch] BYREF\n  int v13; // [xsp+44h] [xbp+44h] BYREF\n\n  m_selectedObject = a1->m_selectedObject;\n  m_selectedObjects = a1->m_selectedObjects;\n  v12 = -1;\n  v13 = -1;\n  EditorUI::getGroupInfo(a1, m_selectedObject, m_selectedObjects, (int *)&v12, (int *)&v12 + 1, &v13);\n  if ( v12 == -1 )\n    return 0;\n  if ( HIDWORD(v12) != 5 )\n  {\n    result = EditorUI::arrayContainsClass(a1, a1->m_selectedObjects, 5);\n    if ( !result && v13 != 30 )\n    {\n      if ( (int)v12 <= 2905 )\n      {\n        if ( (int)v12 >= 2903 || (_DWORD)v12 == 1704 )\n          return 1;\n        if ( (int)v12 <= 1704 )\n        {\n          if ( (_DWORD)v12 == 1594 || (_DWORD)v12 == 1615 )\n            return 1;\n        }\n        else if ( (_DWORD)v12 == 2063 || (_DWORD)v12 == 2065 || (_DWORD)v12 == 1751 )\n        {\n          return 1;\n        }\n      }\n      else if ( (int)v12 <= 2917 )\n      {\n        if ( (int)v12 >= 2909 || (_DWORD)v12 == 2907 )\n          return 1;\n      }\n      else if ( (int)v12 >= 2919 )\n      {\n        if ( (int)v12 <= 2924 )\n          return 1;\n        if ( (_DWORD)v12 == 3643 )\n          return result;\n      }\n      v5 = a1->m_selectedObject;\n      if ( v5 )\n      {\n        if ( v5->getType(a1->m_selectedObject) == Collectible )\n          return 1;\n        v6 = a1->m_selectedObject;\n        m_objectID = v6->m_objectID;\n        if ( m_objectID == 2065\n          || m_objectID == 1615\n          || v6->getHasRotateAction(v6)\n          || a1->m_selectedObject->getHasSyncedAnimation(a1->m_selectedObject)\n          || a1->m_selectedObject->canAllowMultiActivate(a1->m_selectedObject) )\n        {\n          return 1;\n        }\n        v5 = a1->m_selectedObject;\n      }\n      if ( !EditorUI::canAllowMultiActivate(a1, v5, a1->m_selectedObjects) )\n      {\n        if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) )\n        {\n          for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects); ++i )\n          {\n            v9 = cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, i);\n            if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1712LL))(v9) )\n              goto LABEL_40;\n          }\n          return 1;\n        }\nLABEL_40:\n        if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) )\n        {\n          for ( j = 0; j < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects); ++j )\n          {\n            v11 = cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, j);\n            if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v11 + 1720LL))(v11) )\n              return 0;\n          }\n          return 1;\n        }\n        return 0;\n      }\n    }\n  }\n  return 1;\n}", "assembly": "; \n; EditorUI::editButton2Usable from 0x68c1c8 to 0x68c440 (632 bytes)\n; \n; 2 xrefs:\n; > EditorUI::toggleEditObjectButton @ 0x68ce60\n; > <???> @ 0xb96a0\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x68c1c8\nMOV             W6, #0xFFFFFFFF                                        ; +0x4, 0x68c1cc\nMOV             X29, SP                                                ; +0x8, 0x68c1d0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x68c1d4\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x68c1d8\nLDR             X1, [X0,#0x530]; GameObject *                          ; +0x14, 0x68c1dc\nLDR             X2, [X0,#0x338]; cocos2d::CCArray *                    ; +0x18, 0x68c1e0\nADD             X3, X29, #0x50+var_14; int *                           ; +0x1c, 0x68c1e4\nADD             X4, X29, #0x50+var_14+4; int *                         ; +0x20, 0x68c1e8\nADD             X5, X29, #0x50+var_C; int *                            ; +0x24, 0x68c1ec\nLDR             X7, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x68c1f0\nMOV             X19, X0                                                ; +0x2c, 0x68c1f4\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x30, 0x68c1f8\nSTR             W6, [X29,#0x50+var_14]                                 ; +0x34, 0x68c1fc\nLDR             X7, [X7]                                               ; +0x38, 0x68c200\nSTR             X7, [X29,#0x50+var_8]                                  ; +0x3c, 0x68c204\nSTR             W6, [X29,#0x50+var_14+4]                               ; +0x40, 0x68c208\nSTR             W6, [X29,#0x50+var_C]                                  ; +0x44, 0x68c20c\nBL              _ZN8EditorUI12getGroupInfoEP10GameObjectPN7cocos2d7CCArrayERiS5_S5_; EditorUI::getGroupInfo(GameObject *,cocos2d::CCArray *,int &,int &,int &) ; +0x48, 0x68c210\nLDR             W0, [X29,#0x50+var_14]                                 ; +0x4c, 0x68c214\nCMN             W0, #1                                                 ; +0x50, 0x68c218\nLDR             W0, [X29,#0x50+var_14+4]                               ; +0x54, 0x68c21c\nB.EQ            loc_68C388                                             ; +0x58, 0x68c220\nCMP             W0, #5                                                 ; +0x5c, 0x68c224\nB.EQ            loc_68C360                                             ; +0x60, 0x68c228\nLDR             X1, [X19,#0x338]; cocos2d::CCArray *                   ; +0x64, 0x68c22c\nMOV             X0, X19; this                                          ; +0x68, 0x68c230\nMOV             W2, #5; int                                            ; +0x6c, 0x68c234\nBL              _ZN8EditorUI18arrayContainsClassEPN7cocos2d7CCArrayEi; EditorUI::arrayContainsClass(cocos2d::CCArray *,int) ; +0x70, 0x68c238\nUXTB            W0, W0                                                 ; +0x74, 0x68c23c\nCBNZ            W0, loc_68C360                                         ; +0x78, 0x68c240\nLDR             W1, [X29,#0x50+var_C]                                  ; +0x7c, 0x68c244\nCMP             W1, #0x1E                                              ; +0x80, 0x68c248\nB.EQ            loc_68C360                                             ; +0x84, 0x68c24c\nLDR             W1, [X29,#0x50+var_14]                                 ; +0x88, 0x68c250\nCMP             W1, #0xB59                                             ; +0x8c, 0x68c254\nB.LE            loc_68C398                                             ; +0x90, 0x68c258\nCMP             W1, #0xB65                                             ; +0x94, 0x68c25c\nB.LE            loc_68C3DC                                             ; +0x98, 0x68c260\nCMP             W1, #0xB67                                             ; +0x9c, 0x68c264\nB.LT            loc_68C27C                                             ; +0xa0, 0x68c268\nCMP             W1, #0xB6C                                             ; +0xa4, 0x68c26c\nB.LE            loc_68C360                                             ; +0xa8, 0x68c270\nCMP             W1, #0xE3B                                             ; +0xac, 0x68c274\nB.EQ            loc_68C364                                             ; +0xb0, 0x68c278\nLDR             X1, [X19,#0x530]                                       ; +0xb4, 0x68c27c\nCBZ             X1, loc_68C304                                         ; +0xb8, 0x68c280\nLDR             X2, [X1]                                               ; +0xbc, 0x68c284\nMOV             X0, X1                                                 ; +0xc0, 0x68c288\nLDR             X1, [X2,#0x6F8]                                        ; +0xc4, 0x68c28c\nBLR             X1                                                     ; +0xc8, 0x68c290\nCMP             W0, #0x1E                                              ; +0xcc, 0x68c294\nB.EQ            loc_68C360                                             ; +0xd0, 0x68c298\nLDR             X0, [X19,#0x530]                                       ; +0xd4, 0x68c29c\nLDR             W1, [X0,#0x3F4]                                        ; +0xd8, 0x68c2a0\nCMP             W1, #0x811                                             ; +0xdc, 0x68c2a4\nB.EQ            loc_68C360                                             ; +0xe0, 0x68c2a8\nCMP             W1, #0x64F                                             ; +0xe4, 0x68c2ac\nB.EQ            loc_68C360                                             ; +0xe8, 0x68c2b0\nLDR             X1, [X0]                                               ; +0xec, 0x68c2b4\nLDR             X1, [X1,#0x6B8]                                        ; +0xf0, 0x68c2b8\nBLR             X1                                                     ; +0xf4, 0x68c2bc\nUXTB            W0, W0                                                 ; +0xf8, 0x68c2c0\nCBNZ            W0, loc_68C360                                         ; +0xfc, 0x68c2c4\nLDR             X1, [X19,#0x530]                                       ; +0x100, 0x68c2c8\nMOV             X0, X1                                                 ; +0x104, 0x68c2cc\nLDR             X1, [X1]                                               ; +0x108, 0x68c2d0\nLDR             X1, [X1,#0x6B0]                                        ; +0x10c, 0x68c2d4\nBLR             X1                                                     ; +0x110, 0x68c2d8\nUXTB            W0, W0                                                 ; +0x114, 0x68c2dc\nCBNZ            W0, loc_68C360                                         ; +0x118, 0x68c2e0\nLDR             X1, [X19,#0x530]                                       ; +0x11c, 0x68c2e4\nMOV             X0, X1                                                 ; +0x120, 0x68c2e8\nLDR             X1, [X1]                                               ; +0x124, 0x68c2ec\nLDR             X1, [X1,#0x650]                                        ; +0x128, 0x68c2f0\nBLR             X1                                                     ; +0x12c, 0x68c2f4\nUXTB            W0, W0                                                 ; +0x130, 0x68c2f8\nCBNZ            W0, loc_68C360                                         ; +0x134, 0x68c2fc\nLDR             X1, [X19,#0x530]; GameObject *                         ; +0x138, 0x68c300\nLDR             X2, [X19,#0x338]; cocos2d::CCArray *                   ; +0x13c, 0x68c304\nMOV             X0, X19; this                                          ; +0x140, 0x68c308\nBL              _ZN8EditorUI21canAllowMultiActivateEP10GameObjectPN7cocos2d7CCArrayE; EditorUI::canAllowMultiActivate(GameObject *,cocos2d::CCArray *) ; +0x144, 0x68c30c\nUXTB            W0, W0                                                 ; +0x148, 0x68c310\nCBNZ            W0, loc_68C360                                         ; +0x14c, 0x68c314\nLDR             X0, [X19,#0x338]; this                                 ; +0x150, 0x68c318\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x154, 0x68c31c\nCBZ             W0, loc_68C3F0                                         ; +0x158, 0x68c320\nMOV             W21, #0                                                ; +0x15c, 0x68c324\nB               loc_68C350                                             ; +0x160, 0x68c328\nLDR             X0, [X19,#0x338]; this                                 ; +0x164, 0x68c32c\nMOV             W1, W21; unsigned int                                  ; +0x168, 0x68c330\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x16c, 0x68c334\nLDR             X1, [X0]                                               ; +0x170, 0x68c338\nLDR             X1, [X1,#0x6B0]                                        ; +0x174, 0x68c33c\nBLR             X1                                                     ; +0x178, 0x68c340\nUXTB            W0, W0                                                 ; +0x17c, 0x68c344\nCBNZ            W0, loc_68C3F0                                         ; +0x180, 0x68c348\nADD             W21, W21, #1                                           ; +0x184, 0x68c34c\nLDR             X0, [X19,#0x338]; this                                 ; +0x188, 0x68c350\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x18c, 0x68c354\nCMP             W21, W0                                                ; +0x190, 0x68c358\nB.CC            loc_68C32C                                             ; +0x194, 0x68c35c\nMOV             W0, #1                                                 ; +0x198, 0x68c360\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x19c, 0x68c364\nLDR             X19, [X29,#0x50+var_8]                                 ; +0x1a0, 0x68c368\nLDR             X1, [X20]                                              ; +0x1a4, 0x68c36c\nCMP             X19, X1                                                ; +0x1a8, 0x68c370\nB.NE            loc_68C43C                                             ; +0x1ac, 0x68c374\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x1b0, 0x68c378\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x1b4, 0x68c37c\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x1b8, 0x68c380\nRET                                                                    ; +0x1bc, 0x68c384\nCMN             W0, #1                                                 ; +0x1c0, 0x68c388\nB.NE            loc_68C224                                             ; +0x1c4, 0x68c38c\nMOV             W0, #0                                                 ; +0x1c8, 0x68c390\nB               loc_68C364                                             ; +0x1cc, 0x68c394\nCMP             W1, #0xB57                                             ; +0x1d0, 0x68c398\nB.GE            loc_68C360                                             ; +0x1d4, 0x68c39c\nCMP             W1, #0x6A8                                             ; +0x1d8, 0x68c3a0\nB.EQ            loc_68C360                                             ; +0x1dc, 0x68c3a4\nB.LE            loc_68C3C8                                             ; +0x1e0, 0x68c3a8\nCMP             W1, #0x80F                                             ; +0x1e4, 0x68c3ac\nB.EQ            loc_68C360                                             ; +0x1e8, 0x68c3b0\nCMP             W1, #0x811                                             ; +0x1ec, 0x68c3b4\nB.EQ            loc_68C360                                             ; +0x1f0, 0x68c3b8\nCMP             W1, #0x6D7                                             ; +0x1f4, 0x68c3bc\nB.NE            loc_68C27C                                             ; +0x1f8, 0x68c3c0\nB               loc_68C360                                             ; +0x1fc, 0x68c3c4\nCMP             W1, #0x63A                                             ; +0x200, 0x68c3c8\nB.EQ            loc_68C360                                             ; +0x204, 0x68c3cc\nCMP             W1, #0x64F                                             ; +0x208, 0x68c3d0\nB.NE            loc_68C27C                                             ; +0x20c, 0x68c3d4\nB               loc_68C360                                             ; +0x210, 0x68c3d8\nCMP             W1, #0xB5D                                             ; +0x214, 0x68c3dc\nB.GE            loc_68C360                                             ; +0x218, 0x68c3e0\nCMP             W1, #0xB5B                                             ; +0x21c, 0x68c3e4\nB.NE            loc_68C27C                                             ; +0x220, 0x68c3e8\nB               loc_68C360                                             ; +0x224, 0x68c3ec\nLDR             X0, [X19,#0x338]; this                                 ; +0x228, 0x68c3f0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x22c, 0x68c3f4\nCBZ             W0, loc_68C390                                         ; +0x230, 0x68c3f8\nMOV             W21, #0                                                ; +0x234, 0x68c3fc\nB               loc_68C428                                             ; +0x238, 0x68c400\nLDR             X0, [X19,#0x338]; this                                 ; +0x23c, 0x68c404\nMOV             W1, W21; unsigned int                                  ; +0x240, 0x68c408\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x244, 0x68c40c\nLDR             X1, [X0]                                               ; +0x248, 0x68c410\nLDR             X1, [X1,#0x6B8]                                        ; +0x24c, 0x68c414\nBLR             X1                                                     ; +0x250, 0x68c418\nUXTB            W0, W0                                                 ; +0x254, 0x68c41c\nCBNZ            W0, loc_68C390                                         ; +0x258, 0x68c420\nADD             W21, W21, #1                                           ; +0x25c, 0x68c424\nLDR             X0, [X19,#0x338]; this                                 ; +0x260, 0x68c428\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x264, 0x68c42c\nCMP             W21, W0                                                ; +0x268, 0x68c430\nB.CC            loc_68C404                                             ; +0x26c, 0x68c434\nB               loc_68C360                                             ; +0x270, 0x68c438\nBL              .__stack_chk_fail                                      ; +0x274, 0x68c43c", "xrefs": ["EditorUI::toggleEditObjectButton @ 0x68ce60", "<???> @ 0xb96a0"], "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"}