{"type": "func", "start": 5369898320, "end": 5369898585, "name": "EditorUI::onAssignNewGroupID", "pseudocode": "// \n// EditorUI::onAssignNewGroupID from 0x140122550 to 0x140122659 (265 bytes)\n// \n// 2 xrefs:\n// > EditorUI::keyDown @ 0x140125f7b\n// > <???> @ 0x1406c97f8\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\n// Hidden C++ exception states: #wind=1\nvoid EditorUI::onAssignNewGroupID(EditorUI *a1)\n{\n  GameObject *m_selectedObject; // rcx\n  struct cocos2d::CCArray *m_selectedObjects; // rdi\n  __int64 v4; // r8\n  unsigned int NextFreeGroupID; // r14d\n  unsigned int i; // ebx\n  GameObject *v7; // rsi\n  std::unordered_set<int> v8; // [rsp+20h] [rbp-58h] BYREF\n  int v9; // [rsp+80h] [rbp+8h] BYREF\n\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n    m_selectedObjects = cocos2d::CCArray::createWithObject(m_selectedObject);\n  else\n    m_selectedObjects = a1->m_selectedObjects;\n  if ( cocos2d::CCArray::count(m_selectedObjects) )\n  {\n    v9 = 0;\n    sub_14005E660((__int64)&v8, &v9, v4);\n    NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(a1->m_editorLayer, &v8);\n    sub_14005D100((__int64)&v8._Vec);\n    sub_14005D870((void **)&v8._List._Mypair._Myval2._Myhead);\n    for ( i = 0; i < cocos2d::CCArray::count(m_selectedObjects); ++i )\n    {\n      v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(m_selectedObjects, i);\n      if ( v7->addToGroup(v7, NextFreeGroupID) == 1 )\n        a1->m_editorLayer->addToGroup(a1->m_editorLayer, v7, NextFreeGroupID, 0);\n    }\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::onAssignNewGroupID from 0x140122550 to 0x140122659 (265 bytes)\n; \n; 2 xrefs:\n; > EditorUI::keyDown @ 0x140125f7b\n; > <???> @ 0x1406c97f8\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140122550\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140122555\npush    rsi                                                            ; +0xa, 0x14012255a\npush    rdi                                                            ; +0xb, 0x14012255b\npush    r14                                                            ; +0xc, 0x14012255c\nsub     rsp, 60h                                                       ; +0xe, 0x14012255e\nmov     rbp, rcx                                                       ; +0x12, 0x140122562\nmov     rcx, [rcx+538h]                                                ; +0x15, 0x140122565\ntest    rcx, rcx                                                       ; +0x1c, 0x14012256c\njz      short loc_14012257C                                            ; +0x1f, 0x14012256f\ncall    cs:?createWithObject@CCArray@cocos2d@@SAPEAV12@PEAVCCObject@2@@Z; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x21, 0x140122571\nmov     rdi, rax                                                       ; +0x27, 0x140122577\njmp     short loc_140122583                                            ; +0x2a, 0x14012257a\nmov     rdi, [rbp+340h]                                                ; +0x2c, 0x14012257c\nmov     rcx, rdi                                                       ; +0x33, 0x140122583\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x36, 0x140122586\ntest    eax, eax                                                       ; +0x3c, 0x14012258c\njz      loc_140122644                                                  ; +0x3e, 0x14012258e\nmov     [rsp+78h+arg_0], 0                                             ; +0x44, 0x140122594\nlea     rdx, [rsp+78h+arg_0]                                           ; +0x4f, 0x14012259f\nlea     rcx, [rsp+78h+var_58]                                          ; +0x57, 0x1401225a7\ncall    sub_14005E660                                                  ; +0x5c, 0x1401225ac\nnop                                                                    ; +0x61, 0x1401225b1\nlea     rdx, [rsp+78h+var_58]                                          ; +0x62, 0x1401225b2\nmov     rcx, [rbp+500h]                                                ; +0x67, 0x1401225b7\ncall    LevelEditorLayer__getNextFreeGroupID                           ; +0x6e, 0x1401225be\nmov     r14d, eax                                                      ; +0x73, 0x1401225c3\nlea     rcx, [rsp+78h+var_40]                                          ; +0x76, 0x1401225c6\ncall    sub_14005D100                                                  ; +0x7b, 0x1401225cb\nlea     rcx, [rsp+78h+var_50]                                          ; +0x80, 0x1401225d0\ncall    sub_14005D870                                                  ; +0x85, 0x1401225d5\nxor     ebx, ebx                                                       ; +0x8a, 0x1401225da\nmov     rcx, rdi                                                       ; +0x8c, 0x1401225dc\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x8f, 0x1401225df\ntest    eax, eax                                                       ; +0x95, 0x1401225e5\njz      short loc_14012263C                                            ; +0x97, 0x1401225e7\nnop     dword ptr [rax+00000000h]                                      ; +0x99, 0x1401225e9\nmov     edx, ebx                                                       ; +0xa0, 0x1401225f0\nmov     rcx, rdi                                                       ; +0xa2, 0x1401225f2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa5, 0x1401225f5\nmov     rsi, rax                                                       ; +0xab, 0x1401225fb\nmov     r8, [rax]                                                      ; +0xae, 0x1401225fe\nmov     edx, r14d                                                      ; +0xb1, 0x140122601\nmov     rcx, rax                                                       ; +0xb4, 0x140122604\ncall    qword ptr [r8+598h]                                            ; +0xb7, 0x140122607\ncmp     eax, 1                                                         ; +0xbe, 0x14012260e\njnz     short loc_14012262D                                            ; +0xc1, 0x140122611\nmov     rcx, [rbp+500h]                                                ; +0xc3, 0x140122613\nmov     r10, [rcx]                                                     ; +0xca, 0x14012261a\nxor     r9d, r9d                                                       ; +0xcd, 0x14012261d\nmov     r8d, r14d                                                      ; +0xd0, 0x140122620\nmov     rdx, rsi                                                       ; +0xd3, 0x140122623\ncall    qword ptr [r10+480h]                                           ; +0xd6, 0x140122626\ninc     ebx                                                            ; +0xdd, 0x14012262d\nmov     rcx, rdi                                                       ; +0xdf, 0x14012262f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe2, 0x140122632\ncmp     ebx, eax                                                       ; +0xe8, 0x140122638\njb      short loc_1401225F0                                            ; +0xea, 0x14012263a\nmov     rcx, rbp                                                       ; +0xec, 0x14012263c\ncall    EditorUI__updateObjectInfoLabel                                ; +0xef, 0x14012263f\nlea     r11, [rsp+78h+var_18]                                          ; +0xf4, 0x140122644\nmov     rbx, [r11+28h]                                                 ; +0xf9, 0x140122649\nmov     rbp, [r11+30h]                                                 ; +0xfd, 0x14012264d\nmov     rsp, r11                                                       ; +0x101, 0x140122651\npop     r14                                                            ; +0x104, 0x140122654\npop     rdi                                                            ; +0x106, 0x140122656\npop     rsi                                                            ; +0x107, 0x140122657\nretn                                                                   ; +0x108, 0x140122658", "xrefs": ["EditorUI::keyDown @ 0x140125f7b", "<???> @ 0x1406c97f8"], "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"}