{"type": "func", "start": 4302058736, "end": 4302059299, "name": "CCSpriteWithHue::updateColorMatrix", "pseudocode": "// \n// CCSpriteWithHue::updateColorMatrix from 0x1006c34f0 to 0x1006c3723 (563 bytes)\n// \n// 4 xrefs:\n// > CCSpriteWithHue::updateHue @ 0x1006c33e5\n// > CCSpriteWithHue::setHue @ 0x1006c33fd\n// > CCSpriteWithHue::updateColor @ 0x1006c34e7\n// > CCSpriteWithHue::setHueDegrees @ 0x1006c39be\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:33 +0000\n// \n\n__int64 __fastcall CCSpriteWithHue::updateColorMatrix(__int64 a1)\n{\n  __m128 v1; // xmm0\n  __m128 v2; // xmm3\n  __m128 v3; // xmm4\n  __m128 v4; // xmm2\n  __m128 v5; // xmm8\n  __m128 v6; // xmm5\n  __m128 v7; // xmm11\n  __m128 v8; // xmm12\n  __m128 v9; // xmm5\n  __m128 v10; // xmm7\n  __int64 result; // rax\n  __m128 v12; // xmm4\n  float v13; // xmm1_4\n  __m128 v14; // xmm6\n  __m128 v15; // xmm8\n  __m128 v16; // xmm12\n  __m128 v17; // xmm11\n  __m128 v18; // xmm3\n  __m128 v19; // xmm6\n  __m128 v20; // xmm9\n  __m128 v21; // xmm10\n  __m128 v22; // xmm11\n  __m128 v23; // xmm9\n  __m128 v24; // xmm13\n  float v25; // xmm1_4\n  __m128 v26; // xmm4\n\n  v1 = (__m128)*(unsigned int *)(a1 + 596);\n  *(__float2 *)v1.f32 = __sincosf_stret(v1.f32[0]);\n  v2 = _mm_movehdup_ps(v1);\n  v3 = (__m128)0xBED105EB;\n  v4 = v2;\n  v5 = _mm_moveldup_ps(v1);\n  v4.f32[0] = (float)((float)(v2.f32[0] * -0.40824828) + (float)(v1.f32[0] * 0.70710677)) + 0.0;\n  v3.f32[0] = (float)((float)(-0.40824828 * v1.f32[0]) + (float)(v2.f32[0] * -0.70710677)) + 0.0;\n  v6 = v3;\n  v6.f32[0] = v3.f32[0] * 0.0;\n  v7 = _mm_add_ps(\n         _mm_add_ps(_mm_mul_ps(_mm_moveldup_ps(v4), (__m128)0x3F5105ECu), _mm_insert_ps(v6, v3, 16)),\n         (__m128)0x3EAAAAAAu);\n  v4.f32[0] = (float)((float)(v4.f32[0] * -0.57735026) + (float)(v3.f32[0] * 0.0)) + 0.47140452;\n  v8 = _mm_movehdup_ps(v7);\n  v9 = v8;\n  v9.f32[0] = (float)(v8.f32[0] * 0.0) + v7.f32[0];\n  v10 = v8;\n  v7.f32[0] = v7.f32[0] * 0.0;\n  v10.f32[0] = (float)(v8.f32[0] * 0.70710677) + v7.f32[0];\n  result = *(unsigned __int8 *)(a1 + 328);\n  v12 = 0;\n  v13 = (float)(0.70710677 * v4.f32[0]) + (float)((float)(v8.f32[0] * -0.70710677) + v7.f32[0]);\n  v12.f32[0] = (float)(int)result / 255.0;\n  v14 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(v2, (__m128)0xBED105EB3F5105ECLL), _mm_mul_ps((__m128)0xBF3504F380000000LL, v5)),\n          (__m128)0LL);\n  v15 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(v5, (__m128)0xBED105EB3F5105ECLL), _mm_mul_ps(v2, (__m128)xmmword_100A10970)),\n          (__m128)0LL);\n  v16 = _mm_mul_ps((__m128)0LL, v15);\n  v17 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(_mm_moveldup_ps(v14), (__m128)0x3F5105ECu), _mm_insert_ps(v16, v15, 28)),\n          (__m128)0x3EAAAAAAu);\n  v18 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(_mm_movehdup_ps(v14), (__m128)0x3F5105ECu), _mm_insert_ps(v15, v16, 76)),\n          (__m128)0x3EAAAAAAu);\n  v19 = _mm_add_ps(_mm_add_ps(_mm_mul_ps(v14, (__m128)xmmword_100A10980), v16), (__m128)xmmword_100A10990);\n  v20 = _mm_movehdup_ps(v17);\n  v21 = v20;\n  v21.f32[0] = (float)(v20.f32[0] * 0.0) + v17.f32[0];\n  v17.f32[0] = v17.f32[0] * 0.0;\n  v22 = _mm_add_ps(_mm_moveldup_ps(v17), _mm_mul_ps(v20, (__m128)0xBF3504F33F3504F3LL));\n  v23 = _mm_movehdup_ps(v18);\n  v24 = v23;\n  v24.f32[0] = (float)(v23.f32[0] * 0.0) + v18.f32[0];\n  v18.f32[0] = v18.f32[0] * 0.0;\n  v25 = v13 * v12.f32[0];\n  v26 = _mm_shuffle_ps(v12, v12, 0);\n  *(__m128 *)(a1 + 612) = _mm_mul_ps(\n                            _mm_add_ps(\n                              _mm_mul_ps(_mm_shuffle_ps(v19, v19, 64), (__m128)xmmword_100A109B0),\n                              _mm_insert_ps(_mm_shuffle_ps(_mm_movelh_ps(v21, v22), v22, 216), v24, 48)),\n                            v26);\n  *(__m128 *)(a1 + 628) = _mm_mul_ps(\n                            _mm_add_ps(\n                              _mm_mul_ps(_mm_shuffle_ps(v19, v4, 5), (__m128)xmmword_100A109C0),\n                              _mm_insert_ps(\n                                _mm_insert_ps(\n                                  _mm_add_ps(_mm_moveldup_ps(v18), _mm_mul_ps(v23, (__m128)0xBF3504F33F3504F3LL)),\n                                  v9,\n                                  32),\n                                v10,\n                                48)),\n                            v26);\n  *(float *)(a1 + 644) = v25;\n  return result;\n}", "assembly": "; \n; CCSpriteWithHue::updateColorMatrix from 0x1006c34f0 to 0x1006c3723 (563 bytes)\n; \n; 4 xrefs:\n; > CCSpriteWithHue::updateHue @ 0x1006c33e5\n; > CCSpriteWithHue::setHue @ 0x1006c33fd\n; > CCSpriteWithHue::updateColor @ 0x1006c34e7\n; > CCSpriteWithHue::setHueDegrees @ 0x1006c39be\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:33 +0000\n; \npush    rbp                                                            ; +0x0, 0x1006c34f0\nmov     rbp, rsp                                                       ; +0x1, 0x1006c34f1\npush    rbx                                                            ; +0x4, 0x1006c34f4\npush    rax                                                            ; +0x5, 0x1006c34f5\nmov     rbx, rdi                                                       ; +0x6, 0x1006c34f6\nmovss   xmm0, dword ptr [rdi+254h]; float                              ; +0x9, 0x1006c34f9\ncall    ___sincosf_stret                                               ; +0x11, 0x1006c3501\nmovshdup xmm3, xmm0                                                    ; +0x16, 0x1006c3506\nmovss   xmm1, cs:dword_100A09618                                       ; +0x1a, 0x1006c350a\nmovss   xmm4, cs:dword_100A109F8                                       ; +0x22, 0x1006c3512\nmovaps  xmm2, xmm3                                                     ; +0x2a, 0x1006c351a\nmulss   xmm2, xmm4                                                     ; +0x2d, 0x1006c351d\nmulss   xmm4, xmm0                                                     ; +0x31, 0x1006c3521\nmovsldup xmm8, xmm0                                                    ; +0x35, 0x1006c3525\nmulss   xmm0, xmm1                                                     ; +0x3a, 0x1006c352a\naddss   xmm2, xmm0                                                     ; +0x3e, 0x1006c352e\nxorps   xmm0, xmm0                                                     ; +0x42, 0x1006c3532\naddss   xmm2, xmm0                                                     ; +0x45, 0x1006c3535\nmovss   xmm6, cs:dword_100A109FC                                       ; +0x49, 0x1006c3539\nmovaps  xmm5, xmm3                                                     ; +0x51, 0x1006c3541\nmulss   xmm5, xmm6                                                     ; +0x54, 0x1006c3544\naddss   xmm4, xmm5                                                     ; +0x58, 0x1006c3548\naddss   xmm4, xmm0                                                     ; +0x5c, 0x1006c354c\nmovaps  xmm5, xmm4                                                     ; +0x60, 0x1006c3550\nmulss   xmm5, xmm0                                                     ; +0x63, 0x1006c3553\nmovsldup xmm11, xmm2                                                   ; +0x67, 0x1006c3557\nmulss   xmm2, cs:dword_100A10A08                                       ; +0x6c, 0x1006c355c\naddss   xmm2, xmm5                                                     ; +0x74, 0x1006c3564\ninsertps xmm5, xmm4, 10h                                               ; +0x78, 0x1006c3568\nmovss   xmm10, cs:dword_100A10A00                                      ; +0x7e, 0x1006c356e\nmulps   xmm11, xmm10                                                   ; +0x87, 0x1006c3577\naddps   xmm11, xmm5                                                    ; +0x8b, 0x1006c357b\nmovss   xmm9, cs:dword_100A10A04                                       ; +0x8f, 0x1006c357f\naddps   xmm11, xmm9                                                    ; +0x98, 0x1006c3588\naddss   xmm2, cs:dword_100A10A0C                                       ; +0x9c, 0x1006c358c\nmovshdup xmm12, xmm11                                                  ; +0xa4, 0x1006c3594\nmovaps  xmm5, xmm12                                                    ; +0xa9, 0x1006c3599\nmulss   xmm5, xmm0                                                     ; +0xad, 0x1006c359d\naddss   xmm5, xmm11                                                    ; +0xb1, 0x1006c35a1\nmovaps  xmm7, xmm12                                                    ; +0xb6, 0x1006c35a6\nmulss   xmm7, xmm1                                                     ; +0xba, 0x1006c35aa\nmulss   xmm11, xmm0                                                    ; +0xbe, 0x1006c35ae\naddss   xmm7, xmm11                                                    ; +0xc3, 0x1006c35b3\nmulss   xmm12, xmm6                                                    ; +0xc8, 0x1006c35b8\naddss   xmm12, xmm11                                                   ; +0xcd, 0x1006c35bd\nmovzx   eax, byte ptr [rbx+148h]                                       ; +0xd2, 0x1006c35c2\nxorps   xmm4, xmm4                                                     ; +0xd9, 0x1006c35c9\ncvtsi2ss xmm4, eax                                                     ; +0xdc, 0x1006c35cc\nmulss   xmm1, xmm2                                                     ; +0xe0, 0x1006c35d0\naddss   xmm1, xmm12                                                    ; +0xe4, 0x1006c35d4\ndivss   xmm4, cs:dword_100A03F80                                       ; +0xe9, 0x1006c35d9\nmovsd   xmm11, cs:qword_100A10950                                      ; +0xf1, 0x1006c35e1\nmulps   xmm11, xmm8                                                    ; +0xfa, 0x1006c35ea\nmovsd   xmm13, cs:qword_100A10960                                      ; +0xfe, 0x1006c35ee\nmovaps  xmm6, xmm3                                                     ; +0x107, 0x1006c35f7\nmulps   xmm6, xmm13                                                    ; +0x10a, 0x1006c35fa\naddps   xmm6, xmm11                                                    ; +0x10e, 0x1006c35fe\nxorps   xmm12, xmm12                                                   ; +0x112, 0x1006c3602\naddps   xmm6, xmm12                                                    ; +0x116, 0x1006c3606\nmulps   xmm3, cs:xmmword_100A10970                                     ; +0x11a, 0x1006c360a\nmulps   xmm8, xmm13                                                    ; +0x121, 0x1006c3611\naddps   xmm8, xmm3                                                     ; +0x125, 0x1006c3615\naddps   xmm8, xmm12                                                    ; +0x129, 0x1006c3619\nmulps   xmm12, xmm8                                                    ; +0x12d, 0x1006c361d\nmovsldup xmm11, xmm6                                                   ; +0x131, 0x1006c3621\nmovaps  xmm3, xmm12                                                    ; +0x136, 0x1006c3626\ninsertps xmm3, xmm8, 1Ch                                               ; +0x13a, 0x1006c362a\nmulps   xmm11, xmm10                                                   ; +0x141, 0x1006c3631\naddps   xmm11, xmm3                                                    ; +0x145, 0x1006c3635\naddps   xmm11, xmm9                                                    ; +0x149, 0x1006c3639\nmovshdup xmm3, xmm6                                                    ; +0x14d, 0x1006c363d\ninsertps xmm8, xmm12, 4Ch ; 'L'                                        ; +0x151, 0x1006c3641\nmulps   xmm3, xmm10                                                    ; +0x158, 0x1006c3648\naddps   xmm3, xmm8                                                     ; +0x15c, 0x1006c364c\naddps   xmm3, xmm9                                                     ; +0x160, 0x1006c3650\nmulps   xmm6, cs:xmmword_100A10980                                     ; +0x164, 0x1006c3654\naddps   xmm6, xmm12                                                    ; +0x16b, 0x1006c365b\naddps   xmm6, cs:xmmword_100A10990                                     ; +0x16f, 0x1006c365f\nmovaps  xmm8, xmm6                                                     ; +0x176, 0x1006c3666\nshufps  xmm8, xmm6, 40h ; '@'                                          ; +0x17a, 0x1006c366a\nmovshdup xmm9, xmm11                                                   ; +0x17f, 0x1006c366f\nmovaps  xmm10, xmm9                                                    ; +0x184, 0x1006c3674\nmulss   xmm10, xmm0                                                    ; +0x188, 0x1006c3678\naddss   xmm10, xmm11                                                   ; +0x18d, 0x1006c367d\nmovsd   xmm12, cs:qword_100A109A0                                      ; +0x192, 0x1006c3682\nmulps   xmm9, xmm12                                                    ; +0x19b, 0x1006c368b\nmulss   xmm11, xmm0                                                    ; +0x19f, 0x1006c368f\nmovsldup xmm11, xmm11                                                  ; +0x1a4, 0x1006c3694\naddps   xmm11, xmm9                                                    ; +0x1a9, 0x1006c3699\nmovshdup xmm9, xmm3                                                    ; +0x1ad, 0x1006c369d\nmovaps  xmm13, xmm9                                                    ; +0x1b2, 0x1006c36a2\nmulss   xmm13, xmm0                                                    ; +0x1b6, 0x1006c36a6\naddss   xmm13, xmm3                                                    ; +0x1bb, 0x1006c36ab\nmovlhps xmm10, xmm11                                                   ; +0x1c0, 0x1006c36b0\nshufps  xmm10, xmm11, 0D8h                                             ; +0x1c4, 0x1006c36b4\ninsertps xmm10, xmm13, 30h ; '0'                                       ; +0x1c9, 0x1006c36b9\nmulps   xmm8, cs:xmmword_100A109B0                                     ; +0x1d0, 0x1006c36c0\naddps   xmm8, xmm10                                                    ; +0x1d8, 0x1006c36c8\nmulps   xmm9, xmm12                                                    ; +0x1dc, 0x1006c36cc\nmulss   xmm3, xmm0                                                     ; +0x1e0, 0x1006c36d0\nmovsldup xmm0, xmm3                                                    ; +0x1e4, 0x1006c36d4\naddps   xmm0, xmm9                                                     ; +0x1e8, 0x1006c36d8\ninsertps xmm0, xmm5, 20h ; ' '                                         ; +0x1ec, 0x1006c36dc\ninsertps xmm0, xmm7, 30h ; '0'                                         ; +0x1f2, 0x1006c36e2\nmulss   xmm1, xmm4                                                     ; +0x1f8, 0x1006c36e8\nshufps  xmm4, xmm4, 0                                                  ; +0x1fc, 0x1006c36ec\nmulps   xmm8, xmm4                                                     ; +0x200, 0x1006c36f0\nmovups  xmmword ptr [rbx+264h], xmm8                                   ; +0x204, 0x1006c36f4\nshufps  xmm6, xmm2, 5                                                  ; +0x20c, 0x1006c36fc\nmulps   xmm6, cs:xmmword_100A109C0                                     ; +0x210, 0x1006c3700\naddps   xmm6, xmm0                                                     ; +0x217, 0x1006c3707\nmulps   xmm6, xmm4                                                     ; +0x21a, 0x1006c370a\nmovups  xmmword ptr [rbx+274h], xmm6                                   ; +0x21d, 0x1006c370d\nmovss   dword ptr [rbx+284h], xmm1                                     ; +0x224, 0x1006c3714\nadd     rsp, 8                                                         ; +0x22c, 0x1006c371c\npop     rbx                                                            ; +0x230, 0x1006c3720\npop     rbp                                                            ; +0x231, 0x1006c3721\nretn                                                                   ; +0x232, 0x1006c3722", "xrefs": ["CCSpriteWithHue::updateHue @ 0x1006c33e5", "CCSpriteWithHue::setHue @ 0x1006c33fd", "CCSpriteWithHue::updateColor @ 0x1006c34e7", "CCSpriteWithHue::setHueDegrees @ 0x1006c39be"], "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"}