{"type": "func", "start": 4301848080, "end": 4301848231, "name": "GameObject::addToColorGroup", "pseudocode": "// \n// GameObject::addToColorGroup from 0x10068fe10 to 0x10068fea7 (151 bytes)\n// \n// 2 xrefs:\n// > sub_10007BFE0 @ 0x10007c15e\n// > GJBaseGameLayer::calculateColorGroups @ 0x1000fa21e\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 12:35:07 +0000\n// \n\nchar __fastcall GameObject::addToColorGroup(__int64 a1, int a2)\n{\n  __int64 v2; // r14\n  _DWORD *v3; // rax\n  __int64 v4; // rcx\n\n  v2 = *(__int16 *)(a1 + 1184);\n  LOBYTE(v3) = v2 >= 10;\n  if ( v2 < 10 && (unsigned int)(a2 - 10000) >= 0xFFFFD8F1 )\n  {\n    v3 = *(_DWORD **)(a1 + 1176);\n    if ( v3 )\n    {\n      if ( (__int16)v2 <= 0 )\n        goto LABEL_9;\n    }\n    else\n    {\n      v3 = operator new[](0x14u);\n      *(_QWORD *)(a1 + 1176) = v3;\n      *(_OWORD *)v3 = 0;\n      v3[4] = 0;\n      if ( (__int16)v2 <= 0 )\n      {\nLABEL_9:\n        *((_WORD *)v3 + v2) = a2;\n        ++*(_WORD *)(a1 + 1184);\n        return (char)v3;\n      }\n    }\n    v4 = 0;\n    while ( *((__int16 *)v3 + v4) != a2 )\n    {\n      if ( v2 == ++v4 )\n        goto LABEL_9;\n    }\n  }\n  return (char)v3;\n}", "assembly": "; \n; GameObject::addToColorGroup from 0x10068fe10 to 0x10068fea7 (151 bytes)\n; \n; 2 xrefs:\n; > sub_10007BFE0 @ 0x10007c15e\n; > GJBaseGameLayer::calculateColorGroups @ 0x1000fa21e\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 12:35:07 +0000\n; \npush    rbp                                                            ; +0x0, 0x10068fe10\nmov     rbp, rsp                                                       ; +0x1, 0x10068fe11\npush    r15                                                            ; +0x4, 0x10068fe14\npush    r14                                                            ; +0x6, 0x10068fe16\npush    rbx                                                            ; +0x8, 0x10068fe18\npush    rax                                                            ; +0x9, 0x10068fe19\nmov     ebx, esi                                                       ; +0xa, 0x10068fe1a\nmovsx   r14, word ptr [rdi+4A0h]                                       ; +0xc, 0x10068fe1c\ncmp     r14, 0Ah                                                       ; +0x14, 0x10068fe24\nsetnl   al                                                             ; +0x18, 0x10068fe28\nlea     ecx, [rbx-2710h]                                               ; +0x1b, 0x10068fe2b\ncmp     ecx, 0FFFFD8F1h                                                ; +0x21, 0x10068fe31\nsetb    cl                                                             ; +0x27, 0x10068fe37\nor      cl, al                                                         ; +0x2a, 0x10068fe3a\njnz     short loc_10068FE9C                                            ; +0x2c, 0x10068fe3c\nmov     rax, [rdi+498h]                                                ; +0x2e, 0x10068fe3e\ntest    rax, rax                                                       ; +0x35, 0x10068fe45\njz      short loc_10068FE52                                            ; +0x38, 0x10068fe48\ntest    r14w, r14w                                                     ; +0x3a, 0x10068fe4a\njg      short loc_10068FE7C                                            ; +0x3e, 0x10068fe4e\njmp     short loc_10068FE90                                            ; +0x40, 0x10068fe50\nmov     r15, rdi                                                       ; +0x42, 0x10068fe52\nmov     edi, 14h; __sz                                                 ; +0x45, 0x10068fe55\ncall    __Znam; operator new[](ulong)                                  ; +0x4a, 0x10068fe5a\nmov     rdi, r15                                                       ; +0x4f, 0x10068fe5f\nmov     [r15+498h], rax                                                ; +0x52, 0x10068fe62\nxorps   xmm0, xmm0                                                     ; +0x59, 0x10068fe69\nmovups  xmmword ptr [rax], xmm0                                        ; +0x5c, 0x10068fe6c\nmov     dword ptr [rax+10h], 0                                         ; +0x5f, 0x10068fe6f\ntest    r14w, r14w                                                     ; +0x66, 0x10068fe76\njle     short loc_10068FE90                                            ; +0x6a, 0x10068fe7a\nxor     ecx, ecx                                                       ; +0x6c, 0x10068fe7c\nxchg    ax, ax                                                         ; +0x6e, 0x10068fe7e\nmovsx   edx, word ptr [rax+rcx*2]                                      ; +0x70, 0x10068fe80\ncmp     edx, ebx                                                       ; +0x74, 0x10068fe84\njz      short loc_10068FE9C                                            ; +0x76, 0x10068fe86\ninc     rcx                                                            ; +0x78, 0x10068fe88\ncmp     r14, rcx                                                       ; +0x7b, 0x10068fe8b\njnz     short loc_10068FE80                                            ; +0x7e, 0x10068fe8e\nmov     [rax+r14*2], bx                                                ; +0x80, 0x10068fe90\ninc     word ptr [rdi+4A0h]                                            ; +0x85, 0x10068fe95\nadd     rsp, 8                                                         ; +0x8c, 0x10068fe9c\npop     rbx                                                            ; +0x90, 0x10068fea0\npop     r14                                                            ; +0x91, 0x10068fea1\npop     r15                                                            ; +0x93, 0x10068fea3\npop     rbp                                                            ; +0x95, 0x10068fea5\nretn                                                                   ; +0x96, 0x10068fea6", "xrefs": ["sub_10007BFE0 @ 0x10007c15e", "GJBaseGameLayer::calculateColorGroups @ 0x1000fa21e"], "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"}