{"type": "func", "start": 7091756, "end": 7092128, "name": "EditorUI::onAssignNewGroupID", "pseudocode": "// \n// EditorUI::onAssignNewGroupID from 0x6c362c to 0x6c37a0 (372 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x9ade8\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::onAssignNewGroupID(EditorUI *a1)\n{\n  GameObject *m_selectedObject; // x0\n  cocos2d::CCArray *m_selectedObjects; // x20\n  LevelEditorLayer *m_editorLayer; // x21\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 v5; // 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; // x2\n  unsigned int NextFreeGroupID; // w23\n  unsigned int v8; // w19\n  GameObject *v9; // x21\n  std::unordered_set<int> v10; // [xsp+40h] [xbp+40h] BYREF\n\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n    m_selectedObjects = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(\n                                              (cocos2d::CCArray *)m_selectedObject,\n                                              _stack_chk_guard);\n  else\n    m_selectedObjects = a1->m_selectedObjects;\n  if ( (unsigned int)cocos2d::CCArray::count(m_selectedObjects) )\n  {\n    m_editorLayer = a1->m_editorLayer;\n    v10._M_h._M_before_begin._M_nxt = nullptr;\n    v10._M_h._M_element_count = 0;\n    v10._M_h._M_rehash_policy._M_max_load_factor = 1.0;\n    v10._M_h._M_rehash_policy._M_next_resize = 0;\n    v5 = sub_D146DC(&v10._M_h._M_rehash_policy, 10);\n    v10._M_h._M_bucket_count = v5;\n    if ( v5 == 1 )\n    {\n      v10._M_h._M_single_bucket = nullptr;\n      p_M_single_bucket = &v10._M_h._M_single_bucket;\n    }\n    else\n    {\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 *)sub_686A44(v5);\n    }\n    v10._M_h._M_buckets = p_M_single_bucket;\n    NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(m_editorLayer, &v10);\n    v8 = 0;\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)&v10);\n    if ( (unsigned int)cocos2d::CCArray::count(m_selectedObjects) )\n    {\n      do\n      {\n        v9 = (GameObject *)cocos2d::CCArray::objectAtIndex(m_selectedObjects, v8++);\n        if ( v9->addToGroup(v9, NextFreeGroupID) == 1 )\n          a1->m_editorLayer->addToGroup(a1->m_editorLayer, v9, NextFreeGroupID, 0);\n      }\n      while ( v8 < (unsigned int)cocos2d::CCArray::count(m_selectedObjects) );\n    }\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::onAssignNewGroupID from 0x6c362c to 0x6c37a0 (372 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x9ade8\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_80]!                                ; +0x0, 0x6c362c\nMOV             X29, SP                                                ; +0x4, 0x6c3630\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x8, 0x6c3634\nADRP            X22, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x6c3638\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x10, 0x6c363c\nMOV             X24, X0                                                ; +0x14, 0x6c3640\nLDR             X0, [X0,#0x530]; this                                  ; +0x18, 0x6c3644\nLDR             X1, [X22,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x6c3648\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x20, 0x6c364c\nLDR             X1, [X1]; cocos2d::CCObject *                          ; +0x24, 0x6c3650\nSTR             X1, [X29,#0x80+var_8]                                  ; +0x28, 0x6c3654\nCBZ             X0, loc_6C3774                                         ; +0x2c, 0x6c3658\nBL              _ZN7cocos2d7CCArray16createWithObjectEPNS_8CCObjectE; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x30, 0x6c365c\nMOV             X20, X0                                                ; +0x34, 0x6c3660\nMOV             X0, X20; this                                          ; +0x38, 0x6c3664\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x3c, 0x6c3668\nCBNZ            W0, loc_6C3698                                         ; +0x40, 0x6c366c\nLDR             X22, [X22,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x44, 0x6c3670\nLDR             X1, [X29,#0x80+var_8]                                  ; +0x48, 0x6c3674\nLDR             X0, [X22]                                              ; +0x4c, 0x6c3678\nCMP             X1, X0                                                 ; +0x50, 0x6c367c\nB.NE            loc_6C3788                                             ; +0x54, 0x6c3680\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x58, 0x6c3684\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x5c, 0x6c3688\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x60, 0x6c368c\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x64, 0x6c3690\nRET                                                                    ; +0x68, 0x6c3694\nADD             X19, X29, #0x80+var_40                                 ; +0x6c, 0x6c3698\nMOV             X1, #0xA                                               ; +0x70, 0x6c369c\nFMOV            S0, #1.0                                               ; +0x74, 0x6c36a0\nADD             X0, X19, #0x20 ; ' '                                   ; +0x78, 0x6c36a4\nLDR             X21, [X24,#0x4F8]                                      ; +0x7c, 0x6c36a8\nSTR             XZR, [X29,#0x80+var_30]                                ; +0x80, 0x6c36ac\nSTR             XZR, [X29,#0x80+var_28]                                ; +0x84, 0x6c36b0\nSTR             S0, [X29,#0x80+var_20]                                 ; +0x88, 0x6c36b4\nSTR             XZR, [X29,#0x80+var_18]                                ; +0x8c, 0x6c36b8\nBL              sub_D146DC                                             ; +0x90, 0x6c36bc\nCMP             X0, #1                                                 ; +0x94, 0x6c36c0\nSTR             X0, [X29,#0x80+var_38]                                 ; +0x98, 0x6c36c4\nB.EQ            loc_6C377C                                             ; +0x9c, 0x6c36c8\nBL              sub_686A44                                             ; +0xa0, 0x6c36cc\nMOV             X2, X0                                                 ; +0xa4, 0x6c36d0\nMOV             X0, X21                                                ; +0xa8, 0x6c36d4\nMOV             X1, X19                                                ; +0xac, 0x6c36d8\nSTR             X2, [X29,#0x80+var_40]                                 ; +0xb0, 0x6c36dc\nBL              _ZN16LevelEditorLayer18getNextFreeGroupIDERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; LevelEditorLayer::getNextFreeGroupID(std::unordered_set<int> const&) ; +0xb4, 0x6c36e0\nMOV             W23, W0                                                ; +0xb8, 0x6c36e4\nMOV             X0, X19                                                ; +0xbc, 0x6c36e8\nMOV             W19, #0                                                ; +0xc0, 0x6c36ec\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() ; +0xc4, 0x6c36f0\nMOV             X0, X20; this                                          ; +0xc8, 0x6c36f4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xcc, 0x6c36f8\nCMP             W19, W0                                                ; +0xd0, 0x6c36fc\nB.CS            loc_6C3740                                             ; +0xd4, 0x6c3700\nMOV             W1, W19; unsigned int                                  ; +0xd8, 0x6c3704\nMOV             X0, X20; this                                          ; +0xdc, 0x6c3708\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xe0, 0x6c370c\nLDR             X2, [X0]                                               ; +0xe4, 0x6c3710\nMOV             W1, W23                                                ; +0xe8, 0x6c3714\nMOV             X21, X0                                                ; +0xec, 0x6c3718\nLDR             X2, [X2,#0x630]                                        ; +0xf0, 0x6c371c\nBLR             X2                                                     ; +0xf4, 0x6c3720\nCMP             W0, #1                                                 ; +0xf8, 0x6c3724\nB.EQ            loc_6C374C                                             ; +0xfc, 0x6c3728\nADD             W19, W19, #1                                           ; +0x100, 0x6c372c\nMOV             X0, X20; this                                          ; +0x104, 0x6c3730\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x108, 0x6c3734\nCMP             W19, W0                                                ; +0x10c, 0x6c3738\nB.CC            loc_6C3704                                             ; +0x110, 0x6c373c\nMOV             X0, X24; this                                          ; +0x114, 0x6c3740\nBL              _ZN8EditorUI21updateObjectInfoLabelEv; EditorUI::updateObjectInfoLabel(void) ; +0x118, 0x6c3744\nB               loc_6C3670                                             ; +0x11c, 0x6c3748\nLDR             X4, [X24,#0x4F8]                                       ; +0x120, 0x6c374c\nMOV             X1, X21                                                ; +0x124, 0x6c3750\nMOV             W2, W23                                                ; +0x128, 0x6c3754\nMOV             W3, #0                                                 ; +0x12c, 0x6c3758\nMOV             X0, X4                                                 ; +0x130, 0x6c375c\nADD             W19, W19, #1                                           ; +0x134, 0x6c3760\nLDR             X4, [X4]                                               ; +0x138, 0x6c3764\nLDR             X4, [X4,#0x518]                                        ; +0x13c, 0x6c3768\nBLR             X4                                                     ; +0x140, 0x6c376c\nB               loc_6C3730                                             ; +0x144, 0x6c3770\nLDR             X20, [X24,#0x338]                                      ; +0x148, 0x6c3774\nB               loc_6C3664                                             ; +0x14c, 0x6c3778\nSTR             XZR, [X29,#0x80+var_10]                                ; +0x150, 0x6c377c\nADD             X2, X19, #0x30 ; '0'                                   ; +0x154, 0x6c3780\nB               loc_6C36D4                                             ; +0x158, 0x6c3784\nBL              .__stack_chk_fail                                      ; +0x15c, 0x6c3788\nMOV             X20, X0                                                ; +0x160, 0x6c378c\nMOV             X0, X19                                                ; +0x164, 0x6c3790\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() ; +0x168, 0x6c3794\nMOV             X0, X20                                                ; +0x16c, 0x6c3798\nBL              _Unwind_Resume                                         ; +0x170, 0x6c379c", "xrefs": ["<???> @ 0x9ade8"], "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"}