{"type": "func", "start": 4301890256, "end": 4301890644, "name": "GameObject::saveActiveColors", "pseudocode": "// \n// GameObject::saveActiveColors from 0x10069a2d0 to 0x10069a454 (388 bytes)\n// \n// 6 xrefs:\n// > EnhancedGameObject::saveActiveColors @ 0x10069da09\n// > <???> @ 0x100acb570\n// > <???> @ 0x100b2be98\n// > <???> @ 0x100b3d930\n// > <???> @ 0x100b844c0\n// > <???> @ 0x100b854d8\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:15 +0000\n// \n\n__int64 __fastcall GameObject::saveActiveColors(__int64 a1)\n{\n  __int64 v1; // rax\n  int v2; // ecx\n  unsigned int v3; // edx\n  __int64 v4; // rsi\n  bool v5; // cl\n  __int64 result; // rax\n  int v7; // edx\n\n  *(_DWORD *)(a1 + 924) = *(_DWORD *)(a1 + 920);\n  v1 = *(_QWORD *)(a1 + 1096);\n  v2 = 0;\n  v3 = 0;\n  if ( v1 )\n  {\n    v3 = *(_DWORD *)v1;\n    if ( !*(_DWORD *)v1 )\n      v3 = *(_DWORD *)(v1 + 4);\n  }\n  v4 = *(_QWORD *)(a1 + 1104);\n  if ( v4 )\n  {\n    v2 = *(_DWORD *)v4;\n    if ( !*(_DWORD *)v4 )\n      v2 = *(_DWORD *)(v4 + 4);\n  }\n  *(_QWORD *)(a1 + 656) = _mm_min_epi32(\n                            _mm_max_epi32((__m128i)0LL, _mm_insert_epi32(_mm_cvtsi32_si128(v3), v2, 1)),\n                            (__m128i)xmmword_100A0E2E0).u64[0];\n  *(_BYTE *)(a1 + 664) = *(_BYTE *)(v1 + 32);\n  if ( v4 )\n  {\n    *(_BYTE *)(a1 + 665) = *(_BYTE *)(v4 + 32);\n    if ( *(_BYTE *)(GameManager::sharedState() + 706) )\n      goto LABEL_10;\n    goto LABEL_9;\n  }\n  *(_BYTE *)(a1 + 665) = 0;\n  if ( !*(_BYTE *)(GameManager::sharedState() + 706) )\n  {\nLABEL_9:\n    *(_QWORD *)(a1 + 1264) = GJEffectManager::getColorSprite(*(_QWORD **)(a1 + 1280), *(_DWORD *)(a1 + 656));\n    *(_QWORD *)(a1 + 1272) = GJEffectManager::getColorSprite(*(_QWORD **)(a1 + 1280), *(_DWORD *)(a1 + 660));\n  }\nLABEL_10:\n  if ( *(_BYTE *)(a1 + 1042) != 1 )\n  {\n    if ( *(_BYTE *)(a1 + 1043) != 1 )\n      goto LABEL_12;\nLABEL_15:\n    *(_BYTE *)(a1 + 1035) = 1;\n    if ( *(_BYTE *)(a1 + 1214) == 1 )\n      goto LABEL_13;\n    goto LABEL_16;\n  }\n  *(_BYTE *)(a1 + 1034) = 1;\n  if ( *(_BYTE *)(a1 + 1043) == 1 )\n    goto LABEL_15;\nLABEL_12:\n  if ( *(_BYTE *)(a1 + 1214) == 1 )\n  {\nLABEL_13:\n    *(_DWORD *)(a1 + 920) = 7;\n    v5 = 1;\n    result = 7;\n    goto LABEL_18;\n  }\nLABEL_16:\n  result = *(unsigned int *)(a1 + 920);\n  v5 = 1;\n  if ( (unsigned int)result <= 0x19 )\n  {\n    v7 = 35651585;\n    v5 = !_bittest(&v7, result);\n  }\nLABEL_18:\n  *(_BYTE *)(a1 + 868) = v5;\n  *(_BYTE *)(a1 + 1289) = (_DWORD)result == 7;\n  *(_BYTE *)(a1 + 1290) = (_DWORD)result == 7;\n  if ( *(_BYTE *)(a1 + 1294) == 1 && !*(_BYTE *)(a1 + 649) )\n    *(_BYTE *)(a1 + 999) = 1;\n  return result;\n}", "assembly": "; \n; GameObject::saveActiveColors from 0x10069a2d0 to 0x10069a454 (388 bytes)\n; \n; 6 xrefs:\n; > EnhancedGameObject::saveActiveColors @ 0x10069da09\n; > <???> @ 0x100acb570\n; > <???> @ 0x100b2be98\n; > <???> @ 0x100b3d930\n; > <???> @ 0x100b844c0\n; > <???> @ 0x100b854d8\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:15 +0000\n; \npush    rbp                                                            ; +0x0, 0x10069a2d0\nmov     rbp, rsp                                                       ; +0x1, 0x10069a2d1\npush    rbx                                                            ; +0x4, 0x10069a2d4\npush    rax                                                            ; +0x5, 0x10069a2d5\nmov     rbx, rdi                                                       ; +0x6, 0x10069a2d6\nmov     eax, [rdi+398h]                                                ; +0x9, 0x10069a2d9\nmov     [rdi+39Ch], eax                                                ; +0xf, 0x10069a2df\nmov     rax, [rdi+448h]                                                ; +0x15, 0x10069a2e5\nxor     ecx, ecx                                                       ; +0x1c, 0x10069a2ec\nmov     edx, 0                                                         ; +0x1e, 0x10069a2ee\ntest    rax, rax                                                       ; +0x23, 0x10069a2f3\njz      short loc_10069A301                                            ; +0x26, 0x10069a2f6\nmov     edx, [rax]                                                     ; +0x28, 0x10069a2f8\ntest    edx, edx                                                       ; +0x2a, 0x10069a2fa\njnz     short loc_10069A301                                            ; +0x2c, 0x10069a2fc\nmov     edx, [rax+4]                                                   ; +0x2e, 0x10069a2fe\nmov     rsi, [rbx+450h]                                                ; +0x31, 0x10069a301\ntest    rsi, rsi                                                       ; +0x38, 0x10069a308\njz      short loc_10069A316                                            ; +0x3b, 0x10069a30b\nmov     ecx, [rsi]                                                     ; +0x3d, 0x10069a30d\ntest    ecx, ecx                                                       ; +0x3f, 0x10069a30f\njnz     short loc_10069A316                                            ; +0x41, 0x10069a311\nmov     ecx, [rsi+4]                                                   ; +0x43, 0x10069a313\nmovd    xmm0, edx                                                      ; +0x46, 0x10069a316\npinsrd  xmm0, ecx, 1                                                   ; +0x4a, 0x10069a31a\npxor    xmm1, xmm1                                                     ; +0x50, 0x10069a320\npmaxsd  xmm1, xmm0                                                     ; +0x54, 0x10069a324\npminsd  xmm1, cs:xmmword_100A0E2E0                                     ; +0x59, 0x10069a329\nmovq    qword ptr [rbx+290h], xmm1                                     ; +0x62, 0x10069a332\nmovzx   eax, byte ptr [rax+20h]                                        ; +0x6a, 0x10069a33a\nmov     [rbx+298h], al                                                 ; +0x6e, 0x10069a33e\ntest    rsi, rsi                                                       ; +0x74, 0x10069a344\njz      loc_10069A435                                                  ; +0x77, 0x10069a347\nmovzx   eax, byte ptr [rsi+20h]                                        ; +0x7d, 0x10069a34d\nmov     [rbx+299h], al                                                 ; +0x81, 0x10069a351\ncall    GameManager__sharedState                                       ; +0x87, 0x10069a357\ncmp     byte ptr [rax+2C2h], 0                                         ; +0x8c, 0x10069a35c\njnz     short loc_10069A397                                            ; +0x93, 0x10069a363\nmov     esi, [rbx+290h]                                                ; +0x95, 0x10069a365\nmov     rdi, [rbx+500h]                                                ; +0x9b, 0x10069a36b\ncall    GJEffectManager__getColorSprite                                ; +0xa2, 0x10069a372\nmov     [rbx+4F0h], rax                                                ; +0xa7, 0x10069a377\nmov     esi, [rbx+294h]                                                ; +0xae, 0x10069a37e\nmov     rdi, [rbx+500h]                                                ; +0xb4, 0x10069a384\ncall    GJEffectManager__getColorSprite                                ; +0xbb, 0x10069a38b\nmov     [rbx+4F8h], rax                                                ; +0xc0, 0x10069a390\ncmp     byte ptr [rbx+412h], 1                                         ; +0xc7, 0x10069a397\njz      short loc_10069A3C5                                            ; +0xce, 0x10069a39e\ncmp     byte ptr [rbx+413h], 1                                         ; +0xd0, 0x10069a3a0\njz      short loc_10069A3D5                                            ; +0xd7, 0x10069a3a7\ncmp     byte ptr [rbx+4BEh], 1                                         ; +0xd9, 0x10069a3a9\njnz     short loc_10069A3E5                                            ; +0xe0, 0x10069a3b0\nmov     dword ptr [rbx+398h], 7                                        ; +0xe2, 0x10069a3b2\nmov     cl, 1                                                          ; +0xec, 0x10069a3bc\nmov     eax, 7                                                         ; +0xee, 0x10069a3be\njmp     short loc_10069A3FE                                            ; +0xf3, 0x10069a3c3\nmov     byte ptr [rbx+40Ah], 1                                         ; +0xf5, 0x10069a3c5\ncmp     byte ptr [rbx+413h], 1                                         ; +0xfc, 0x10069a3cc\njnz     short loc_10069A3A9                                            ; +0x103, 0x10069a3d3\nmov     byte ptr [rbx+40Bh], 1                                         ; +0x105, 0x10069a3d5\ncmp     byte ptr [rbx+4BEh], 1                                         ; +0x10c, 0x10069a3dc\njz      short loc_10069A3B2                                            ; +0x113, 0x10069a3e3\nmov     eax, [rbx+398h]                                                ; +0x115, 0x10069a3e5\nmov     cl, 1                                                          ; +0x11b, 0x10069a3eb\ncmp     eax, 19h                                                       ; +0x11d, 0x10069a3ed\nja      short loc_10069A3FE                                            ; +0x120, 0x10069a3f0\nmov     edx, 2200001h                                                  ; +0x122, 0x10069a3f2\nbt      edx, eax                                                       ; +0x127, 0x10069a3f7\njnb     short loc_10069A3FE                                            ; +0x12a, 0x10069a3fa\nxor     ecx, ecx                                                       ; +0x12c, 0x10069a3fc\nmov     [rbx+364h], cl                                                 ; +0x12e, 0x10069a3fe\ncmp     eax, 7                                                         ; +0x134, 0x10069a404\nsetz    byte ptr [rbx+509h]                                            ; +0x137, 0x10069a407\nsetz    byte ptr [rbx+50Ah]                                            ; +0x13e, 0x10069a40e\ncmp     byte ptr [rbx+50Eh], 1                                         ; +0x145, 0x10069a415\njnz     short loc_10069A42E                                            ; +0x14c, 0x10069a41c\ncmp     byte ptr [rbx+289h], 0                                         ; +0x14e, 0x10069a41e\njnz     short loc_10069A42E                                            ; +0x155, 0x10069a425\nmov     byte ptr [rbx+3E7h], 1                                         ; +0x157, 0x10069a427\nadd     rsp, 8                                                         ; +0x15e, 0x10069a42e\npop     rbx                                                            ; +0x162, 0x10069a432\npop     rbp                                                            ; +0x163, 0x10069a433\nretn                                                                   ; +0x164, 0x10069a434\nxor     eax, eax                                                       ; +0x165, 0x10069a435\nmov     [rbx+299h], al                                                 ; +0x167, 0x10069a437\ncall    GameManager__sharedState                                       ; +0x16d, 0x10069a43d\ncmp     byte ptr [rax+2C2h], 0                                         ; +0x172, 0x10069a442\njz      loc_10069A365                                                  ; +0x179, 0x10069a449\njmp     loc_10069A397                                                  ; +0x17f, 0x10069a44f", "xrefs": ["EnhancedGameObject::saveActiveColors @ 0x10069da09", "<???> @ 0x100acb570", "<???> @ 0x100b2be98", "<???> @ 0x100b3d930", "<???> @ 0x100b844c0", "<???> @ 0x100b854d8"], "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"}