{"type": "func", "start": 5372906928, "end": 5372907133, "name": "LevelEditorLayer::applyGroupState", "pseudocode": "// \n// LevelEditorLayer::applyGroupState from 0x140400db0 to 0x140400e7d (205 bytes)\n// \n// 8 xrefs:\n// > EditorUI::onPasteState @ 0x1401c7231\n// > EditorUI::onPasteState @ 0x1401c726a\n// > LevelEditorLayer::copyObjectState @ 0x140400d97\n// > SetGroupIDLayer::onPaste @ 0x140591a7f\n// > SetGroupIDLayer::onPaste @ 0x140591ab8\n// > <???> @ 0x1408c6ac8\n// > <???> @ 0x1408c6ad8\n// > <???> @ 0x140925a54\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:31:54 +0000\n// \n\nvoid __fastcall LevelEditorLayer::applyGroupState(__int64 a1, __int64 a2, __int64 a3)\n{\n  int v6; // ebp\n  __int64 v7; // rsi\n  unsigned __int64 v8; // rdi\n  __int64 v9; // rax\n  unsigned int v10; // ebx\n  __int64 v11; // r9\n\n  GJBaseGameLayer::removeFromGroups(a1, a2);\n  *(_WORD *)(a2 + 1176) = 0;\n  v6 = 0;\n  *(_DWORD *)(a2 + 1216) = 0;\n  *(_BYTE *)(a2 + 654) = 0;\n  if ( *(__int16 *)(a3 + 1176) > 0 )\n  {\n    v7 = 0;\n    v8 = 0;\n    do\n    {\n      if ( v8 <= 9 && (v9 = *(_QWORD *)(a3 + 1168)) != 0 )\n        v10 = *(__int16 *)(v7 + v9);\n      else\n        v10 = 0;\n      if ( (*(unsigned int (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a2 + 1448LL))(a2, v10) == 1 )\n      {\n        LOBYTE(v11) = 1;\n        (*(void (__fastcall **)(__int64, __int64, _QWORD, __int64))(*(_QWORD *)a1 + 1200LL))(a1, a2, v10, v11);\n      }\n      ++v6;\n      ++v8;\n      v7 += 2;\n    }\n    while ( v6 < *(__int16 *)(a3 + 1176) );\n  }\n}", "assembly": "; \n; LevelEditorLayer::applyGroupState from 0x140400db0 to 0x140400e7d (205 bytes)\n; \n; 8 xrefs:\n; > EditorUI::onPasteState @ 0x1401c7231\n; > EditorUI::onPasteState @ 0x1401c726a\n; > LevelEditorLayer::copyObjectState @ 0x140400d97\n; > SetGroupIDLayer::onPaste @ 0x140591a7f\n; > SetGroupIDLayer::onPaste @ 0x140591ab8\n; > <???> @ 0x1408c6ac8\n; > <???> @ 0x1408c6ad8\n; > <???> @ 0x140925a54\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:31:54 +0000\n; \npush    rbp                                                            ; +0x0, 0x140400db0\npush    r12                                                            ; +0x2, 0x140400db2\npush    r13                                                            ; +0x4, 0x140400db4\npush    r14                                                            ; +0x6, 0x140400db6\npush    r15                                                            ; +0x8, 0x140400db8\nsub     rsp, 20h                                                       ; +0xa, 0x140400dba\nmov     r14, r8                                                        ; +0xe, 0x140400dbe\nmov     r15, rdx                                                       ; +0x11, 0x140400dc1\nmov     r12, rcx                                                       ; +0x14, 0x140400dc4\ncall    GJBaseGameLayer__removeFromGroups                              ; +0x17, 0x140400dc7\nxor     r13d, r13d                                                     ; +0x1c, 0x140400dcc\nmov     [r15+498h], r13w                                               ; +0x1f, 0x140400dcf\nmov     ebp, r13d                                                      ; +0x27, 0x140400dd7\nmov     [r15+4C0h], r13d                                               ; +0x2a, 0x140400dda\nmov     [r15+28Eh], r13b                                               ; +0x31, 0x140400de1\ncmp     r13w, [r14+498h]                                               ; +0x38, 0x140400de8\njge     short loc_140400E6F                                            ; +0x40, 0x140400df0\nmov     [rsp+48h+arg_0], rbx                                           ; +0x42, 0x140400df2\nmov     [rsp+48h+arg_8], rsi                                           ; +0x47, 0x140400df7\nmov     esi, r13d                                                      ; +0x4c, 0x140400dfc\nmov     [rsp+48h+arg_10], rdi                                          ; +0x4f, 0x140400dff\nmov     edi, r13d                                                      ; +0x54, 0x140400e04\ncmp     rdi, 9                                                         ; +0x57, 0x140400e07\nja      short loc_140400E1F                                            ; +0x5b, 0x140400e0b\nmov     rax, [r14+490h]                                                ; +0x5d, 0x140400e0d\ntest    rax, rax                                                       ; +0x64, 0x140400e14\njz      short loc_140400E1F                                            ; +0x67, 0x140400e17\nmovsx   ebx, word ptr [rsi+rax]                                        ; +0x69, 0x140400e19\njmp     short loc_140400E22                                            ; +0x6d, 0x140400e1d\nmov     ebx, r13d                                                      ; +0x6f, 0x140400e1f\nmov     rax, [r15]                                                     ; +0x72, 0x140400e22\nmov     edx, ebx                                                       ; +0x75, 0x140400e25\nmov     rcx, r15                                                       ; +0x77, 0x140400e27\ncall    qword ptr [rax+5A8h]                                           ; +0x7a, 0x140400e2a\ncmp     eax, 1                                                         ; +0x80, 0x140400e30\njnz     short loc_140400E4B                                            ; +0x83, 0x140400e33\nmov     rax, [r12]                                                     ; +0x85, 0x140400e35\nmov     r9b, 1                                                         ; +0x89, 0x140400e39\nmov     r8d, ebx                                                       ; +0x8c, 0x140400e3c\nmov     rdx, r15                                                       ; +0x8f, 0x140400e3f\nmov     rcx, r12                                                       ; +0x92, 0x140400e42\ncall    qword ptr [rax+4B0h]                                           ; +0x95, 0x140400e45\nmovsx   eax, word ptr [r14+498h]                                       ; +0x9b, 0x140400e4b\ninc     ebp                                                            ; +0xa3, 0x140400e53\ninc     rdi                                                            ; +0xa5, 0x140400e55\nadd     rsi, 2                                                         ; +0xa8, 0x140400e58\ncmp     ebp, eax                                                       ; +0xac, 0x140400e5c\njl      short loc_140400E07                                            ; +0xae, 0x140400e5e\nmov     rdi, [rsp+48h+arg_10]                                          ; +0xb0, 0x140400e60\nmov     rsi, [rsp+48h+arg_8]                                           ; +0xb5, 0x140400e65\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xba, 0x140400e6a\nadd     rsp, 20h                                                       ; +0xbf, 0x140400e6f\npop     r15                                                            ; +0xc3, 0x140400e73\npop     r14                                                            ; +0xc5, 0x140400e75\npop     r13                                                            ; +0xc7, 0x140400e77\npop     r12                                                            ; +0xc9, 0x140400e79\npop     rbp                                                            ; +0xcb, 0x140400e7b\nretn                                                                   ; +0xcc, 0x140400e7c", "xrefs": ["EditorUI::onPasteState @ 0x1401c7231", "EditorUI::onPasteState @ 0x1401c726a", "LevelEditorLayer::copyObjectState @ 0x140400d97", "SetGroupIDLayer::onPaste @ 0x140591a7f", "SetGroupIDLayer::onPaste @ 0x140591ab8", "<???> @ 0x1408c6ac8", "<???> @ 0x1408c6ad8", "<???> @ 0x140925a54"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}