{"type": "func", "start": 5369860640, "end": 5369861002, "name": "EditorUI::assignNewGroups", "pseudocode": "// \n// EditorUI::assignNewGroups from 0x140119220 to 0x14011938a (362 bytes)\n// \n// 3 xrefs:\n// > EditorPauseLayer::onNewGroupX @ 0x1400dcd70\n// > EditorPauseLayer::onNewGroupY @ 0x1400dcd90\n// > <???> @ 0x1406c93e4\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::assignNewGroups(EditorUI *a1, bool a2)\n{\n  cocos2d::CCArray *v4; // rbx\n  GameObject *m_selectedObject; // rdx\n  int (__cdecl *v6)(const void *, const void *); // r9\n  __int64 v7; // r8\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  GameObject **arr; // rbx\n  GameObject **i; // rbp\n  GameObject *v12; // rdi\n  unsigned int NextFreeGroupID; // r14d\n  std::unordered_set<int> v14; // [rsp+20h] [rbp-58h] BYREF\n  int v15; // [rsp+80h] [rbp+8h] BYREF\n\n  if ( a1->m_selectedObject || cocos2d::CCArray::count(a1->m_selectedObjects) )\n  {\n    v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);\n    m_selectedObject = a1->m_selectedObject;\n    if ( m_selectedObject )\n      cocos2d::CCArray::addObject(v4, m_selectedObject);\n    else\n      cocos2d::CCArray::addObjectsFromArray(v4, a1->m_selectedObjects);\n    v6 = (int (__cdecl *)(const void *, const void *))sub_1400DF250;\n    if ( !a2 )\n      v6 = (int (__cdecl *)(const void *, const void *))sub_1400DF200;\n    qsort(v4->data->arr, v4->data->num, 8u, v6);\n    if ( v4 )\n    {\n      data = v4->data;\n      num = data->num;\n      if ( (_DWORD)num )\n      {\n        arr = (GameObject **)data->arr;\n        for ( i = &arr[num - 1]; arr <= i; ++arr )\n        {\n          v12 = *arr;\n          if ( !*arr )\n            break;\n          v15 = 0;\n          sub_14005E660((__int64)&v14, &v15, v7);\n          NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(a1->m_editorLayer, &v14);\n          sub_14005D100((__int64)&v14._Vec);\n          sub_14005D870((void **)&v14._List._Mypair._Myval2._Myhead);\n          if ( v12->addToGroup(v12, NextFreeGroupID) == 1 )\n            a1->m_editorLayer->addToGroup(a1->m_editorLayer, v12, NextFreeGroupID, 0);\n        }\n      }\n    }\n    EditorUI::updateObjectInfoLabel(a1);\n  }\n}", "assembly": "; \n; EditorUI::assignNewGroups from 0x140119220 to 0x14011938a (362 bytes)\n; \n; 3 xrefs:\n; > EditorPauseLayer::onNewGroupX @ 0x1400dcd70\n; > EditorPauseLayer::onNewGroupY @ 0x1400dcd90\n; > <???> @ 0x1406c93e4\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, 0x140119220\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140119225\npush    rsi                                                            ; +0xa, 0x14011922a\npush    rdi                                                            ; +0xb, 0x14011922b\npush    r14                                                            ; +0xc, 0x14011922c\nsub     rsp, 60h                                                       ; +0xe, 0x14011922e\nmovzx   ebp, dl                                                        ; +0x12, 0x140119232\nmov     rsi, rcx                                                       ; +0x15, 0x140119235\ncmp     qword ptr [rcx+538h], 0                                        ; +0x18, 0x140119238\njnz     short loc_140119257                                            ; +0x20, 0x140119240\nmov     rcx, [rcx+340h]                                                ; +0x22, 0x140119242\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x29, 0x140119249\ntest    eax, eax                                                       ; +0x2f, 0x14011924f\njz      loc_140119375                                                  ; +0x31, 0x140119251\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x37, 0x140119257\nmov     rbx, rax                                                       ; +0x3d, 0x14011925d\nmov     rdx, [rsi+538h]                                                ; +0x40, 0x140119260\nmov     rcx, rax                                                       ; +0x47, 0x140119267\ntest    rdx, rdx                                                       ; +0x4a, 0x14011926a\njz      short loc_140119277                                            ; +0x4d, 0x14011926d\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x4f, 0x14011926f\njmp     short loc_140119284                                            ; +0x55, 0x140119275\nmov     rdx, [rsi+340h]                                                ; +0x57, 0x140119277\ncall    cs:?addObjectsFromArray@CCArray@cocos2d@@QEAAXPEAV12@@Z; cocos2d::CCArray::addObjectsFromArray(cocos2d::CCArray *) ; +0x5e, 0x14011927e\nmov     rax, [rbx+38h]                                                 ; +0x64, 0x140119284\nmov     edx, [rax]; NumOfElements                                      ; +0x68, 0x140119288\nmov     rcx, [rax+10h]; Base                                           ; +0x6a, 0x14011928a\nmov     r8d, 8; SizeOfElements                                         ; +0x6e, 0x14011928e\ntest    bpl, bpl                                                       ; +0x74, 0x140119294\nlea     r9, sub_1400DF250                                              ; +0x77, 0x140119297\njnz     short loc_1401192A7                                            ; +0x7e, 0x14011929e\nlea     r9, sub_1400DF200; CompareFunction                             ; +0x80, 0x1401192a0\ncall    cs:qsort                                                       ; +0x87, 0x1401192a7\ntest    rbx, rbx                                                       ; +0x8d, 0x1401192ad\njz      loc_14011936D                                                  ; +0x90, 0x1401192b0\nmov     rbx, [rbx+38h]                                                 ; +0x96, 0x1401192b6\nmov     eax, [rbx]                                                     ; +0x9a, 0x1401192ba\ntest    eax, eax                                                       ; +0x9c, 0x1401192bc\njz      loc_14011936D                                                  ; +0x9e, 0x1401192be\nmov     rbx, [rbx+10h]                                                 ; +0xa4, 0x1401192c4\nlea     rbp, [rax-1]                                                   ; +0xa8, 0x1401192c8\nlea     rbp, [rbx+rbp*8]                                               ; +0xac, 0x1401192cc\ncmp     rbx, rbp                                                       ; +0xb0, 0x1401192d0\nja      loc_14011936D                                                  ; +0xb3, 0x1401192d3\nnop     dword ptr [rax+00000000h]                                      ; +0xb9, 0x1401192d9\nmov     rdi, [rbx]                                                     ; +0xc0, 0x1401192e0\ntest    rdi, rdi                                                       ; +0xc3, 0x1401192e3\njz      loc_14011936D                                                  ; +0xc6, 0x1401192e6\nmov     [rsp+78h+arg_0], 0                                             ; +0xcc, 0x1401192ec\nlea     rdx, [rsp+78h+arg_0]                                           ; +0xd7, 0x1401192f7\nlea     rcx, [rsp+78h+var_58]                                          ; +0xdf, 0x1401192ff\ncall    sub_14005E660                                                  ; +0xe4, 0x140119304\nnop                                                                    ; +0xe9, 0x140119309\nlea     rdx, [rsp+78h+var_58]                                          ; +0xea, 0x14011930a\nmov     rcx, [rsi+500h]                                                ; +0xef, 0x14011930f\ncall    LevelEditorLayer__getNextFreeGroupID                           ; +0xf6, 0x140119316\nmov     r14d, eax                                                      ; +0xfb, 0x14011931b\nlea     rcx, [rsp+78h+var_40]                                          ; +0xfe, 0x14011931e\ncall    sub_14005D100                                                  ; +0x103, 0x140119323\nlea     rcx, [rsp+78h+var_50]                                          ; +0x108, 0x140119328\ncall    sub_14005D870                                                  ; +0x10d, 0x14011932d\nmov     r8, [rdi]                                                      ; +0x112, 0x140119332\nmov     edx, r14d                                                      ; +0x115, 0x140119335\nmov     rcx, rdi                                                       ; +0x118, 0x140119338\ncall    qword ptr [r8+598h]                                            ; +0x11b, 0x14011933b\ncmp     eax, 1                                                         ; +0x122, 0x140119342\njnz     short loc_140119360                                            ; +0x125, 0x140119345\nmov     rcx, [rsi+500h]                                                ; +0x127, 0x140119347\nmov     rax, [rcx]                                                     ; +0x12e, 0x14011934e\nxor     r9d, r9d                                                       ; +0x131, 0x140119351\nmov     r8d, r14d                                                      ; +0x134, 0x140119354\nmov     rdx, rdi                                                       ; +0x137, 0x140119357\ncall    qword ptr [rax+480h]                                           ; +0x13a, 0x14011935a\nadd     rbx, 8                                                         ; +0x140, 0x140119360\ncmp     rbx, rbp                                                       ; +0x144, 0x140119364\njbe     loc_1401192E0                                                  ; +0x147, 0x140119367\nmov     rcx, rsi                                                       ; +0x14d, 0x14011936d\ncall    EditorUI__updateObjectInfoLabel                                ; +0x150, 0x140119370\nlea     r11, [rsp+78h+var_18]                                          ; +0x155, 0x140119375\nmov     rbx, [r11+28h]                                                 ; +0x15a, 0x14011937a\nmov     rbp, [r11+30h]                                                 ; +0x15e, 0x14011937e\nmov     rsp, r11                                                       ; +0x162, 0x140119382\npop     r14                                                            ; +0x165, 0x140119385\npop     rdi                                                            ; +0x167, 0x140119387\npop     rsi                                                            ; +0x168, 0x140119388\nretn                                                                   ; +0x169, 0x140119389", "xrefs": ["EditorPauseLayer::onNewGroupX @ 0x1400dcd70", "EditorPauseLayer::onNewGroupY @ 0x1400dcd90", "<???> @ 0x1406c93e4"], "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"}