{"type": "func", "start": 5371728848, "end": 5371729053, "name": "LevelEditorLayer::applyGroupState", "pseudocode": "// \n// LevelEditorLayer::applyGroupState from 0x1402e13d0 to 0x1402e149d (205 bytes)\n// \n// 8 xrefs:\n// > EditorUI::onPasteState @ 0x1401144fe\n// > EditorUI::onPasteState @ 0x140114537\n// > LevelEditorLayer::copyObjectState @ 0x1402e13b8\n// > SetGroupIDLayer::onPaste @ 0x1403fb7de\n// > SetGroupIDLayer::onPaste @ 0x1403fb817\n// > <???> @ 0x14068ef00\n// > <???> @ 0x14068ef10\n// > <???> @ 0x1406d3650\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 LevelEditorLayer::applyGroupState(LevelEditorLayer *a1, GameObject *a2, GameObject *a3)\n{\n  int v6; // ebp\n  __int64 v7; // rsi\n  unsigned __int64 v8; // rdi\n  std::array<short, 10> *m_groups; // rax\n  int v10; // ebx\n  _BOOL8 v11; // r9\n\n  GJBaseGameLayer::removeFromGroups(a1, a2);\n  a2->m_groupCount = 0;\n  v6 = 0;\n  a2->m_enabledGroupsCounter = 0;\n  a2->m_isGroupDisabled = 0;\n  if ( a3->m_groupCount > 0 )\n  {\n    v7 = 0;\n    v8 = 0;\n    do\n    {\n      if ( v8 <= 9 && (m_groups = a3->m_groups) != nullptr )\n        v10 = m_groups->_Elems[v7];\n      else\n        v10 = 0;\n      if ( a2->addToGroup(a2, v10) == 1 )\n      {\n        LOBYTE(v11) = 1;\n        a1->addToGroup(a1, a2, v10, v11);\n      }\n      ++v6;\n      ++v8;\n      ++v7;\n    }\n    while ( v6 < a3->m_groupCount );\n  }\n}", "assembly": "; \n; LevelEditorLayer::applyGroupState from 0x1402e13d0 to 0x1402e149d (205 bytes)\n; \n; 8 xrefs:\n; > EditorUI::onPasteState @ 0x1401144fe\n; > EditorUI::onPasteState @ 0x140114537\n; > LevelEditorLayer::copyObjectState @ 0x1402e13b8\n; > SetGroupIDLayer::onPaste @ 0x1403fb7de\n; > SetGroupIDLayer::onPaste @ 0x1403fb817\n; > <???> @ 0x14068ef00\n; > <???> @ 0x14068ef10\n; > <???> @ 0x1406d3650\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, 0x1402e13d0\npush    r12                                                            ; +0x2, 0x1402e13d2\npush    r13                                                            ; +0x4, 0x1402e13d4\npush    r14                                                            ; +0x6, 0x1402e13d6\npush    r15                                                            ; +0x8, 0x1402e13d8\nsub     rsp, 20h                                                       ; +0xa, 0x1402e13da\nmov     r14, r8                                                        ; +0xe, 0x1402e13de\nmov     r15, rdx                                                       ; +0x11, 0x1402e13e1\nmov     r12, rcx                                                       ; +0x14, 0x1402e13e4\ncall    GJBaseGameLayer__removeFromGroups                              ; +0x17, 0x1402e13e7\nxor     r13d, r13d                                                     ; +0x1c, 0x1402e13ec\nmov     [r15+498h], r13w                                               ; +0x1f, 0x1402e13ef\nmov     ebp, r13d                                                      ; +0x27, 0x1402e13f7\nmov     [r15+4C0h], r13d                                               ; +0x2a, 0x1402e13fa\nmov     [r15+28Eh], r13b                                               ; +0x31, 0x1402e1401\ncmp     r13w, [r14+498h]                                               ; +0x38, 0x1402e1408\njge     short loc_1402E148F                                            ; +0x40, 0x1402e1410\nmov     [rsp+48h+arg_0], rbx                                           ; +0x42, 0x1402e1412\nmov     [rsp+48h+arg_8], rsi                                           ; +0x47, 0x1402e1417\nmov     esi, r13d                                                      ; +0x4c, 0x1402e141c\nmov     [rsp+48h+arg_10], rdi                                          ; +0x4f, 0x1402e141f\nmov     edi, r13d                                                      ; +0x54, 0x1402e1424\ncmp     rdi, 9                                                         ; +0x57, 0x1402e1427\nja      short loc_1402E143F                                            ; +0x5b, 0x1402e142b\nmov     rax, [r14+490h]                                                ; +0x5d, 0x1402e142d\ntest    rax, rax                                                       ; +0x64, 0x1402e1434\njz      short loc_1402E143F                                            ; +0x67, 0x1402e1437\nmovsx   ebx, word ptr [rsi+rax]                                        ; +0x69, 0x1402e1439\njmp     short loc_1402E1442                                            ; +0x6d, 0x1402e143d\nmov     ebx, r13d                                                      ; +0x6f, 0x1402e143f\nmov     rax, [r15]                                                     ; +0x72, 0x1402e1442\nmov     edx, ebx                                                       ; +0x75, 0x1402e1445\nmov     rcx, r15                                                       ; +0x77, 0x1402e1447\ncall    qword ptr [rax+598h]                                           ; +0x7a, 0x1402e144a\ncmp     eax, 1                                                         ; +0x80, 0x1402e1450\njnz     short loc_1402E146B                                            ; +0x83, 0x1402e1453\nmov     rax, [r12]                                                     ; +0x85, 0x1402e1455\nmov     r9b, 1                                                         ; +0x89, 0x1402e1459\nmov     r8d, ebx                                                       ; +0x8c, 0x1402e145c\nmov     rdx, r15                                                       ; +0x8f, 0x1402e145f\nmov     rcx, r12                                                       ; +0x92, 0x1402e1462\ncall    qword ptr [rax+480h]                                           ; +0x95, 0x1402e1465\nmovsx   eax, word ptr [r14+498h]                                       ; +0x9b, 0x1402e146b\ninc     ebp                                                            ; +0xa3, 0x1402e1473\ninc     rdi                                                            ; +0xa5, 0x1402e1475\nadd     rsi, 2                                                         ; +0xa8, 0x1402e1478\ncmp     ebp, eax                                                       ; +0xac, 0x1402e147c\njl      short loc_1402E1427                                            ; +0xae, 0x1402e147e\nmov     rdi, [rsp+48h+arg_10]                                          ; +0xb0, 0x1402e1480\nmov     rsi, [rsp+48h+arg_8]                                           ; +0xb5, 0x1402e1485\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xba, 0x1402e148a\nadd     rsp, 20h                                                       ; +0xbf, 0x1402e148f\npop     r15                                                            ; +0xc3, 0x1402e1493\npop     r14                                                            ; +0xc5, 0x1402e1495\npop     r13                                                            ; +0xc7, 0x1402e1497\npop     r12                                                            ; +0xc9, 0x1402e1499\npop     rbp                                                            ; +0xcb, 0x1402e149b\nretn                                                                   ; +0xcc, 0x1402e149c", "xrefs": ["EditorUI::onPasteState @ 0x1401144fe", "EditorUI::onPasteState @ 0x140114537", "LevelEditorLayer::copyObjectState @ 0x1402e13b8", "SetGroupIDLayer::onPaste @ 0x1403fb7de", "SetGroupIDLayer::onPaste @ 0x1403fb817", "<???> @ 0x14068ef00", "<???> @ 0x14068ef10", "<???> @ 0x1406d3650"], "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"}