{"type": "func", "start": 4295250704, "end": 4295251074, "name": "EditorUI::assignNewGroups", "pseudocode": "// \n// EditorUI::assignNewGroups from 0x100045310 to 0x100045482 (370 bytes)\n// \n// 2 xrefs:\n// > EditorPauseLayer::onNewGroupX @ 0x100293fe5\n// > EditorPauseLayer::onNewGroupY @ 0x100294008\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// local variable allocation has failed, the output may be wrong!\nvoid __fastcall EditorUI::assignNewGroups(EditorUI *a1, bool a2)\n{\n  EditorUI *v3; // rbx\n  __int64 v4; // rax\n  __int64 v5; // r15\n  GameObject *m_selectedObject; // rsi\n  int (__cdecl *v7)(const void *, const void *); // rcx\n  unsigned int *v8; // rax\n  __int64 *v9; // r13\n  __int64 v10; // r15\n  LevelEditorLayer *m_editorLayer; // rdi\n  unsigned int NextFreeGroupID; // r12d\n  std::__hash_node_base<std::__hash_node<int, void *> *>::__next_pointer next; // rdi\n  std::__hash_node_base<std::__hash_node<int, void *> *> *v14; // r14\n  std::__hash_node_base<std::__hash_node<int, void *> *> **value; // rdi\n  std::unordered_set<int> v16; // [rsp+0h] [rbp-60h] BYREF\n  __int64 *v17; // [rsp+30h] [rbp-30h]\n\n  v3 = a1;\n  if ( a1->m_selectedObject || (a1 = (EditorUI *)a1->m_selectedObjects, (unsigned int)sub_100720070(a1)) )\n  {\n    v4 = sub_10071F9E0(a1, a2);\n    v5 = v4;\n    m_selectedObject = v3->m_selectedObject;\n    if ( m_selectedObject )\n      sub_10071FCD0(v4, m_selectedObject);\n    else\n      sub_100720050(v4, v3->m_selectedObjects);\n    v7 = (int (__cdecl *)(const void *, const void *))sub_100008B30;\n    if ( a2 )\n      v7 = (int (__cdecl *)(const void *, const void *))sub_100008B80;\n    qsort(*(void **)(*(_QWORD *)(v5 + 56) + 16LL), **(unsigned int **)(v5 + 56), 8u, v7);\n    v8 = *(unsigned int **)(v5 + 56);\n    if ( *v8 )\n    {\n      v9 = *((__int64 **)v8 + 2);\n      v17 = &v9[*v8 - 1];\n      do\n      {\n        v10 = *v9;\n        if ( !*v9 )\n          break;\n        m_editorLayer = v3->m_editorLayer;\n        memset(&v16, 0, 32);\n        v16.__table_.__p3_.__value_ = 1.0;\n        NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(m_editorLayer, &v16);\n        next = v16.__table_.__p1_.__value_.__next_;\n        if ( v16.__table_.__p1_.__value_.__next_ )\n        {\n          do\n          {\n            v14 = next->__next_;\n            operator delete(next);\n            next = v14;\n          }\n          while ( v14 );\n        }\n        value = v16.__table_.__bucket_list_.__ptr_.__value_;\n        v16.__table_.__bucket_list_.__ptr_.__value_ = nullptr;\n        if ( value )\n          operator delete(value);\n        if ( (*(unsigned int (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 1584LL))(v10, NextFreeGroupID) == 1 )\n          ((void (__fastcall *)(LevelEditorLayer *, __int64, _QWORD, _QWORD))v3->m_editorLayer->addToGroup)(\n            v3->m_editorLayer,\n            v10,\n            NextFreeGroupID,\n            0);\n        ++v9;\n      }\n      while ( v9 <= v17 );\n    }\n    EditorUI::updateObjectInfoLabel(v3);\n  }\n}", "assembly": "; \n; EditorUI::assignNewGroups from 0x100045310 to 0x100045482 (370 bytes)\n; \n; 2 xrefs:\n; > EditorPauseLayer::onNewGroupX @ 0x100293fe5\n; > EditorPauseLayer::onNewGroupY @ 0x100294008\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\npush    rbp                                                            ; +0x0, 0x100045310\nmov     rbp, rsp                                                       ; +0x1, 0x100045311\npush    r15                                                            ; +0x4, 0x100045314\npush    r14                                                            ; +0x6, 0x100045316\npush    r13                                                            ; +0x8, 0x100045318\npush    r12                                                            ; +0xa, 0x10004531a\npush    rbx                                                            ; +0xc, 0x10004531c\nsub     rsp, 38h                                                       ; +0xd, 0x10004531d\nmov     r14d, esi                                                      ; +0x11, 0x100045321\nmov     rbx, rdi                                                       ; +0x14, 0x100045324\ncmp     qword ptr [rdi+520h], 0                                        ; +0x17, 0x100045327\njnz     short loc_100045345                                            ; +0x1f, 0x10004532f\nmov     rdi, [rbx+328h]                                                ; +0x21, 0x100045331\ncall    sub_100720070                                                  ; +0x28, 0x100045338\ntest    eax, eax                                                       ; +0x2d, 0x10004533d\njz      loc_100045473                                                  ; +0x2f, 0x10004533f\ncall    sub_10071F9E0                                                  ; +0x35, 0x100045345\nmov     r15, rax                                                       ; +0x3a, 0x10004534a\nmov     rsi, [rbx+520h]                                                ; +0x3d, 0x10004534d\ntest    rsi, rsi                                                       ; +0x44, 0x100045354\njz      short loc_100045363                                            ; +0x47, 0x100045357\nmov     rdi, r15                                                       ; +0x49, 0x100045359\ncall    sub_10071FCD0                                                  ; +0x4c, 0x10004535c\njmp     short loc_100045372                                            ; +0x51, 0x100045361\nmov     rsi, [rbx+328h]                                                ; +0x53, 0x100045363\nmov     rdi, r15                                                       ; +0x5a, 0x10004536a\ncall    sub_100720050                                                  ; +0x5d, 0x10004536d\nmov     rax, [r15+38h]                                                 ; +0x62, 0x100045372\nmov     rdi, [rax+10h]; __base                                         ; +0x66, 0x100045376\nmov     esi, [rax]; __nel                                              ; +0x6a, 0x10004537a\nlea     rax, sub_100008B80                                             ; +0x6c, 0x10004537c\nlea     rcx, sub_100008B30                                             ; +0x73, 0x100045383\ntest    r14b, r14b                                                     ; +0x7a, 0x10004538a\ncmovnz  rcx, rax; __compar                                             ; +0x7d, 0x10004538d\nmov     edx, 8; __width                                                ; +0x81, 0x100045391\ncall    _qsort                                                         ; +0x86, 0x100045396\nmov     rax, [r15+38h]                                                 ; +0x8b, 0x10004539b\nmov     ecx, [rax]                                                     ; +0x8f, 0x10004539f\ntest    rcx, rcx                                                       ; +0x91, 0x1000453a1\njz      loc_10004546B                                                  ; +0x94, 0x1000453a4\nmov     r13, [rax+10h]                                                 ; +0x9a, 0x1000453aa\nlea     rax, ds:0FFFFFFFFFFFFFFF8h[rcx*8]                              ; +0x9e, 0x1000453ae\nadd     rax, r13                                                       ; +0xa6, 0x1000453b6\nmov     [rbp+var_30], rax                                              ; +0xa9, 0x1000453b9\njmp     short loc_1000453CE                                            ; +0xad, 0x1000453bd\nalign 20h                                                              ; +0xaf, 0x1000453bf\nadd     r13, 8                                                         ; +0xb0, 0x1000453c0\ncmp     r13, [rbp+var_30]                                              ; +0xb4, 0x1000453c4\nja      loc_10004546B                                                  ; +0xb8, 0x1000453c8\nmov     r15, [r13+0]                                                   ; +0xbe, 0x1000453ce\ntest    r15, r15                                                       ; +0xc2, 0x1000453d2\njz      loc_10004546B                                                  ; +0xc5, 0x1000453d5\nmov     rdi, [rbx+4E8h]                                                ; +0xcb, 0x1000453db\nxorps   xmm0, xmm0                                                     ; +0xd2, 0x1000453e2\nmovaps  xmmword ptr [rbp+__p], xmm0                                    ; +0xd5, 0x1000453e5\nmovaps  xmmword ptr [rbp+var_60], xmm0                                 ; +0xd9, 0x1000453e9\nmov     [rbp+var_40], 3F800000h                                        ; +0xdd, 0x1000453ed\nlea     rsi, [rbp+var_60]                                              ; +0xe4, 0x1000453f4\ncall    LevelEditorLayer__getNextFreeGroupID                           ; +0xe8, 0x1000453f8\nmov     r12d, eax                                                      ; +0xed, 0x1000453fd\nmov     rdi, [rbp+__p]; __p                                            ; +0xf0, 0x100045400\ntest    rdi, rdi                                                       ; +0xf4, 0x100045404\njz      short loc_100045420                                            ; +0xf7, 0x100045407\nnop     dword ptr [rax+00000000h]                                      ; +0xf9, 0x100045409\nmov     r14, [rdi]                                                     ; +0x100, 0x100045410\ncall    __ZdlPv; operator delete(void *)                               ; +0x103, 0x100045413\nmov     rdi, r14                                                       ; +0x108, 0x100045418\ntest    r14, r14                                                       ; +0x10b, 0x10004541b\njnz     short loc_100045410                                            ; +0x10e, 0x10004541e\nmov     rdi, [rbp+var_60]; __p                                         ; +0x110, 0x100045420\nmov     [rbp+var_60], 0                                                ; +0x114, 0x100045424\ntest    rdi, rdi                                                       ; +0x11c, 0x10004542c\njz      short loc_100045436                                            ; +0x11f, 0x10004542f\ncall    __ZdlPv; operator delete(void *)                               ; +0x121, 0x100045431\nmov     rax, [r15]                                                     ; +0x126, 0x100045436\nmov     rdi, r15                                                       ; +0x129, 0x100045439\nmov     esi, r12d                                                      ; +0x12c, 0x10004543c\ncall    qword ptr [rax+630h]                                           ; +0x12f, 0x10004543f\ncmp     eax, 1                                                         ; +0x135, 0x100045445\njnz     loc_1000453C0                                                  ; +0x138, 0x100045448\nmov     rdi, [rbx+4E8h]                                                ; +0x13e, 0x10004544e\nmov     rax, [rdi]                                                     ; +0x145, 0x100045455\nmov     rsi, r15                                                       ; +0x148, 0x100045458\nmov     edx, r12d                                                      ; +0x14b, 0x10004545b\nxor     ecx, ecx                                                       ; +0x14e, 0x10004545e\ncall    qword ptr [rax+510h]                                           ; +0x150, 0x100045460\njmp     loc_1000453C0                                                  ; +0x156, 0x100045466\nmov     rdi, rbx                                                       ; +0x15b, 0x10004546b\ncall    EditorUI__updateObjectInfoLabel                                ; +0x15e, 0x10004546e\nadd     rsp, 38h                                                       ; +0x163, 0x100045473\npop     rbx                                                            ; +0x167, 0x100045477\npop     r12                                                            ; +0x168, 0x100045478\npop     r13                                                            ; +0x16a, 0x10004547a\npop     r14                                                            ; +0x16c, 0x10004547c\npop     r15                                                            ; +0x16e, 0x10004547e\npop     rbp                                                            ; +0x170, 0x100045480\nretn                                                                   ; +0x171, 0x100045481", "xrefs": ["EditorPauseLayer::onNewGroupX @ 0x100293fe5", "EditorPauseLayer::onNewGroupY @ 0x100294008"], "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"}