{"type": "func", "start": 4301194160, "end": 4301194723, "name": "CCSpriteWithHue::updateColorMatrix", "pseudocode": "// \n// CCSpriteWithHue::updateColorMatrix from 0x1005f03b0 to 0x1005f05e3 (563 bytes)\n// \n// 4 xrefs:\n// > CCSpriteWithHue::updateHue @ 0x1005f02a5\n// > CCSpriteWithHue::setHue @ 0x1005f02bd\n// > CCSpriteWithHue::updateColor @ 0x1005f03a7\n// > CCSpriteWithHue::setHueDegrees @ 0x1005f087e\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\nvoid __fastcall CCSpriteWithHue::updateColorMatrix(CCSpriteWithHue *a1)\n{\n  __m128 m_hue_low; // 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  __m128 v11; // xmm4\n  float v12; // xmm1_4\n  __m128 v13; // xmm6\n  __m128 v14; // xmm8\n  __m128 v15; // xmm12\n  __m128 v16; // xmm11\n  __m128 v17; // xmm3\n  __m128 v18; // xmm6\n  __m128 v19; // xmm9\n  __m128 v20; // xmm10\n  __m128 v21; // xmm11\n  __m128 v22; // xmm9\n  __m128 v23; // xmm13\n  float v24; // xmm1_4\n  __m128 v25; // xmm4\n\n  m_hue_low = (__m128)LODWORD(a1->m_hue);\n  *(__float2 *)m_hue_low.f32 = __sincosf_stret(m_hue_low.f32[0]);\n  v2 = _mm_movehdup_ps(m_hue_low);\n  v3 = (__m128)0xBED105EB;\n  v4 = v2;\n  v5 = _mm_moveldup_ps(m_hue_low);\n  v4.f32[0] = (float)((float)(v2.f32[0] * -0.40824828) + (float)(m_hue_low.f32[0] * 0.70710677)) + 0.0;\n  v3.f32[0] = (float)((float)(-0.40824828 * m_hue_low.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  v11 = 0;\n  v12 = (float)(0.70710677 * v4.f32[0]) + (float)((float)(v8.f32[0] * -0.70710677) + v7.f32[0]);\n  v11.f32[0] = (float)a1->_displayedOpacity / 255.0;\n  v13 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(v2, (__m128)0xBED105EB3F5105ECLL), _mm_mul_ps((__m128)0xBF3504F380000000LL, v5)),\n          (__m128)0LL);\n  v14 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(v5, (__m128)0xBED105EB3F5105ECLL), _mm_mul_ps(v2, (__m128)xmmword_100821A70)),\n          (__m128)0LL);\n  v15 = _mm_mul_ps((__m128)0LL, v14);\n  v16 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(_mm_moveldup_ps(v13), (__m128)0x3F5105ECu), _mm_insert_ps(v15, v14, 28)),\n          (__m128)0x3EAAAAAAu);\n  v17 = _mm_add_ps(\n          _mm_add_ps(_mm_mul_ps(_mm_movehdup_ps(v13), (__m128)0x3F5105ECu), _mm_insert_ps(v14, v15, 76)),\n          (__m128)0x3EAAAAAAu);\n  v18 = _mm_add_ps(_mm_add_ps(_mm_mul_ps(v13, (__m128)xmmword_100821A80), v15), (__m128)xmmword_100821A90);\n  v19 = _mm_movehdup_ps(v16);\n  v20 = v19;\n  v20.f32[0] = (float)(v19.f32[0] * 0.0) + v16.f32[0];\n  v16.f32[0] = v16.f32[0] * 0.0;\n  v21 = _mm_add_ps(_mm_moveldup_ps(v16), _mm_mul_ps(v19, (__m128)0xBF3504F33F3504F3LL));\n  v22 = _mm_movehdup_ps(v17);\n  v23 = v22;\n  v23.f32[0] = (float)(v22.f32[0] * 0.0) + v17.f32[0];\n  v17.f32[0] = v17.f32[0] * 0.0;\n  v24 = v12 * v11.f32[0];\n  v25 = _mm_shuffle_ps(v11, v11, 0);\n  *(__m128 *)a1->m_colorMatrix.__elems_[0].__elems_ = _mm_mul_ps(\n                                                        _mm_add_ps(\n                                                          _mm_mul_ps(\n                                                            _mm_shuffle_ps(v18, v18, 64),\n                                                            (__m128)xmmword_100821AB0),\n                                                          _mm_insert_ps(\n                                                            _mm_shuffle_ps(_mm_movelh_ps(v20, v21), v21, 216),\n                                                            v23,\n                                                            48)),\n                                                        v25);\n  *(__m128 *)&a1->m_colorMatrix.__elems_[1].__elems_[1] = _mm_mul_ps(\n                                                            _mm_add_ps(\n                                                              _mm_mul_ps(\n                                                                _mm_shuffle_ps(v18, v4, 5),\n                                                                (__m128)xmmword_100821AC0),\n                                                              _mm_insert_ps(\n                                                                _mm_insert_ps(\n                                                                  _mm_add_ps(\n                                                                    _mm_moveldup_ps(v17),\n                                                                    _mm_mul_ps(v22, (__m128)0xBF3504F33F3504F3LL)),\n                                                                  v9,\n                                                                  32),\n                                                                v10,\n                                                                48)),\n                                                            v25);\n  a1->m_colorMatrix.__elems_[2].__elems_[2] = v24;\n}", "assembly": "; \n; CCSpriteWithHue::updateColorMatrix from 0x1005f03b0 to 0x1005f05e3 (563 bytes)\n; \n; 4 xrefs:\n; > CCSpriteWithHue::updateHue @ 0x1005f02a5\n; > CCSpriteWithHue::setHue @ 0x1005f02bd\n; > CCSpriteWithHue::updateColor @ 0x1005f03a7\n; > CCSpriteWithHue::setHueDegrees @ 0x1005f087e\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\npush    rbp                                                            ; +0x0, 0x1005f03b0\nmov     rbp, rsp                                                       ; +0x1, 0x1005f03b1\npush    rbx                                                            ; +0x4, 0x1005f03b4\npush    rax                                                            ; +0x5, 0x1005f03b5\nmov     rbx, rdi                                                       ; +0x6, 0x1005f03b6\nmovss   xmm0, dword ptr [rdi+254h]; float                              ; +0x9, 0x1005f03b9\ncall    ___sincosf_stret                                               ; +0x11, 0x1005f03c1\nmovshdup xmm3, xmm0                                                    ; +0x16, 0x1005f03c6\nmovss   xmm1, cs:dword_10081B078                                       ; +0x1a, 0x1005f03ca\nmovss   xmm4, cs:dword_100821AF8                                       ; +0x22, 0x1005f03d2\nmovaps  xmm2, xmm3                                                     ; +0x2a, 0x1005f03da\nmulss   xmm2, xmm4                                                     ; +0x2d, 0x1005f03dd\nmulss   xmm4, xmm0                                                     ; +0x31, 0x1005f03e1\nmovsldup xmm8, xmm0                                                    ; +0x35, 0x1005f03e5\nmulss   xmm0, xmm1                                                     ; +0x3a, 0x1005f03ea\naddss   xmm2, xmm0                                                     ; +0x3e, 0x1005f03ee\nxorps   xmm0, xmm0                                                     ; +0x42, 0x1005f03f2\naddss   xmm2, xmm0                                                     ; +0x45, 0x1005f03f5\nmovss   xmm6, cs:dword_100821AFC                                       ; +0x49, 0x1005f03f9\nmovaps  xmm5, xmm3                                                     ; +0x51, 0x1005f0401\nmulss   xmm5, xmm6                                                     ; +0x54, 0x1005f0404\naddss   xmm4, xmm5                                                     ; +0x58, 0x1005f0408\naddss   xmm4, xmm0                                                     ; +0x5c, 0x1005f040c\nmovaps  xmm5, xmm4                                                     ; +0x60, 0x1005f0410\nmulss   xmm5, xmm0                                                     ; +0x63, 0x1005f0413\nmovsldup xmm11, xmm2                                                   ; +0x67, 0x1005f0417\nmulss   xmm2, cs:dword_100821B08                                       ; +0x6c, 0x1005f041c\naddss   xmm2, xmm5                                                     ; +0x74, 0x1005f0424\ninsertps xmm5, xmm4, 10h                                               ; +0x78, 0x1005f0428\nmovss   xmm10, cs:dword_100821B00                                      ; +0x7e, 0x1005f042e\nmulps   xmm11, xmm10                                                   ; +0x87, 0x1005f0437\naddps   xmm11, xmm5                                                    ; +0x8b, 0x1005f043b\nmovss   xmm9, cs:dword_100821B04                                       ; +0x8f, 0x1005f043f\naddps   xmm11, xmm9                                                    ; +0x98, 0x1005f0448\naddss   xmm2, cs:dword_100821B0C                                       ; +0x9c, 0x1005f044c\nmovshdup xmm12, xmm11                                                  ; +0xa4, 0x1005f0454\nmovaps  xmm5, xmm12                                                    ; +0xa9, 0x1005f0459\nmulss   xmm5, xmm0                                                     ; +0xad, 0x1005f045d\naddss   xmm5, xmm11                                                    ; +0xb1, 0x1005f0461\nmovaps  xmm7, xmm12                                                    ; +0xb6, 0x1005f0466\nmulss   xmm7, xmm1                                                     ; +0xba, 0x1005f046a\nmulss   xmm11, xmm0                                                    ; +0xbe, 0x1005f046e\naddss   xmm7, xmm11                                                    ; +0xc3, 0x1005f0473\nmulss   xmm12, xmm6                                                    ; +0xc8, 0x1005f0478\naddss   xmm12, xmm11                                                   ; +0xcd, 0x1005f047d\nmovzx   eax, byte ptr [rbx+148h]                                       ; +0xd2, 0x1005f0482\nxorps   xmm4, xmm4                                                     ; +0xd9, 0x1005f0489\ncvtsi2ss xmm4, eax                                                     ; +0xdc, 0x1005f048c\nmulss   xmm1, xmm2                                                     ; +0xe0, 0x1005f0490\naddss   xmm1, xmm12                                                    ; +0xe4, 0x1005f0494\ndivss   xmm4, cs:dword_100815C10                                       ; +0xe9, 0x1005f0499\nmovsd   xmm11, cs:qword_100821A50                                      ; +0xf1, 0x1005f04a1\nmulps   xmm11, xmm8                                                    ; +0xfa, 0x1005f04aa\nmovsd   xmm13, cs:qword_100821A60                                      ; +0xfe, 0x1005f04ae\nmovaps  xmm6, xmm3                                                     ; +0x107, 0x1005f04b7\nmulps   xmm6, xmm13                                                    ; +0x10a, 0x1005f04ba\naddps   xmm6, xmm11                                                    ; +0x10e, 0x1005f04be\nxorps   xmm12, xmm12                                                   ; +0x112, 0x1005f04c2\naddps   xmm6, xmm12                                                    ; +0x116, 0x1005f04c6\nmulps   xmm3, cs:xmmword_100821A70                                     ; +0x11a, 0x1005f04ca\nmulps   xmm8, xmm13                                                    ; +0x121, 0x1005f04d1\naddps   xmm8, xmm3                                                     ; +0x125, 0x1005f04d5\naddps   xmm8, xmm12                                                    ; +0x129, 0x1005f04d9\nmulps   xmm12, xmm8                                                    ; +0x12d, 0x1005f04dd\nmovsldup xmm11, xmm6                                                   ; +0x131, 0x1005f04e1\nmovaps  xmm3, xmm12                                                    ; +0x136, 0x1005f04e6\ninsertps xmm3, xmm8, 1Ch                                               ; +0x13a, 0x1005f04ea\nmulps   xmm11, xmm10                                                   ; +0x141, 0x1005f04f1\naddps   xmm11, xmm3                                                    ; +0x145, 0x1005f04f5\naddps   xmm11, xmm9                                                    ; +0x149, 0x1005f04f9\nmovshdup xmm3, xmm6                                                    ; +0x14d, 0x1005f04fd\ninsertps xmm8, xmm12, 4Ch ; 'L'                                        ; +0x151, 0x1005f0501\nmulps   xmm3, xmm10                                                    ; +0x158, 0x1005f0508\naddps   xmm3, xmm8                                                     ; +0x15c, 0x1005f050c\naddps   xmm3, xmm9                                                     ; +0x160, 0x1005f0510\nmulps   xmm6, cs:xmmword_100821A80                                     ; +0x164, 0x1005f0514\naddps   xmm6, xmm12                                                    ; +0x16b, 0x1005f051b\naddps   xmm6, cs:xmmword_100821A90                                     ; +0x16f, 0x1005f051f\nmovaps  xmm8, xmm6                                                     ; +0x176, 0x1005f0526\nshufps  xmm8, xmm6, 40h ; '@'                                          ; +0x17a, 0x1005f052a\nmovshdup xmm9, xmm11                                                   ; +0x17f, 0x1005f052f\nmovaps  xmm10, xmm9                                                    ; +0x184, 0x1005f0534\nmulss   xmm10, xmm0                                                    ; +0x188, 0x1005f0538\naddss   xmm10, xmm11                                                   ; +0x18d, 0x1005f053d\nmovsd   xmm12, cs:qword_100821AA0                                      ; +0x192, 0x1005f0542\nmulps   xmm9, xmm12                                                    ; +0x19b, 0x1005f054b\nmulss   xmm11, xmm0                                                    ; +0x19f, 0x1005f054f\nmovsldup xmm11, xmm11                                                  ; +0x1a4, 0x1005f0554\naddps   xmm11, xmm9                                                    ; +0x1a9, 0x1005f0559\nmovshdup xmm9, xmm3                                                    ; +0x1ad, 0x1005f055d\nmovaps  xmm13, xmm9                                                    ; +0x1b2, 0x1005f0562\nmulss   xmm13, xmm0                                                    ; +0x1b6, 0x1005f0566\naddss   xmm13, xmm3                                                    ; +0x1bb, 0x1005f056b\nmovlhps xmm10, xmm11                                                   ; +0x1c0, 0x1005f0570\nshufps  xmm10, xmm11, 0D8h                                             ; +0x1c4, 0x1005f0574\ninsertps xmm10, xmm13, 30h ; '0'                                       ; +0x1c9, 0x1005f0579\nmulps   xmm8, cs:xmmword_100821AB0                                     ; +0x1d0, 0x1005f0580\naddps   xmm8, xmm10                                                    ; +0x1d8, 0x1005f0588\nmulps   xmm9, xmm12                                                    ; +0x1dc, 0x1005f058c\nmulss   xmm3, xmm0                                                     ; +0x1e0, 0x1005f0590\nmovsldup xmm0, xmm3                                                    ; +0x1e4, 0x1005f0594\naddps   xmm0, xmm9                                                     ; +0x1e8, 0x1005f0598\ninsertps xmm0, xmm5, 20h ; ' '                                         ; +0x1ec, 0x1005f059c\ninsertps xmm0, xmm7, 30h ; '0'                                         ; +0x1f2, 0x1005f05a2\nmulss   xmm1, xmm4                                                     ; +0x1f8, 0x1005f05a8\nshufps  xmm4, xmm4, 0                                                  ; +0x1fc, 0x1005f05ac\nmulps   xmm8, xmm4                                                     ; +0x200, 0x1005f05b0\nmovups  xmmword ptr [rbx+264h], xmm8                                   ; +0x204, 0x1005f05b4\nshufps  xmm6, xmm2, 5                                                  ; +0x20c, 0x1005f05bc\nmulps   xmm6, cs:xmmword_100821AC0                                     ; +0x210, 0x1005f05c0\naddps   xmm6, xmm0                                                     ; +0x217, 0x1005f05c7\nmulps   xmm6, xmm4                                                     ; +0x21a, 0x1005f05ca\nmovups  xmmword ptr [rbx+274h], xmm6                                   ; +0x21d, 0x1005f05cd\nmovss   dword ptr [rbx+284h], xmm1                                     ; +0x224, 0x1005f05d4\nadd     rsp, 8                                                         ; +0x22c, 0x1005f05dc\npop     rbx                                                            ; +0x230, 0x1005f05e0\npop     rbp                                                            ; +0x231, 0x1005f05e1\nretn                                                                   ; +0x232, 0x1005f05e2", "xrefs": ["CCSpriteWithHue::updateHue @ 0x1005f02a5", "CCSpriteWithHue::setHue @ 0x1005f02bd", "CCSpriteWithHue::updateColor @ 0x1005f03a7", "CCSpriteWithHue::setHueDegrees @ 0x1005f087e"], "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"}