{"type": "func", "start": 8146692, "end": 8147324, "name": "EditorUI::editButton2Usable", "pseudocode": "// \n// EditorUI::editButton2Usable from 0x7c4f04 to 0x7c517c (632 bytes)\n// \n// 2 xrefs:\n// > EditorUI::toggleEditObjectButton @ 0x7c5b84\n// > <???> @ 0xf1ee8\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:08 +0000\n// \n\n__int64 __fastcall EditorUI::editButton2Usable(EditorUI *this)\n{\n  GameObject *v1; // x1\n  cocos2d::CCArray *v3; // x2\n  __int64 result; // x0\n  GameObject *v5; // x1\n  _DWORD *v6; // x0\n  int v7; // 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  v1 = *((GameObject **)this + 187);\n  v3 = *((cocos2d::CCArray **)this + 112);\n  v12 = -1;\n  v13 = -1;\n  EditorUI::getGroupInfo(this, v1, v3, (int *)&v12, (int *)&v12 + 1, &v13);\n  if ( v12 == -1 )\n    return 0;\n  if ( HIDWORD(v12) != 5 )\n  {\n    result = (unsigned __int8)EditorUI::arrayContainsClass(this, *((cocos2d::CCArray **)this + 112), 5);\n    if ( !(_BYTE)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 = *((GameObject **)this + 187);\n      if ( v5 )\n      {\n        if ( (*(unsigned int (__fastcall **)(_QWORD))(*(_QWORD *)v5 + 1800LL))(*((_QWORD *)this + 187)) == 30 )\n          return 1;\n        v6 = *((_DWORD **)this + 187);\n        v7 = v6[257];\n        if ( v7 == 2065\n          || v7 == 1615\n          || (*(unsigned __int8 (__fastcall **)(_DWORD *))(*(_QWORD *)v6 + 1736LL))(v6)\n          || (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 187) + 1728LL))(*((_QWORD *)this + 187))\n          || (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 187) + 1632LL))(*((_QWORD *)this + 187)) )\n        {\n          return 1;\n        }\n        v5 = *((GameObject **)this + 187);\n      }\n      if ( !(unsigned __int8)EditorUI::canAllowMultiActivate(this, v5, *((cocos2d::CCArray **)this + 112)) )\n      {\n        if ( (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)) )\n        {\n          for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)); ++i )\n          {\n            v9 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 112), i);\n            if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1728LL))(v9) )\n              goto LABEL_40;\n          }\n          return 1;\n        }\nLABEL_40:\n        if ( (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)) )\n        {\n          for ( j = 0; j < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112)); ++j )\n          {\n            v11 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 112), j);\n            if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v11 + 1736LL))(v11) )\n              return 0;\n          }\n          return 1;\n        }\n        return 0;\n      }\n    }\n  }\n  return 1;\n}", "assembly": "; \n; EditorUI::editButton2Usable from 0x7c4f04 to 0x7c517c (632 bytes)\n; \n; 2 xrefs:\n; > EditorUI::toggleEditObjectButton @ 0x7c5b84\n; > <???> @ 0xf1ee8\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:08 +0000\n; \nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x7c4f04\nMOV             W6, #0xFFFFFFFF                                        ; +0x4, 0x7c4f08\nMOV             X29, SP                                                ; +0x8, 0x7c4f0c\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x7c4f10\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x7c4f14\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x14, 0x7c4f18\nADD             X3, X29, #0x50+var_14; int *                           ; +0x18, 0x7c4f1c\nADD             X4, X29, #0x50+var_14+4; int *                         ; +0x1c, 0x7c4f20\nLDR             X1, [X0,#0x5D8]; GameObject *                          ; +0x20, 0x7c4f24\nADD             X5, X29, #0x50+var_C; int *                            ; +0x24, 0x7c4f28\nLDR             X7, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x7c4f2c\nMOV             X19, X0                                                ; +0x2c, 0x7c4f30\nLDR             X2, [X0,#0x380]; cocos2d::CCArray *                    ; +0x30, 0x7c4f34\nSTR             W6, [X29,#0x50+var_14]                                 ; +0x34, 0x7c4f38\nLDR             X7, [X7]                                               ; +0x38, 0x7c4f3c\nSTR             X7, [X29,#0x50+var_8]                                  ; +0x3c, 0x7c4f40\nSTR             W6, [X29,#0x50+var_14+4]                               ; +0x40, 0x7c4f44\nSTR             W6, [X29,#0x50+var_C]                                  ; +0x44, 0x7c4f48\nBL              _ZN8EditorUI12getGroupInfoEP10GameObjectPN7cocos2d7CCArrayERiS5_S5_; EditorUI::getGroupInfo(GameObject *,cocos2d::CCArray *,int &,int &,int &) ; +0x48, 0x7c4f4c\nLDR             W0, [X29,#0x50+var_14]                                 ; +0x4c, 0x7c4f50\nCMN             W0, #1                                                 ; +0x50, 0x7c4f54\nLDR             W0, [X29,#0x50+var_14+4]                               ; +0x54, 0x7c4f58\nB.EQ            loc_7C50C4                                             ; +0x58, 0x7c4f5c\nCMP             W0, #5                                                 ; +0x5c, 0x7c4f60\nB.EQ            loc_7C509C                                             ; +0x60, 0x7c4f64\nLDR             X1, [X19,#0x380]; cocos2d::CCArray *                   ; +0x64, 0x7c4f68\nMOV             X0, X19; this                                          ; +0x68, 0x7c4f6c\nMOV             W2, #5; int                                            ; +0x6c, 0x7c4f70\nBL              _ZN8EditorUI18arrayContainsClassEPN7cocos2d7CCArrayEi; EditorUI::arrayContainsClass(cocos2d::CCArray *,int) ; +0x70, 0x7c4f74\nUXTB            W0, W0                                                 ; +0x74, 0x7c4f78\nCBNZ            W0, loc_7C509C                                         ; +0x78, 0x7c4f7c\nLDR             W1, [X29,#0x50+var_C]                                  ; +0x7c, 0x7c4f80\nCMP             W1, #0x1E                                              ; +0x80, 0x7c4f84\nB.EQ            loc_7C509C                                             ; +0x84, 0x7c4f88\nLDR             W1, [X29,#0x50+var_14]                                 ; +0x88, 0x7c4f8c\nCMP             W1, #0xB59                                             ; +0x8c, 0x7c4f90\nB.LE            loc_7C50D4                                             ; +0x90, 0x7c4f94\nCMP             W1, #0xB65                                             ; +0x94, 0x7c4f98\nB.LE            loc_7C5118                                             ; +0x98, 0x7c4f9c\nCMP             W1, #0xB67                                             ; +0x9c, 0x7c4fa0\nB.LT            loc_7C4FB8                                             ; +0xa0, 0x7c4fa4\nCMP             W1, #0xB6C                                             ; +0xa4, 0x7c4fa8\nB.LE            loc_7C509C                                             ; +0xa8, 0x7c4fac\nCMP             W1, #0xE3B                                             ; +0xac, 0x7c4fb0\nB.EQ            loc_7C50A0                                             ; +0xb0, 0x7c4fb4\nLDR             X1, [X19,#0x5D8]                                       ; +0xb4, 0x7c4fb8\nCBZ             X1, loc_7C5040                                         ; +0xb8, 0x7c4fbc\nLDR             X2, [X1]                                               ; +0xbc, 0x7c4fc0\nMOV             X0, X1                                                 ; +0xc0, 0x7c4fc4\nLDR             X1, [X2,#0x708]                                        ; +0xc4, 0x7c4fc8\nBLR             X1                                                     ; +0xc8, 0x7c4fcc\nCMP             W0, #0x1E                                              ; +0xcc, 0x7c4fd0\nB.EQ            loc_7C509C                                             ; +0xd0, 0x7c4fd4\nLDR             X0, [X19,#0x5D8]                                       ; +0xd4, 0x7c4fd8\nLDR             W1, [X0,#0x404]                                        ; +0xd8, 0x7c4fdc\nCMP             W1, #0x811                                             ; +0xdc, 0x7c4fe0\nB.EQ            loc_7C509C                                             ; +0xe0, 0x7c4fe4\nCMP             W1, #0x64F                                             ; +0xe4, 0x7c4fe8\nB.EQ            loc_7C509C                                             ; +0xe8, 0x7c4fec\nLDR             X1, [X0]                                               ; +0xec, 0x7c4ff0\nLDR             X1, [X1,#0x6C8]                                        ; +0xf0, 0x7c4ff4\nBLR             X1                                                     ; +0xf4, 0x7c4ff8\nUXTB            W0, W0                                                 ; +0xf8, 0x7c4ffc\nCBNZ            W0, loc_7C509C                                         ; +0xfc, 0x7c5000\nLDR             X1, [X19,#0x5D8]                                       ; +0x100, 0x7c5004\nMOV             X0, X1                                                 ; +0x104, 0x7c5008\nLDR             X1, [X1]                                               ; +0x108, 0x7c500c\nLDR             X1, [X1,#0x6C0]                                        ; +0x10c, 0x7c5010\nBLR             X1                                                     ; +0x110, 0x7c5014\nUXTB            W0, W0                                                 ; +0x114, 0x7c5018\nCBNZ            W0, loc_7C509C                                         ; +0x118, 0x7c501c\nLDR             X1, [X19,#0x5D8]                                       ; +0x11c, 0x7c5020\nMOV             X0, X1                                                 ; +0x120, 0x7c5024\nLDR             X1, [X1]                                               ; +0x124, 0x7c5028\nLDR             X1, [X1,#0x660]                                        ; +0x128, 0x7c502c\nBLR             X1                                                     ; +0x12c, 0x7c5030\nUXTB            W0, W0                                                 ; +0x130, 0x7c5034\nCBNZ            W0, loc_7C509C                                         ; +0x134, 0x7c5038\nLDR             X1, [X19,#0x5D8]; GameObject *                         ; +0x138, 0x7c503c\nLDR             X2, [X19,#0x380]; cocos2d::CCArray *                   ; +0x13c, 0x7c5040\nMOV             X0, X19; this                                          ; +0x140, 0x7c5044\nBL              _ZN8EditorUI21canAllowMultiActivateEP10GameObjectPN7cocos2d7CCArrayE; EditorUI::canAllowMultiActivate(GameObject *,cocos2d::CCArray *) ; +0x144, 0x7c5048\nUXTB            W0, W0                                                 ; +0x148, 0x7c504c\nCBNZ            W0, loc_7C509C                                         ; +0x14c, 0x7c5050\nLDR             X0, [X19,#0x380]; this                                 ; +0x150, 0x7c5054\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x154, 0x7c5058\nCBZ             W0, loc_7C512C                                         ; +0x158, 0x7c505c\nMOV             W21, #0                                                ; +0x15c, 0x7c5060\nB               loc_7C508C                                             ; +0x160, 0x7c5064\nLDR             X0, [X19,#0x380]; this                                 ; +0x164, 0x7c5068\nMOV             W1, W21; unsigned int                                  ; +0x168, 0x7c506c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x16c, 0x7c5070\nLDR             X1, [X0]                                               ; +0x170, 0x7c5074\nLDR             X1, [X1,#0x6C0]                                        ; +0x174, 0x7c5078\nBLR             X1                                                     ; +0x178, 0x7c507c\nUXTB            W0, W0                                                 ; +0x17c, 0x7c5080\nCBNZ            W0, loc_7C512C                                         ; +0x180, 0x7c5084\nADD             W21, W21, #1                                           ; +0x184, 0x7c5088\nLDR             X0, [X19,#0x380]; this                                 ; +0x188, 0x7c508c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x18c, 0x7c5090\nCMP             W21, W0                                                ; +0x190, 0x7c5094\nB.CC            loc_7C5068                                             ; +0x194, 0x7c5098\nMOV             W0, #1                                                 ; +0x198, 0x7c509c\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x19c, 0x7c50a0\nLDR             X19, [X29,#0x50+var_8]                                 ; +0x1a0, 0x7c50a4\nLDR             X1, [X20]                                              ; +0x1a4, 0x7c50a8\nCMP             X19, X1                                                ; +0x1a8, 0x7c50ac\nB.NE            loc_7C5178                                             ; +0x1ac, 0x7c50b0\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x1b0, 0x7c50b4\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x1b4, 0x7c50b8\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x1b8, 0x7c50bc\nRET                                                                    ; +0x1bc, 0x7c50c0\nCMN             W0, #1                                                 ; +0x1c0, 0x7c50c4\nB.NE            loc_7C4F60                                             ; +0x1c4, 0x7c50c8\nMOV             W0, #0                                                 ; +0x1c8, 0x7c50cc\nB               loc_7C50A0                                             ; +0x1cc, 0x7c50d0\nCMP             W1, #0xB57                                             ; +0x1d0, 0x7c50d4\nB.GE            loc_7C509C                                             ; +0x1d4, 0x7c50d8\nCMP             W1, #0x6A8                                             ; +0x1d8, 0x7c50dc\nB.EQ            loc_7C509C                                             ; +0x1dc, 0x7c50e0\nB.LE            loc_7C5104                                             ; +0x1e0, 0x7c50e4\nCMP             W1, #0x80F                                             ; +0x1e4, 0x7c50e8\nB.EQ            loc_7C509C                                             ; +0x1e8, 0x7c50ec\nCMP             W1, #0x811                                             ; +0x1ec, 0x7c50f0\nB.EQ            loc_7C509C                                             ; +0x1f0, 0x7c50f4\nCMP             W1, #0x6D7                                             ; +0x1f4, 0x7c50f8\nB.NE            loc_7C4FB8                                             ; +0x1f8, 0x7c50fc\nB               loc_7C509C                                             ; +0x1fc, 0x7c5100\nCMP             W1, #0x63A                                             ; +0x200, 0x7c5104\nB.EQ            loc_7C509C                                             ; +0x204, 0x7c5108\nCMP             W1, #0x64F                                             ; +0x208, 0x7c510c\nB.NE            loc_7C4FB8                                             ; +0x20c, 0x7c5110\nB               loc_7C509C                                             ; +0x210, 0x7c5114\nCMP             W1, #0xB5D                                             ; +0x214, 0x7c5118\nB.GE            loc_7C509C                                             ; +0x218, 0x7c511c\nCMP             W1, #0xB5B                                             ; +0x21c, 0x7c5120\nB.NE            loc_7C4FB8                                             ; +0x220, 0x7c5124\nB               loc_7C509C                                             ; +0x224, 0x7c5128\nLDR             X0, [X19,#0x380]; this                                 ; +0x228, 0x7c512c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x22c, 0x7c5130\nCBZ             W0, loc_7C50CC                                         ; +0x230, 0x7c5134\nMOV             W21, #0                                                ; +0x234, 0x7c5138\nB               loc_7C5164                                             ; +0x238, 0x7c513c\nLDR             X0, [X19,#0x380]; this                                 ; +0x23c, 0x7c5140\nMOV             W1, W21; unsigned int                                  ; +0x240, 0x7c5144\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x244, 0x7c5148\nLDR             X1, [X0]                                               ; +0x248, 0x7c514c\nLDR             X1, [X1,#0x6C8]                                        ; +0x24c, 0x7c5150\nBLR             X1                                                     ; +0x250, 0x7c5154\nUXTB            W0, W0                                                 ; +0x254, 0x7c5158\nCBNZ            W0, loc_7C50CC                                         ; +0x258, 0x7c515c\nADD             W21, W21, #1                                           ; +0x25c, 0x7c5160\nLDR             X0, [X19,#0x380]; this                                 ; +0x260, 0x7c5164\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x264, 0x7c5168\nCMP             W21, W0                                                ; +0x268, 0x7c516c\nB.CC            loc_7C5140                                             ; +0x26c, 0x7c5170\nB               loc_7C509C                                             ; +0x270, 0x7c5174\nBL              .__stack_chk_fail                                      ; +0x274, 0x7c5178", "xrefs": ["EditorUI::toggleEditObjectButton @ 0x7c5b84", "<???> @ 0xf1ee8"], "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"}