{"type": "func", "start": 5372298064, "end": 5372298470, "name": "GJEffectManager::colorForGroupID", "pseudocode": "// \n// GJEffectManager::colorForGroupID from 0x14036c350 to 0x14036c4e6 (406 bytes)\n// \n// 6 xrefs:\n// > GameObject::colorForMode @ 0x14029efd1\n// > LevelEditorLayer::updateVisibility @ 0x1403f6be0\n// > LevelEditorLayer::updateObjectColors @ 0x1403f76a9\n// > <???> @ 0x1408bb170\n// > <???> @ 0x1408bb1a4\n// > <???> @ 0x14092198c\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:30:57 +0000\n// \n\n__int64 __fastcall GJEffectManager::colorForGroupID(_QWORD *a1, __int64 a2, int a3, __int16 *a4, char a5)\n{\n  __int64 v5; // rbx\n  int v6; // r10d\n  int v9; // eax\n  __int16 v11; // r8\n  char v12; // r9\n  __int64 v13; // rdx\n  __int64 *v14; // rcx\n  __int64 v15; // rax\n  __int64 v16; // rcx\n  __int64 v17; // rsi\n  __int64 v18; // rbx\n  char v19; // di\n  __int64 v20; // rax\n  char v21; // [rsp+40h] [rbp+8h] BYREF\n  __int16 v22; // [rsp+50h] [rbp+18h] BYREF\n  char v23; // [rsp+52h] [rbp+1Ah]\n\n  v5 = 0;\n  v6 = a3;\n  if ( a3 < 0 )\n    v6 = 0;\n  if ( v6 > 9999 )\n    v6 = 9999;\n  v9 = *(_DWORD *)(a1[98] + 4 * ((unsigned __int64)v6 >> 5));\n  if ( !_bittest(&v9, v6 & 0x1F) )\n  {\n    *(_WORD *)a2 = *a4;\n    *(_BYTE *)(a2 + 2) = *((_BYTE *)a4 + 2);\n    return a2;\n  }\n  v11 = *a4;\n  v12 = *((_BYTE *)a4 + 2);\n  v22 = v11;\n  v23 = v12;\n  v13 = a1[47];\n  v14 = (__int64 *)(a1[49]\n                  + 16\n                  * (a1[52]\n                   & (0x100000001B3LL\n                    * (((unsigned __int64)(unsigned int)v6 >> 24)\n                     ^ (0x100000001B3LL\n                      * ((0x100000001B3LL\n                        * ((0x100000001B3LL * ((unsigned __int8)v6 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(v6)))\n                       ^ BYTE2(v6)))))));\n  v15 = v14[1];\n  if ( v15 != v13 )\n  {\n    v16 = *v14;\n    if ( v6 == *(_DWORD *)(v15 + 16) )\n    {\nLABEL_11:\n      v5 = v15;\n    }\n    else\n    {\n      while ( v15 != v16 )\n      {\n        v15 = *(_QWORD *)(v15 + 8);\n        if ( v6 == *(_DWORD *)(v15 + 16) )\n          goto LABEL_11;\n      }\n    }\n  }\n  if ( v5 )\n  {\n    if ( v5 != v13 )\n    {\n      v17 = *(_QWORD *)(v5 + 32);\n      v18 = *(_QWORD *)(v5 + 24);\n      if ( v18 != v17 )\n      {\n        v19 = a5;\n        while ( *(_BYTE *)(v18 + 56) )\n        {\n          if ( v19 )\n            goto LABEL_22;\n          if ( *(_BYTE *)(v18 + 57) )\n            goto LABEL_21;\nLABEL_23:\n          v18 += 72;\n          if ( v18 == v17 )\n            goto LABEL_24;\n        }\n        if ( !*(_BYTE *)(v18 + 57) )\n          goto LABEL_22;\nLABEL_21:\n        if ( !v19 )\n        {\nLABEL_22:\n          v20 = GJEffectManager::colorForPulseEffect((__int64)a1, (__int64)&v21, (__int64)&v22, v18);\n          v11 = *(_WORD *)v20;\n          v12 = *(_BYTE *)(v20 + 2);\n          v22 = *(_WORD *)v20;\n          v23 = v12;\n          goto LABEL_23;\n        }\n        goto LABEL_23;\n      }\n    }\n  }\nLABEL_24:\n  *(_WORD *)a2 = v11;\n  *(_BYTE *)(a2 + 2) = v12;\n  return a2;\n}", "assembly": "; \n; GJEffectManager::colorForGroupID from 0x14036c350 to 0x14036c4e6 (406 bytes)\n; \n; 6 xrefs:\n; > GameObject::colorForMode @ 0x14029efd1\n; > LevelEditorLayer::updateVisibility @ 0x1403f6be0\n; > LevelEditorLayer::updateObjectColors @ 0x1403f76a9\n; > <???> @ 0x1408bb170\n; > <???> @ 0x1408bb1a4\n; > <???> @ 0x14092198c\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:30:57 +0000\n; \npush    rbx                                                            ; +0x0, 0x14036c350\npush    rbp                                                            ; +0x2, 0x14036c352\npush    r14                                                            ; +0x3, 0x14036c353\nsub     rsp, 20h                                                       ; +0x5, 0x14036c355\nxor     ebx, ebx                                                       ; +0x9, 0x14036c359\nmov     r10d, r8d                                                      ; +0xb, 0x14036c35b\ntest    r8d, r8d                                                       ; +0xe, 0x14036c35e\nmov     eax, 270Fh                                                     ; +0x11, 0x14036c361\nmov     r14, rdx                                                       ; +0x16, 0x14036c366\nmov     rbp, rcx                                                       ; +0x19, 0x14036c369\nmov     rdx, [rcx+310h]                                                ; +0x1c, 0x14036c36c\ncmovs   r10d, ebx                                                      ; +0x23, 0x14036c373\ncmp     r10d, eax                                                      ; +0x27, 0x14036c377\ncmovg   r10d, eax                                                      ; +0x2a, 0x14036c37a\nmovsxd  rax, r10d                                                      ; +0x2e, 0x14036c37e\nmov     r8, rax                                                        ; +0x31, 0x14036c381\nand     al, 1Fh                                                        ; +0x34, 0x14036c384\nshr     r8, 5                                                          ; +0x36, 0x14036c386\nmovzx   ecx, al                                                        ; +0x3a, 0x14036c38a\nmov     eax, [rdx+r8*4]                                                ; +0x3d, 0x14036c38d\nbt      eax, ecx                                                       ; +0x41, 0x14036c391\njb      short loc_14036C3B3                                            ; +0x44, 0x14036c394\nmovzx   eax, word ptr [r9]                                             ; +0x46, 0x14036c396\nmov     [r14], ax                                                      ; +0x4a, 0x14036c39a\nmovzx   eax, byte ptr [r9+2]                                           ; +0x4e, 0x14036c39e\nmov     [r14+2], al                                                    ; +0x53, 0x14036c3a3\nmov     rax, r14                                                       ; +0x57, 0x14036c3a7\nadd     rsp, 20h                                                       ; +0x5a, 0x14036c3aa\npop     r14                                                            ; +0x5e, 0x14036c3ae\npop     rbp                                                            ; +0x60, 0x14036c3b0\npop     rbx                                                            ; +0x61, 0x14036c3b1\nretn                                                                   ; +0x62, 0x14036c3b2\nmovzx   r8d, word ptr [r9]                                             ; +0x63, 0x14036c3b3\nmov     r11, 100000001B3h                                              ; +0x67, 0x14036c3b7\nmovzx   r9d, byte ptr [r9+2]                                           ; +0x71, 0x14036c3c1\nmov     eax, r10d                                                      ; +0x76, 0x14036c3c6\nshr     eax, 8                                                         ; +0x79, 0x14036c3c9\nmov     rcx, 0CBF29CE484222325h                                        ; +0x7c, 0x14036c3cc\nmovzx   edx, al                                                        ; +0x86, 0x14036c3d6\nmovzx   eax, r10b                                                      ; +0x89, 0x14036c3d9\nxor     rax, rcx                                                       ; +0x8d, 0x14036c3dd\nmov     [rsp+38h+arg_10], r8w                                          ; +0x90, 0x14036c3e0\nimul    rax, r11                                                       ; +0x96, 0x14036c3e6\nmov     [rsp+38h+arg_12], r9b                                          ; +0x9a, 0x14036c3ea\nxor     rdx, rax                                                       ; +0x9f, 0x14036c3ef\nmov     eax, r10d                                                      ; +0xa2, 0x14036c3f2\nshr     eax, 10h                                                       ; +0xa5, 0x14036c3f5\nmovzx   ecx, al                                                        ; +0xa8, 0x14036c3f8\nimul    rdx, r11                                                       ; +0xab, 0x14036c3fb\nmov     eax, r10d                                                      ; +0xaf, 0x14036c3ff\nxor     rcx, rdx                                                       ; +0xb2, 0x14036c402\nshr     rax, 18h                                                       ; +0xb5, 0x14036c405\nmov     rdx, [rbp+178h]                                                ; +0xb9, 0x14036c409\nimul    rcx, r11                                                       ; +0xc0, 0x14036c410\nxor     rcx, rax                                                       ; +0xc4, 0x14036c414\nimul    rcx, r11                                                       ; +0xc7, 0x14036c417\nand     rcx, [rbp+1A0h]                                                ; +0xcb, 0x14036c41b\nshl     rcx, 4                                                         ; +0xd2, 0x14036c422\nadd     rcx, [rbp+188h]                                                ; +0xd6, 0x14036c426\nmov     rax, [rcx+8]                                                   ; +0xdd, 0x14036c42d\ncmp     rax, rdx                                                       ; +0xe1, 0x14036c431\njz      short loc_14036C452                                            ; +0xe4, 0x14036c434\nmov     rcx, [rcx]                                                     ; +0xe6, 0x14036c436\ncmp     r10d, [rax+10h]                                                ; +0xe9, 0x14036c439\njz      short loc_14036C44F                                            ; +0xed, 0x14036c43d\nnop                                                                    ; +0xef, 0x14036c43f\ncmp     rax, rcx                                                       ; +0xf0, 0x14036c440\njz      short loc_14036C452                                            ; +0xf3, 0x14036c443\nmov     rax, [rax+8]                                                   ; +0xf5, 0x14036c445\ncmp     r10d, [rax+10h]                                                ; +0xf9, 0x14036c449\njnz     short loc_14036C440                                            ; +0xfd, 0x14036c44d\nmov     rbx, rax                                                       ; +0xff, 0x14036c44f\ntest    rbx, rbx                                                       ; +0x102, 0x14036c452\njz      short loc_14036C4D2                                            ; +0x105, 0x14036c455\ncmp     rbx, rdx                                                       ; +0x107, 0x14036c457\njz      short loc_14036C4D2                                            ; +0x10a, 0x14036c45a\nmov     [rsp+38h+arg_8], rsi                                           ; +0x10c, 0x14036c45c\nmov     rsi, [rbx+20h]                                                 ; +0x111, 0x14036c461\nmov     rbx, [rbx+18h]                                                 ; +0x115, 0x14036c465\ncmp     rbx, rsi                                                       ; +0x119, 0x14036c469\njz      short loc_14036C4CD                                            ; +0x11c, 0x14036c46c\nmov     [rsp+38h+arg_18], rdi                                          ; +0x11e, 0x14036c46e\nmovzx   edi, [rsp+38h+arg_20]                                          ; +0x123, 0x14036c473\ncmp     byte ptr [rbx+38h], 0                                          ; +0x128, 0x14036c478\njnz     short loc_14036C486                                            ; +0x12c, 0x14036c47c\ncmp     byte ptr [rbx+39h], 0                                          ; +0x12e, 0x14036c47e\njz      short loc_14036C496                                            ; +0x132, 0x14036c482\njmp     short loc_14036C491                                            ; +0x134, 0x14036c484\ntest    dil, dil                                                       ; +0x136, 0x14036c486\njnz     short loc_14036C496                                            ; +0x139, 0x14036c489\ncmp     [rbx+39h], dil                                                 ; +0x13b, 0x14036c48b\njz      short loc_14036C4BF                                            ; +0x13f, 0x14036c48f\ntest    dil, dil                                                       ; +0x141, 0x14036c491\njnz     short loc_14036C4BF                                            ; +0x144, 0x14036c494\nmov     r9, rbx                                                        ; +0x146, 0x14036c496\nlea     r8, [rsp+38h+arg_10]                                           ; +0x149, 0x14036c499\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x14e, 0x14036c49e\nmov     rcx, rbp                                                       ; +0x153, 0x14036c4a3\ncall    GJEffectManager__colorForPulseEffect                           ; +0x156, 0x14036c4a6\nmovzx   r8d, word ptr [rax]                                            ; +0x15b, 0x14036c4ab\nmovzx   r9d, byte ptr [rax+2]                                          ; +0x15f, 0x14036c4af\nmov     [rsp+38h+arg_10], r8w                                          ; +0x164, 0x14036c4b4\nmov     [rsp+38h+arg_12], r9b                                          ; +0x16a, 0x14036c4ba\nadd     rbx, 48h ; 'H'                                                 ; +0x16f, 0x14036c4bf\ncmp     rbx, rsi                                                       ; +0x173, 0x14036c4c3\njnz     short loc_14036C478                                            ; +0x176, 0x14036c4c6\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x178, 0x14036c4c8\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x17d, 0x14036c4cd\nmov     [r14], r8w                                                     ; +0x182, 0x14036c4d2\nmov     rax, r14                                                       ; +0x186, 0x14036c4d6\nmov     [r14+2], r9b                                                   ; +0x189, 0x14036c4d9\nadd     rsp, 20h                                                       ; +0x18d, 0x14036c4dd\npop     r14                                                            ; +0x191, 0x14036c4e1\npop     rbp                                                            ; +0x193, 0x14036c4e3\npop     rbx                                                            ; +0x194, 0x14036c4e4\nretn                                                                   ; +0x195, 0x14036c4e5", "xrefs": ["GameObject::colorForMode @ 0x14029efd1", "LevelEditorLayer::updateVisibility @ 0x1403f6be0", "LevelEditorLayer::updateObjectColors @ 0x1403f76a9", "<???> @ 0x1408bb170", "<???> @ 0x1408bb1a4", "<???> @ 0x14092198c"], "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"}