{"type": "func", "start": 7091240, "end": 7091756, "name": "EditorUI::assignNewGroups", "pseudocode": "// \n// EditorUI::assignNewGroups from 0x6c3428 to 0x6c362c (516 bytes)\n// \n// 3 xrefs:\n// > EditorPauseLayer::onNewGroupX @ 0x78aba8\n// > EditorPauseLayer::onNewGroupY @ 0x78abb8\n// > <???> @ 0x6c828\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 EditorUI::assignNewGroups(EditorUI *a1, bool a2)\n{\n  _BOOL4 v2; // w20\n  GameObject *m_selectedObject; // x0\n  cocos2d::CCArray *v5; // x0\n  cocos2d::CCArray *v6; // x19\n  GameObject *v7; // x1\n  cocos2d::ccArray *data; // x1\n  cocos2d::CCObject **arr; // x0\n  size_t num; // x1\n  cocos2d::ccArray *v11; // x1\n  GameObject **v12; // x20\n  GameObject **v13; // x24\n  GameObject *i; // x21\n  LevelEditorLayer *m_editorLayer; // x23\n  std::_Hashtable<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::_Hashtable_traits<false, true, true>>::size_type v16; // x0\n  std::_Hashtable<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::_Hashtable_traits<false, true, true>>::__bucket_type *p_M_single_bucket; // x28\n  unsigned int NextFreeGroupID; // w23\n  __int64 v19; // [xsp+78h] [xbp+78h]\n  std::unordered_set<int> v20; // [xsp+80h] [xbp+80h] BYREF\n\n  v2 = a2;\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject\n    || (m_selectedObject = (GameObject *)cocos2d::CCArray::count(a1->m_selectedObjects), (_DWORD)m_selectedObject) )\n  {\n    v5 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)m_selectedObject);\n    v6 = v5;\n    v7 = a1->m_selectedObject;\n    if ( v7 )\n      cocos2d::CCArray::addObject(v5, v7);\n    else\n      cocos2d::CCArray::addObjectsFromArray(v5, a1->m_selectedObjects);\n    data = v6->data;\n    arr = data->arr;\n    num = data->num;\n    if ( v2 )\n      qsort(arr, num, 8u, (int (*)(const void *, const void *))alignYSort);\n    else\n      qsort(arr, num, 8u, (int (*)(const void *, const void *))alignXSort);\n    v11 = v6->data;\n    if ( v11->num )\n    {\n      v12 = (GameObject **)v11->arr;\n      v13 = &v12[v11->num - 1];\n      if ( v12 <= v13 )\n      {\n        for ( i = *v12; *v12; i = *v12 )\n        {\n          v20._M_h._M_before_begin._M_nxt = nullptr;\n          v20._M_h._M_element_count = 0;\n          v20._M_h._M_rehash_policy._M_next_resize = 0;\n          m_editorLayer = a1->m_editorLayer;\n          v20._M_h._M_rehash_policy._M_max_load_factor = 1.0;\n          v16 = sub_D146DC(&v20._M_h._M_rehash_policy, 10);\n          v20._M_h._M_bucket_count = v16;\n          if ( v16 == 1 )\n          {\n            v20._M_h._M_single_bucket = nullptr;\n            p_M_single_bucket = &v20._M_h._M_single_bucket;\n          }\n          else\n          {\n            if ( v16 > 0x1FFFFFFFFFFFFFFFLL )\n              sub_D1383C();\n            v19 = 8 * v16;\n            p_M_single_bucket = (std::_Hashtable<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::_Hashtable_traits<false, true, true>>::__bucket_type *)operator new(8 * v16);\n            memset(p_M_single_bucket, 0, v19);\n          }\n          v20._M_h._M_buckets = p_M_single_bucket;\n          NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(m_editorLayer, &v20);\n          std::_Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable((__int64)&v20);\n          if ( i->addToGroup(i, NextFreeGroupID) == 1 )\n            a1->m_editorLayer->addToGroup(a1->m_editorLayer, i, NextFreeGroupID, 0);\n          if ( v13 < ++v12 )\n            break;\n        }\n      }\n    }\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::assignNewGroups from 0x6c3428 to 0x6c362c (516 bytes)\n; \n; 3 xrefs:\n; > EditorPauseLayer::onNewGroupX @ 0x78aba8\n; > EditorPauseLayer::onNewGroupY @ 0x78abb8\n; > <???> @ 0x6c828\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_C0]!                                ; +0x0, 0x6c3428\nMOV             X29, SP                                                ; +0x4, 0x6c342c\nSTP             X25, X26, [SP,#0xC0+var_80]                            ; +0x8, 0x6c3430\nADRP            X25, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x6c3434\nSTP             X19, X20, [SP,#0xC0+var_B0]                            ; +0x10, 0x6c3438\nUXTB            W20, W1                                                ; +0x14, 0x6c343c\nLDR             X1, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x6c3440\nSTP             X21, X22, [SP,#0xC0+var_A0]                            ; +0x1c, 0x6c3444\nMOV             X22, X0                                                ; +0x20, 0x6c3448\nLDR             X0, [X0,#0x530]; this                                  ; +0x24, 0x6c344c\nLDR             X1, [X1]                                               ; +0x28, 0x6c3450\nSTP             X23, X24, [SP,#0xC0+var_90]                            ; +0x2c, 0x6c3454\nSTP             X27, X28, [SP,#0xC0+var_70]                            ; +0x30, 0x6c3458\nSTR             X1, [X29,#0xC0+var_8]                                  ; +0x34, 0x6c345c\nSTR             D8, [SP,#0xC0+var_60]                                  ; +0x38, 0x6c3460\nCBZ             X0, loc_6C35F4                                         ; +0x3c, 0x6c3464\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x40, 0x6c3468\nMOV             X19, X0                                                ; +0x44, 0x6c346c\nLDR             X1, [X22,#0x530]; cocos2d::CCObject *                  ; +0x48, 0x6c3470\nCBZ             X1, loc_6C3604                                         ; +0x4c, 0x6c3474\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x50, 0x6c3478\nLDR             X1, [X19,#0x38]                                        ; +0x54, 0x6c347c\nMOV             X2, #8; size_t                                         ; +0x58, 0x6c3480\nLDR             X0, [X1,#0x10]; void *                                 ; +0x5c, 0x6c3484\nLDR             W1, [X1]; size_t                                       ; +0x60, 0x6c3488\nCBNZ            W20, loc_6C35B4                                        ; +0x64, 0x6c348c\nADRP            X3, #_Z10alignXSortPKvS0__ptr@PAGE                     ; +0x68, 0x6c3490\nLDR             X3, [X3,#_Z10alignXSortPKvS0__ptr@PAGEOFF]; int (*)(const void *, const void *) ; +0x6c, 0x6c3494\nBL              .qsort                                                 ; +0x70, 0x6c3498\nLDR             X1, [X19,#0x38]                                        ; +0x74, 0x6c349c\nLDR             W0, [X1]                                               ; +0x78, 0x6c34a0\nCBZ             W0, loc_6C3578                                         ; +0x7c, 0x6c34a4\nLDR             X20, [X1,#0x10]                                        ; +0x80, 0x6c34a8\nMOV             X24, #0xFFFFFFFFFFFFFFF8                               ; +0x84, 0x6c34ac\nADD             X24, X24, W0,UXTW#3                                    ; +0x88, 0x6c34b0\nADD             X24, X20, X24                                          ; +0x8c, 0x6c34b4\nCMP             X20, X24                                               ; +0x90, 0x6c34b8\nB.HI            loc_6C3578                                             ; +0x94, 0x6c34bc\nLDR             X21, [X20]                                             ; +0x98, 0x6c34c0\nCBZ             X21, loc_6C3578                                        ; +0x9c, 0x6c34c4\nADD             X19, X29, #0xC0+var_40                                 ; +0xa0, 0x6c34c8\nMOV             X27, #0x1FFFFFFFFFFFFFFF                               ; +0xa4, 0x6c34cc\nFMOV            S8, #1.0                                               ; +0xa8, 0x6c34d0\nADD             X26, X19, #0x20 ; ' '                                  ; +0xac, 0x6c34d4\nMOV             X0, X26                                                ; +0xb0, 0x6c34d8\nMOV             X1, #0xA                                               ; +0xb4, 0x6c34dc\nSTR             XZR, [X19,#0x10]                                       ; +0xb8, 0x6c34e0\nSTR             XZR, [X19,#0x18]                                       ; +0xbc, 0x6c34e4\nSTR             XZR, [X19,#0x28]                                       ; +0xc0, 0x6c34e8\nLDR             X23, [X22,#0x4F8]                                      ; +0xc4, 0x6c34ec\nSTR             S8, [X19,#0x20]                                        ; +0xc8, 0x6c34f0\nBL              sub_D146DC                                             ; +0xcc, 0x6c34f4\nCMP             X0, #1                                                 ; +0xd0, 0x6c34f8\nSTR             X0, [X19,#8]                                           ; +0xd4, 0x6c34fc\nB.EQ            loc_6C35E8                                             ; +0xd8, 0x6c3500\nCMP             X0, X27                                                ; +0xdc, 0x6c3504\nB.HI            loc_6C3610                                             ; +0xe0, 0x6c3508\nLSL             X2, X0, #3                                             ; +0xe4, 0x6c350c\nSTR             X2, [X29,#0xC0+var_48]                                 ; +0xe8, 0x6c3510\nMOV             X0, X2; unsigned __int64                               ; +0xec, 0x6c3514\nBL              _Znwm; operator new(ulong)                             ; +0xf0, 0x6c3518\nMOV             X28, X0                                                ; +0xf4, 0x6c351c\nLDR             X2, [X29,#0xC0+var_48]; size_t                         ; +0xf8, 0x6c3520\nMOV             W1, #0; int                                            ; +0xfc, 0x6c3524\nBL              .memset                                                ; +0x100, 0x6c3528\nMOV             X0, X23                                                ; +0x104, 0x6c352c\nMOV             X1, X19                                                ; +0x108, 0x6c3530\nSTR             X28, [X19]                                             ; +0x10c, 0x6c3534\nBL              _ZN16LevelEditorLayer18getNextFreeGroupIDERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; LevelEditorLayer::getNextFreeGroupID(std::unordered_set<int> const&) ; +0x110, 0x6c3538\nMOV             W23, W0                                                ; +0x114, 0x6c353c\nMOV             X0, X19                                                ; +0x118, 0x6c3540\nBL              _ZNSt10_HashtableIiiSaIiENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEED1Ev; std::_Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable() ; +0x11c, 0x6c3544\nLDR             X2, [X21]                                              ; +0x120, 0x6c3548\nMOV             X0, X21                                                ; +0x124, 0x6c354c\nMOV             W1, W23                                                ; +0x128, 0x6c3550\nLDR             X2, [X2,#0x630]                                        ; +0x12c, 0x6c3554\nBLR             X2                                                     ; +0x130, 0x6c3558\nCMP             W0, #1                                                 ; +0x134, 0x6c355c\nB.EQ            loc_6C35C4                                             ; +0x138, 0x6c3560\nADD             X20, X20, #8                                           ; +0x13c, 0x6c3564\nCMP             X24, X20                                               ; +0x140, 0x6c3568\nB.CC            loc_6C3578                                             ; +0x144, 0x6c356c\nLDR             X21, [X20]                                             ; +0x148, 0x6c3570\nCBNZ            X21, loc_6C34D8                                        ; +0x14c, 0x6c3574\nMOV             X0, X22; this                                          ; +0x150, 0x6c3578\nBL              _ZN8EditorUI21updateObjectInfoLabelEv; EditorUI::updateObjectInfoLabel(void) ; +0x154, 0x6c357c\nLDR             X25, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x158, 0x6c3580\nLDR             X1, [X29,#0xC0+var_8]                                  ; +0x15c, 0x6c3584\nLDR             X0, [X25]                                              ; +0x160, 0x6c3588\nCMP             X1, X0                                                 ; +0x164, 0x6c358c\nB.NE            loc_6C3614                                             ; +0x168, 0x6c3590\nLDP             X19, X20, [SP,#0xC0+var_B0]                            ; +0x16c, 0x6c3594\nLDP             X21, X22, [SP,#0xC0+var_A0]                            ; +0x170, 0x6c3598\nLDP             X23, X24, [SP,#0xC0+var_90]                            ; +0x174, 0x6c359c\nLDP             X25, X26, [SP,#0xC0+var_80]                            ; +0x178, 0x6c35a0\nLDP             X27, X28, [SP,#0xC0+var_70]                            ; +0x17c, 0x6c35a4\nLDR             D8, [SP,#0xC0+var_60]                                  ; +0x180, 0x6c35a8\nLDP             X29, X30, [SP+0xC0+var_C0],#0xC0                       ; +0x184, 0x6c35ac\nRET                                                                    ; +0x188, 0x6c35b0\nADRP            X3, #_Z10alignYSortPKvS0__ptr@PAGE                     ; +0x18c, 0x6c35b4\nLDR             X3, [X3,#_Z10alignYSortPKvS0__ptr@PAGEOFF]; int (*)(const void *, const void *) ; +0x190, 0x6c35b8\nBL              .qsort                                                 ; +0x194, 0x6c35bc\nB               loc_6C349C                                             ; +0x198, 0x6c35c0\nLDR             X4, [X22,#0x4F8]                                       ; +0x19c, 0x6c35c4\nMOV             X1, X21                                                ; +0x1a0, 0x6c35c8\nMOV             W2, W23                                                ; +0x1a4, 0x6c35cc\nMOV             W3, #0                                                 ; +0x1a8, 0x6c35d0\nMOV             X0, X4                                                 ; +0x1ac, 0x6c35d4\nLDR             X4, [X4]                                               ; +0x1b0, 0x6c35d8\nLDR             X4, [X4,#0x518]                                        ; +0x1b4, 0x6c35dc\nBLR             X4                                                     ; +0x1b8, 0x6c35e0\nB               loc_6C3564                                             ; +0x1bc, 0x6c35e4\nMOV             X28, X19                                               ; +0x1c0, 0x6c35e8\nSTR             XZR, [X28,#0x30]!                                      ; +0x1c4, 0x6c35ec\nB               loc_6C352C                                             ; +0x1c8, 0x6c35f0\nLDR             X0, [X22,#0x338]; this                                 ; +0x1cc, 0x6c35f4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1d0, 0x6c35f8\nCBZ             W0, loc_6C3580                                         ; +0x1d4, 0x6c35fc\nB               loc_6C3468                                             ; +0x1d8, 0x6c3600\nLDR             X1, [X22,#0x338]; cocos2d::CCArray *                   ; +0x1dc, 0x6c3604\nBL              _ZN7cocos2d7CCArray19addObjectsFromArrayEPS0_; cocos2d::CCArray::addObjectsFromArray(cocos2d::CCArray*) ; +0x1e0, 0x6c3608\nB               loc_6C347C                                             ; +0x1e4, 0x6c360c\nBL              sub_D1383C                                             ; +0x1e8, 0x6c3610\nBL              .__stack_chk_fail                                      ; +0x1ec, 0x6c3614\nMOV             X20, X0                                                ; +0x1f0, 0x6c3618\nMOV             X0, X19                                                ; +0x1f4, 0x6c361c\nBL              _ZNSt10_HashtableIiiSaIiENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEED1Ev; std::_Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable() ; +0x1f8, 0x6c3620\nMOV             X0, X20                                                ; +0x1fc, 0x6c3624\nBL              _Unwind_Resume                                         ; +0x200, 0x6c3628", "xrefs": ["EditorPauseLayer::onNewGroupX @ 0x78aba8", "EditorPauseLayer::onNewGroupY @ 0x78abb8", "<???> @ 0x6c828"], "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"}