{"type": "func", "start": 4299109260, "end": 4299109568, "name": "EditorUI::assignNewGroups", "pseudocode": "// \n// EditorUI::assignNewGroups from 0x1003f338c to 0x1003f34c0 (308 bytes)\n// \n// 2 xrefs:\n// > EditorPauseLayer::onNewGroupX @ 0x10039e0cc\n// > EditorPauseLayer::onNewGroupY @ 0x10039e0dc\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 __fastcall EditorUI::assignNewGroups(EditorUI *a1, bool a2)\n{\n  _BOOL4 v2; // w20\n  cocos2d::CCObject *v4; // x0\n  cocos2d::CCObject *v5; // x21\n  int (__cdecl *v6)(const void *, const void *); // x3\n  cocos2d::CCObject_vtbl *v7; // x9\n  __int64 copyWithZone_low; // x8\n  void (__cdecl *v9)(cocos2d::CCObject *__hidden); // x22\n  unsigned __int64 v10; // x23\n  __int64 v11; // x20\n  LevelEditorLayer *m_editorLayer; // x0\n  __int64 NextFreeGroupID; // x21\n  std::unordered_set<int> v14; // [xsp+0h] [xbp-60h] BYREF\n\n  v2 = a2;\n  if ( a1->m_selectedObject || (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects) )\n  {\n    v4 = sub_10024A15C();\n    v5 = v4;\n    if ( a1->m_selectedObject )\n      sub_10024A2D0((__int64)v4);\n    else\n      sub_10024A360((__int64)v4, (__int64)a1->m_selectedObjects);\n    if ( v2 )\n      v6 = (int (__cdecl *)(const void *, const void *))sub_1003C4ADC;\n    else\n      v6 = (int (__cdecl *)(const void *, const void *))sub_1003C4A78;\n    qsort(v5[1].~CCObject_0, (size_t)v5[1].copyWithZone, 8u, v6);\n    v7 = v5[1].__vftable;\n    copyWithZone_low = LODWORD(v7->copyWithZone);\n    if ( (_DWORD)copyWithZone_low )\n    {\n      v9 = v7->~CCObject_0;\n      v10 = (unsigned __int64)v9 + 8 * copyWithZone_low - 8;\n      do\n      {\n        v11 = *(_QWORD *)v9;\n        if ( !*(_QWORD *)v9 )\n          break;\n        m_editorLayer = a1->m_editorLayer;\n        memset(&v14, 0, 32);\n        v14.__table_.__p3_.__value_ = 1.0;\n        NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(m_editorLayer, &v14);\n        sub_100017A98((__int64)&v14);\n        if ( (*(unsigned int (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 1584LL))(v11, NextFreeGroupID) == 1 )\n          ((void (__fastcall *)(LevelEditorLayer *, __int64, __int64, _QWORD))a1->m_editorLayer->addToGroup)(\n            a1->m_editorLayer,\n            v11,\n            NextFreeGroupID,\n            0);\n        v9 = (void (__cdecl *)(cocos2d::CCObject *__hidden))((char *)v9 + 8);\n      }\n      while ( (unsigned __int64)v9 <= v10 );\n    }\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::assignNewGroups from 0x1003f338c to 0x1003f34c0 (308 bytes)\n; \n; 2 xrefs:\n; > EditorPauseLayer::onNewGroupX @ 0x10039e0cc\n; > EditorPauseLayer::onNewGroupY @ 0x10039e0dc\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x1003f338c\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x4, 0x1003f3390\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x8, 0x1003f3394\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0xc, 0x1003f3398\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x10, 0x1003f339c\nADD             X29, SP, #0x60                                         ; +0x14, 0x1003f33a0\nMOV             X20, X1                                                ; +0x18, 0x1003f33a4\nMOV             X19, X0                                                ; +0x1c, 0x1003f33a8\nLDR             X8, [X0,#0x520]                                        ; +0x20, 0x1003f33ac\nCBNZ            X8, loc_1003F33C0                                      ; +0x24, 0x1003f33b0\nLDR             X0, [X19,#0x328]                                       ; +0x28, 0x1003f33b4\nBL              sub_10024A36C                                          ; +0x2c, 0x1003f33b8\nCBZ             W0, loc_1003F34A8                                      ; +0x30, 0x1003f33bc\nBL              sub_10024A15C                                          ; +0x34, 0x1003f33c0\nMOV             X21, X0                                                ; +0x38, 0x1003f33c4\nLDR             X1, [X19,#0x520]                                       ; +0x3c, 0x1003f33c8\nCBZ             X1, loc_1003F33DC                                      ; +0x40, 0x1003f33cc\nMOV             X0, X21                                                ; +0x44, 0x1003f33d0\nBL              sub_10024A2D0                                          ; +0x48, 0x1003f33d4\nB               loc_1003F33E8                                          ; +0x4c, 0x1003f33d8\nLDR             X1, [X19,#0x328]                                       ; +0x50, 0x1003f33dc\nMOV             X0, X21                                                ; +0x54, 0x1003f33e0\nBL              sub_10024A360                                          ; +0x58, 0x1003f33e4\nLDR             X8, [X21,#0x38]                                        ; +0x5c, 0x1003f33e8\nLDR             X0, [X8,#0x10]; __base                                 ; +0x60, 0x1003f33ec\nLDR             W1, [X8]; __nel                                        ; +0x64, 0x1003f33f0\nADRL            X8, sub_1003C4A78                                      ; +0x68, 0x1003f33f4\nADRL            X9, sub_1003C4ADC                                      ; +0x70, 0x1003f33fc\nCMP             W20, #0                                                ; +0x78, 0x1003f3404\nCSEL            X3, X9, X8, NE; __compar                               ; +0x7c, 0x1003f3408\nMOV             W2, #8; __width                                        ; +0x80, 0x1003f340c\nBL              _qsort                                                 ; +0x84, 0x1003f3410\nLDR             X9, [X21,#0x38]                                        ; +0x88, 0x1003f3414\nLDR             W8, [X9]                                               ; +0x8c, 0x1003f3418\nCBZ             W8, loc_1003F34A0                                      ; +0x90, 0x1003f341c\nLDR             X22, [X9,#0x10]                                        ; +0x94, 0x1003f3420\nADD             X8, X22, X8,LSL#3                                      ; +0x98, 0x1003f3424\nSUB             X23, X8, #8                                            ; +0x9c, 0x1003f3428\nMOV             W24, #0x3F800000                                       ; +0xa0, 0x1003f342c\nLDR             X20, [X22]                                             ; +0xa4, 0x1003f3430\nCBZ             X20, loc_1003F34A0                                     ; +0xa8, 0x1003f3434\nLDR             X0, [X19,#0x4E8]                                       ; +0xac, 0x1003f3438\nMOVI            V0.16B, #0                                             ; +0xb0, 0x1003f343c\nSTP             Q0, Q0, [SP,#0x60+var_60]                              ; +0xb4, 0x1003f3440\nSTR             W24, [SP,#0x60+var_40]                                 ; +0xb8, 0x1003f3444\nMOV             X1, SP                                                 ; +0xbc, 0x1003f3448\nBL              LevelEditorLayer__getNextFreeGroupID                   ; +0xc0, 0x1003f344c\nMOV             X21, X0                                                ; +0xc4, 0x1003f3450\nMOV             X0, SP                                                 ; +0xc8, 0x1003f3454\nBL              sub_100017A98                                          ; +0xcc, 0x1003f3458\nLDR             X8, [X20]                                              ; +0xd0, 0x1003f345c\nLDR             X8, [X8,#0x630]                                        ; +0xd4, 0x1003f3460\nMOV             X0, X20                                                ; +0xd8, 0x1003f3464\nMOV             X1, X21                                                ; +0xdc, 0x1003f3468\nBLR             X8                                                     ; +0xe0, 0x1003f346c\nCMP             W0, #1                                                 ; +0xe4, 0x1003f3470\nB.NE            loc_1003F3494                                          ; +0xe8, 0x1003f3474\nLDR             X0, [X19,#0x4E8]                                       ; +0xec, 0x1003f3478\nLDR             X8, [X0]                                               ; +0xf0, 0x1003f347c\nLDR             X8, [X8,#0x518]                                        ; +0xf4, 0x1003f3480\nMOV             X1, X20                                                ; +0xf8, 0x1003f3484\nMOV             X2, X21                                                ; +0xfc, 0x1003f3488\nMOV             W3, #0                                                 ; +0x100, 0x1003f348c\nBLR             X8                                                     ; +0x104, 0x1003f3490\nADD             X22, X22, #8                                           ; +0x108, 0x1003f3494\nCMP             X22, X23                                               ; +0x10c, 0x1003f3498\nB.LS            loc_1003F3430                                          ; +0x110, 0x1003f349c\nMOV             X0, X19                                                ; +0x114, 0x1003f34a0\nBL              EditorUI__updateObjectInfoLabel                        ; +0x118, 0x1003f34a4\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x11c, 0x1003f34a8\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x120, 0x1003f34ac\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x124, 0x1003f34b0\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x128, 0x1003f34b4\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x12c, 0x1003f34b8\nRET                                                                    ; +0x130, 0x1003f34bc", "xrefs": ["EditorPauseLayer::onNewGroupX @ 0x10039e0cc", "EditorPauseLayer::onNewGroupY @ 0x10039e0dc"], "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"}