{"type": "func", "start": 5370398608, "end": 5370398896, "name": "GameObject::addToGroup", "pseudocode": "// \n// GameObject::addToGroup from 0x14019c790 to 0x14019c8b0 (288 bytes)\n// \n// 52 xrefs:\n// > TeleportPortalObject::addToGroup2 @ 0x1404b25b0\n// > TeleportPortalObject::addToGroup @ 0x1404b264b\n// > <???> @ 0x140556948\n// > <???> @ 0x1405570b8\n// > <???> @ 0x14055e0f0\n// > <???> @ 0x14055e770\n// > <???> @ 0x1405c8808\n// > <???> @ 0x14060d998\n// > <???> @ 0x14060e2e8\n// > <???> @ 0x14060ea08\n// > <???> @ 0x14060f240\n// > <???> @ 0x14060f8e8\n// > <???> @ 0x14060ffb8\n// > <???> @ 0x140610670\n// > <???> @ 0x140610db8\n// > <???> @ 0x140611d50\n// > <???> @ 0x140612538\n// > <???> @ 0x140612be0\n// > <???> @ 0x140613288\n// > <???> @ 0x1406139f8\n// > <???> @ 0x1406140a0\n// > <???> @ 0x140614888\n// > <???> @ 0x1406150c0\n// > <???> @ 0x140615808\n// > <???> @ 0x140615eb0\n// > <???> @ 0x1406165f8\n// > <???> @ 0x140616db8\n// > <???> @ 0x140617460\n// > <???> @ 0x140617b08\n// > <???> @ 0x140618278\n// > <???> @ 0x140618920\n// > <???> @ 0x140619068\n// > <???> @ 0x140619b08\n// > <???> @ 0x14061a1b0\n// > <???> @ 0x14061a858\n// > <???> @ 0x14061af78\n// > <???> @ 0x14061b620\n// > <???> @ 0x14061bd68\n// > <???> @ 0x14061c500\n// > <???> @ 0x14061cba8\n// > <???> @ 0x14061d250\n// > <???> @ 0x14061d8f8\n// > <???> @ 0x14061dfa0\n// > <???> @ 0x14061e648\n// > <???> @ 0x14061ecf0\n// > <???> @ 0x14061f500\n// > <???> @ 0x14061fc98\n// > <???> @ 0x140679240\n// > <???> @ 0x140679254\n// > <???> @ 0x140679264\n// > <???> @ 0x1406cbda8\n// > <???> @ 0x1406cbdb4\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\nint GameObject::addToGroup(GameObject *a1, int a2)\n{\n  int v4; // ebx\n  std::array<short, 10> *v5; // rax\n  __int64 m_groupCount; // r8\n  std::array<short, 10> *m_groups; // rcx\n\n  if ( a1->m_groupCount >= 10 || (unsigned int)(a2 - 1) > 0x270E )\n    return 0;\n  v4 = 0;\n  if ( !a1->m_groups )\n  {\n    v5 = (std::array<short, 10> *)operator new(0x14u);\n    a1->m_groups = v5;\n    v5->_Elems[0] = 0;\n    a1->m_groups->_Elems[1] = 0;\n    a1->m_groups->_Elems[2] = 0;\n    a1->m_groups->_Elems[3] = 0;\n    a1->m_groups->_Elems[4] = 0;\n    a1->m_groups->_Elems[5] = 0;\n    a1->m_groups->_Elems[6] = 0;\n    a1->m_groups->_Elems[7] = 0;\n    a1->m_groups->_Elems[8] = 0;\n    a1->m_groups->_Elems[9] = 0;\n  }\n  m_groupCount = a1->m_groupCount;\n  if ( (int)m_groupCount <= 0 )\n  {\nLABEL_9:\n    a1->m_groups->_Elems[m_groupCount] = a2;\n    ++a1->m_groupCount;\n    return 1;\n  }\n  else\n  {\n    m_groups = a1->m_groups;\n    while ( m_groups->_Elems[0] != a2 )\n    {\n      ++v4;\n      m_groups = (std::array<short, 10> *)((char *)m_groups + 2);\n      if ( v4 >= (int)m_groupCount )\n        goto LABEL_9;\n    }\n    return -1;\n  }\n}", "assembly": "; \n; GameObject::addToGroup from 0x14019c790 to 0x14019c8b0 (288 bytes)\n; \n; 52 xrefs:\n; > TeleportPortalObject::addToGroup2 @ 0x1404b25b0\n; > TeleportPortalObject::addToGroup @ 0x1404b264b\n; > <???> @ 0x140556948\n; > <???> @ 0x1405570b8\n; > <???> @ 0x14055e0f0\n; > <???> @ 0x14055e770\n; > <???> @ 0x1405c8808\n; > <???> @ 0x14060d998\n; > <???> @ 0x14060e2e8\n; > <???> @ 0x14060ea08\n; > <???> @ 0x14060f240\n; > <???> @ 0x14060f8e8\n; > <???> @ 0x14060ffb8\n; > <???> @ 0x140610670\n; > <???> @ 0x140610db8\n; > <???> @ 0x140611d50\n; > <???> @ 0x140612538\n; > <???> @ 0x140612be0\n; > <???> @ 0x140613288\n; > <???> @ 0x1406139f8\n; > <???> @ 0x1406140a0\n; > <???> @ 0x140614888\n; > <???> @ 0x1406150c0\n; > <???> @ 0x140615808\n; > <???> @ 0x140615eb0\n; > <???> @ 0x1406165f8\n; > <???> @ 0x140616db8\n; > <???> @ 0x140617460\n; > <???> @ 0x140617b08\n; > <???> @ 0x140618278\n; > <???> @ 0x140618920\n; > <???> @ 0x140619068\n; > <???> @ 0x140619b08\n; > <???> @ 0x14061a1b0\n; > <???> @ 0x14061a858\n; > <???> @ 0x14061af78\n; > <???> @ 0x14061b620\n; > <???> @ 0x14061bd68\n; > <???> @ 0x14061c500\n; > <???> @ 0x14061cba8\n; > <???> @ 0x14061d250\n; > <???> @ 0x14061d8f8\n; > <???> @ 0x14061dfa0\n; > <???> @ 0x14061e648\n; > <???> @ 0x14061ecf0\n; > <???> @ 0x14061f500\n; > <???> @ 0x14061fc98\n; > <???> @ 0x140679240\n; > <???> @ 0x140679254\n; > <???> @ 0x140679264\n; > <???> @ 0x1406cbda8\n; > <???> @ 0x1406cbdb4\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], rsi                                               ; +0x0, 0x14019c790\npush    rdi                                                            ; +0x5, 0x14019c795\nsub     rsp, 20h                                                       ; +0x6, 0x14019c796\ncmp     word ptr [rcx+498h], 0Ah                                       ; +0xa, 0x14019c79a\nmov     esi, edx                                                       ; +0x12, 0x14019c7a2\nmov     rdi, rcx                                                       ; +0x14, 0x14019c7a4\njge     loc_14019C8A3                                                  ; +0x17, 0x14019c7a7\nlea     eax, [rdx-1]                                                   ; +0x1d, 0x14019c7ad\ncmp     eax, 270Eh                                                     ; +0x20, 0x14019c7b0\nja      loc_14019C8A3                                                  ; +0x25, 0x14019c7b5\nmov     [rsp+28h+arg_0], rbx                                           ; +0x2b, 0x14019c7bb\nxor     ebx, ebx                                                       ; +0x30, 0x14019c7c0\ncmp     [rcx+490h], rbx                                                ; +0x32, 0x14019c7c2\njnz     short loc_14019C840                                            ; +0x39, 0x14019c7c9\nlea     ecx, [rbx+14h]; Size                                           ; +0x3b, 0x14019c7cb\ncall    j_??2@YAPEAX_K@Z; operator new(unsigned __int64)               ; +0x3e, 0x14019c7ce\nmov     [rdi+490h], rax                                                ; +0x43, 0x14019c7d3\nmov     [rax], bx                                                      ; +0x4a, 0x14019c7da\nmov     rax, [rdi+490h]                                                ; +0x4d, 0x14019c7dd\nmov     [rax+2], bx                                                    ; +0x54, 0x14019c7e4\nmov     rax, [rdi+490h]                                                ; +0x58, 0x14019c7e8\nmov     [rax+4], bx                                                    ; +0x5f, 0x14019c7ef\nmov     rax, [rdi+490h]                                                ; +0x63, 0x14019c7f3\nmov     [rax+6], bx                                                    ; +0x6a, 0x14019c7fa\nmov     rax, [rdi+490h]                                                ; +0x6e, 0x14019c7fe\nmov     [rax+8], bx                                                    ; +0x75, 0x14019c805\nmov     rax, [rdi+490h]                                                ; +0x79, 0x14019c809\nmov     [rax+0Ah], bx                                                  ; +0x80, 0x14019c810\nmov     rax, [rdi+490h]                                                ; +0x84, 0x14019c814\nmov     [rax+0Ch], bx                                                  ; +0x8b, 0x14019c81b\nmov     rax, [rdi+490h]                                                ; +0x8f, 0x14019c81f\nmov     [rax+0Eh], bx                                                  ; +0x96, 0x14019c826\nmov     rax, [rdi+490h]                                                ; +0x9a, 0x14019c82a\nmov     [rax+10h], bx                                                  ; +0xa1, 0x14019c831\nmov     rax, [rdi+490h]                                                ; +0xa5, 0x14019c835\nmov     [rax+12h], bx                                                  ; +0xac, 0x14019c83c\nmovsx   r8, word ptr [rdi+498h]                                        ; +0xb0, 0x14019c840\ntest    r8d, r8d                                                       ; +0xb8, 0x14019c848\njle     short loc_14019C866                                            ; +0xbb, 0x14019c84b\nmov     rcx, [rdi+490h]                                                ; +0xbd, 0x14019c84d\nmovsx   eax, word ptr [rcx]                                            ; +0xc4, 0x14019c854\ncmp     eax, esi                                                       ; +0xc7, 0x14019c857\njz      short loc_14019C88E                                            ; +0xc9, 0x14019c859\ninc     ebx                                                            ; +0xcb, 0x14019c85b\nadd     rcx, 2                                                         ; +0xcd, 0x14019c85d\ncmp     ebx, r8d                                                       ; +0xd1, 0x14019c861\njl      short loc_14019C854                                            ; +0xd4, 0x14019c864\nmov     rax, [rdi+490h]                                                ; +0xd6, 0x14019c866\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xdd, 0x14019c86d\nmov     [rax+r8*2], si                                                 ; +0xe2, 0x14019c872\nmov     eax, 1                                                         ; +0xe7, 0x14019c877\ninc     word ptr [rdi+498h]                                            ; +0xec, 0x14019c87c\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xf3, 0x14019c883\nadd     rsp, 20h                                                       ; +0xf8, 0x14019c888\npop     rdi                                                            ; +0xfc, 0x14019c88c\nretn                                                                   ; +0xfd, 0x14019c88d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xfe, 0x14019c88e\nmov     eax, 0FFFFFFFFh                                                ; +0x103, 0x14019c893\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x108, 0x14019c898\nadd     rsp, 20h                                                       ; +0x10d, 0x14019c89d\npop     rdi                                                            ; +0x111, 0x14019c8a1\nretn                                                                   ; +0x112, 0x14019c8a2\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x113, 0x14019c8a3\nxor     eax, eax                                                       ; +0x118, 0x14019c8a8\nadd     rsp, 20h                                                       ; +0x11a, 0x14019c8aa\npop     rdi                                                            ; +0x11e, 0x14019c8ae\nretn                                                                   ; +0x11f, 0x14019c8af", "xrefs": ["TeleportPortalObject::addToGroup2 @ 0x1404b25b0", "TeleportPortalObject::addToGroup @ 0x1404b264b", "<???> @ 0x140556948", "<???> @ 0x1405570b8", "<???> @ 0x14055e0f0", "<???> @ 0x14055e770", "<???> @ 0x1405c8808", "<???> @ 0x14060d998", "<???> @ 0x14060e2e8", "<???> @ 0x14060ea08", "<???> @ 0x14060f240", "<???> @ 0x14060f8e8", "<???> @ 0x14060ffb8", "<???> @ 0x140610670", "<???> @ 0x140610db8", "<???> @ 0x140611d50", "<???> @ 0x140612538", "<???> @ 0x140612be0", "<???> @ 0x140613288", "<???> @ 0x1406139f8", "<???> @ 0x1406140a0", "<???> @ 0x140614888", "<???> @ 0x1406150c0", "<???> @ 0x140615808", "<???> @ 0x140615eb0", "<???> @ 0x1406165f8", "<???> @ 0x140616db8", "<???> @ 0x140617460", "<???> @ 0x140617b08", "<???> @ 0x140618278", "<???> @ 0x140618920", "<???> @ 0x140619068", "<???> @ 0x140619b08", "<???> @ 0x14061a1b0", "<???> @ 0x14061a858", "<???> @ 0x14061af78", "<???> @ 0x14061b620", "<???> @ 0x14061bd68", "<???> @ 0x14061c500", "<???> @ 0x14061cba8", "<???> @ 0x14061d250", "<???> @ 0x14061d8f8", "<???> @ 0x14061dfa0", "<???> @ 0x14061e648", "<???> @ 0x14061ecf0", "<???> @ 0x14061f500", "<???> @ 0x14061fc98", "<???> @ 0x140679240", "<???> @ 0x140679254", "<???> @ 0x140679264", "<???> @ 0x1406cbda8", "<???> @ 0x1406cbdb4"], "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"}