{"type": "func", "start": 5369023072, "end": 5369023715, "name": "CCSpriteWithHue::updateColorMatrix", "pseudocode": "// \n// CCSpriteWithHue::updateColorMatrix from 0x14004ca60 to 0x14004cce3 (643 bytes)\n// \n// 6 xrefs:\n// > CCSpriteWithHue::updateColor @ 0x14004ca57\n// > GJShopLayer::init @ 0x1403b06a7\n// > GJShopLayer::init @ 0x1403b0aac\n// > RewardUnlockLayer::init @ 0x140563bb9\n// > SecretLayer5::updateTweenActionInt @ 0x14058ae88\n// > <???> @ 0x1409100c4\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:25:33 +0000\n// \n\n__int64 __fastcall CCSpriteWithHue::updateColorMatrix(__int64 a1)\n{\n  __m128 *v1; // rbx\n  float v3; // xmm12_4\n  float v4; // xmm9_4\n  float v5; // xmm8_4\n  float v6; // xmm3_4\n  float v7; // xmm9_4\n  float v8; // xmm2_4\n  float v9; // xmm6_4\n  float v10; // xmm0_4\n  __int64 v11; // rdx\n  __int64 v12; // r8\n  __int64 v13; // rdx\n  __int64 v14; // r8\n  __int64 result; // rax\n  __m128 v16; // xmm2\n  __m128 v17; // xmm2\n  __m128 v18; // xmm0\n  float v19; // [rsp+28h] [rbp-49h] BYREF\n  float v20; // [rsp+2Ch] [rbp-45h]\n  float v21; // [rsp+30h] [rbp-41h]\n  float v22; // [rsp+34h] [rbp-3Dh]\n  __int64 v23; // [rsp+38h] [rbp-39h]\n  float v24; // [rsp+40h] [rbp-31h]\n  float v25; // [rsp+44h] [rbp-2Dh]\n  float v26; // [rsp+48h] [rbp-29h]\n\n  v1 = (__m128 *)(a1 + 616);\n  v3 = *(float *)(a1 + 600);\n  if ( 2.0 < 0.0 )\n    v4 = sqrtf(2.0);\n  else\n    v4 = fsqrt(2.0);\n  v1->m128_u64[0] = 1065353216;\n  v1->m128_u64[1] = 0;\n  v1[1].m128_i32[2] = 0;\n  v5 = 1.0 / v4;\n  v1[1].m128_f32[0] = v5;\n  v1[1].m128_f32[1] = v5;\n  v1[1].m128_f32[3] = -v5;\n  v1[2].m128_f32[0] = v5;\n  if ( 0.0 > 3.0 )\n    v6 = sqrtf(3.0);\n  else\n    v6 = fsqrt(3.0);\n  v20 = 0.0;\n  v22 = 0.0;\n  v23 = 1065353216;\n  v25 = 0.0;\n  v7 = v4 / v6;\n  v19 = v7;\n  v8 = -1.0 / v6;\n  v26 = v7;\n  v24 = v8;\n  v21 = -v8;\n  sub_14004CF20(&v19, v1, v1);\n  v9 = sinf(v3);\n  v10 = cosf(v3);\n  v20 = v9;\n  v19 = v10;\n  v22 = -v9;\n  *(float *)&v23 = v10;\n  v21 = 0.0;\n  v24 = 0.0;\n  v26 = 1.0;\n  sub_14004CF20(&v19, v1, v1);\n  v19 = v7;\n  v24 = -v8;\n  v21 = -(float)-v8;\n  v26 = v7;\n  v20 = 0.0;\n  v22 = 0.0;\n  LODWORD(v23) = 1065353216;\n  sub_14004CF20(&v19, v11, v12);\n  *((float *)&v23 + 1) = -v5;\n  *(float *)&v23 = v5;\n  v25 = -(float)-v5;\n  v26 = v5;\n  v19 = 1.0;\n  v21 = 0.0;\n  v24 = 0.0;\n  result = sub_14004CF20(&v19, v13, v14);\n  v16 = (__m128)COERCE_UNSIGNED_INT((float)*(unsigned __int8 *)(a1 + 328));\n  v16.m128_f32[0] = v16.m128_f32[0] / 255.0;\n  v17 = _mm_shuffle_ps(v16, v16, 0);\n  *v1 = _mm_mul_ps(*v1, v17);\n  v18 = _mm_mul_ps(v1[1], v17);\n  v17.m128_f32[0] = v17.m128_f32[0] * v1[2].m128_f32[0];\n  v1[1] = v18;\n  v1[2].m128_i32[0] = v17.m128_i32[0];\n  return result;\n}", "assembly": "; \n; CCSpriteWithHue::updateColorMatrix from 0x14004ca60 to 0x14004cce3 (643 bytes)\n; \n; 6 xrefs:\n; > CCSpriteWithHue::updateColor @ 0x14004ca57\n; > GJShopLayer::init @ 0x1403b06a7\n; > GJShopLayer::init @ 0x1403b0aac\n; > RewardUnlockLayer::init @ 0x140563bb9\n; > SecretLayer5::updateTweenActionInt @ 0x14058ae88\n; > <???> @ 0x1409100c4\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:25:33 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x14004ca60\nmov     [rax+8], rbx                                                   ; +0x3, 0x14004ca63\nmov     [rax+10h], rdi                                                 ; +0x7, 0x14004ca67\npush    rbp                                                            ; +0xb, 0x14004ca6b\nlea     rbp, [rax-5Fh]                                                 ; +0xc, 0x14004ca6c\nsub     rsp, 0C0h                                                      ; +0x10, 0x14004ca70\nmovss   xmm1, cs:width                                                 ; +0x17, 0x14004ca77\nlea     rbx, [rcx+268h]                                                ; +0x1f, 0x14004ca7f\nmovaps  xmmword ptr [rax-18h], xmm6                                    ; +0x26, 0x14004ca86\nxorps   xmm0, xmm0                                                     ; +0x2a, 0x14004ca8a\nucomiss xmm0, xmm1                                                     ; +0x2d, 0x14004ca8d\nmov     rdi, rcx                                                       ; +0x30, 0x14004ca90\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x33, 0x14004ca93\nmovaps  xmmword ptr [rax-38h], xmm8                                    ; +0x37, 0x14004ca97\nmovaps  xmmword ptr [rax-48h], xmm9                                    ; +0x3c, 0x14004ca9c\nmovaps  xmmword ptr [rax-58h], xmm10                                   ; +0x41, 0x14004caa1\nmovaps  xmmword ptr [rax-68h], xmm11                                   ; +0x46, 0x14004caa6\nmovaps  xmmword ptr [rax-78h], xmm12                                   ; +0x4b, 0x14004caab\nmovss   xmm12, dword ptr [rcx+258h]                                    ; +0x50, 0x14004cab0\nja      short loc_14004CAC6                                            ; +0x59, 0x14004cab9\nxorps   xmm9, xmm9                                                     ; +0x5b, 0x14004cabb\nsqrtss  xmm9, xmm1                                                     ; +0x5f, 0x14004cabf\njmp     short loc_14004CAD2                                            ; +0x64, 0x14004cac4\nmovaps  xmm0, xmm1; X                                                  ; +0x66, 0x14004cac6\ncall    sqrtf                                                          ; +0x69, 0x14004cac9\nmovaps  xmm9, xmm0                                                     ; +0x6e, 0x14004cace\nmovsd   xmm1, cs:qword_140835278                                       ; +0x72, 0x14004cad2\nxorps   xmm0, xmm0                                                     ; +0x7a, 0x14004cada\nmovss   xmm11, dword ptr cs:xmmword_140836CC0                          ; +0x7d, 0x14004cadd\nxor     eax, eax                                                       ; +0x86, 0x14004cae6\ncvtss2sd xmm0, xmm9                                                    ; +0x88, 0x14004cae8\nmov     qword ptr [rbx], 3F800000h                                     ; +0x8d, 0x14004caed\nmov     [rbx+8], rax                                                   ; +0x94, 0x14004caf4\nmov     [rbx+18h], eax                                                 ; +0x98, 0x14004caf8\ndivsd   xmm1, xmm0                                                     ; +0x9b, 0x14004cafb\nxorps   xmm0, xmm0                                                     ; +0x9f, 0x14004caff\ncvtpd2ps xmm8, xmm1                                                    ; +0xa2, 0x14004cb02\nmovss   xmm1, cs:flt_140835388                                         ; +0xa7, 0x14004cb07\nucomiss xmm0, xmm1                                                     ; +0xaf, 0x14004cb0f\nmovaps  xmm10, xmm8                                                    ; +0xb2, 0x14004cb12\nmovss   dword ptr [rbx+10h], xmm8                                      ; +0xb6, 0x14004cb16\nxorps   xmm10, xmm11                                                   ; +0xbc, 0x14004cb1c\nmovss   dword ptr [rbx+14h], xmm8                                      ; +0xc0, 0x14004cb20\nmovss   dword ptr [rbx+1Ch], xmm10                                     ; +0xc6, 0x14004cb26\nmovss   dword ptr [rbx+20h], xmm8                                      ; +0xcc, 0x14004cb2c\nja      short loc_14004CB3D                                            ; +0xd2, 0x14004cb32\nxorps   xmm3, xmm3                                                     ; +0xd4, 0x14004cb34\nsqrtss  xmm3, xmm1                                                     ; +0xd7, 0x14004cb37\njmp     short loc_14004CB48                                            ; +0xdb, 0x14004cb3b\nmovaps  xmm0, xmm1; X                                                  ; +0xdd, 0x14004cb3d\ncall    sqrtf                                                          ; +0xe0, 0x14004cb40\nmovaps  xmm3, xmm0                                                     ; +0xe5, 0x14004cb45\nmovsd   xmm1, cs:qword_140835CC8                                       ; +0xe8, 0x14004cb48\nlea     rcx, [rbp+57h+var_A0]                                          ; +0xf0, 0x14004cb50\nxorps   xmm0, xmm0                                                     ; +0xf4, 0x14004cb54\nmov     [rbp+57h+var_9C], 0                                            ; +0xf7, 0x14004cb57\ncvtss2sd xmm0, xmm3                                                    ; +0xfe, 0x14004cb5e\nmov     r8, rbx                                                        ; +0x102, 0x14004cb62\nmov     rdx, rbx                                                       ; +0x105, 0x14004cb65\nmov     [rbp+57h+var_94], 0                                            ; +0x108, 0x14004cb68\nmov     [rbp+57h+var_90], 3F800000h                                    ; +0x10f, 0x14004cb6f\nmov     [rbp+57h+var_84], 0                                            ; +0x117, 0x14004cb77\ndivss   xmm9, xmm3                                                     ; +0x11e, 0x14004cb7e\ndivsd   xmm1, xmm0                                                     ; +0x123, 0x14004cb83\nmovss   [rbp+57h+var_A0], xmm9                                         ; +0x127, 0x14004cb87\ncvtpd2ps xmm2, xmm1                                                    ; +0x12d, 0x14004cb8d\nmovss   [rbp+57h+var_80], xmm9                                         ; +0x131, 0x14004cb91\nmovaps  xmm7, xmm2                                                     ; +0x137, 0x14004cb97\nmovss   [rbp+57h+var_88], xmm2                                         ; +0x13a, 0x14004cb9a\nxorps   xmm7, xmm11                                                    ; +0x13f, 0x14004cb9f\nmovss   [rbp+57h+var_98], xmm7                                         ; +0x143, 0x14004cba3\ncall    sub_14004CF20                                                  ; +0x148, 0x14004cba8\nmovaps  xmm0, xmm12; X                                                 ; +0x14d, 0x14004cbad\ncall    sinf                                                           ; +0x151, 0x14004cbb1\nmovaps  xmm6, xmm0                                                     ; +0x156, 0x14004cbb6\nmovaps  xmm0, xmm12; X                                                 ; +0x159, 0x14004cbb9\ncall    cosf                                                           ; +0x15d, 0x14004cbbd\nmovss   [rbp+57h+var_9C], xmm6                                         ; +0x162, 0x14004cbc2\nlea     rcx, [rbp+57h+var_A0]                                          ; +0x167, 0x14004cbc7\nxorps   xmm6, xmm11                                                    ; +0x16b, 0x14004cbcb\nmovss   [rbp+57h+var_A0], xmm0                                         ; +0x16f, 0x14004cbcf\nmov     r8, rbx                                                        ; +0x174, 0x14004cbd4\nmovss   [rbp+57h+var_94], xmm6                                         ; +0x177, 0x14004cbd7\nmov     rdx, rbx                                                       ; +0x17c, 0x14004cbdc\nmovss   dword ptr [rbp+57h+var_90], xmm0                               ; +0x17f, 0x14004cbdf\nmov     [rbp+57h+var_98], 0                                            ; +0x184, 0x14004cbe4\nmov     [rbp+57h+var_88], 0                                            ; +0x18b, 0x14004cbeb\nmov     [rbp+57h+var_80], 3F800000h                                    ; +0x192, 0x14004cbf2\ncall    sub_14004CF20                                                  ; +0x199, 0x14004cbf9\nmovaps  xmm0, xmm7                                                     ; +0x19e, 0x14004cbfe\nmovss   [rbp+57h+var_A0], xmm9                                         ; +0x1a1, 0x14004cc01\nxorps   xmm0, xmm11                                                    ; +0x1a7, 0x14004cc07\nmovss   [rbp+57h+var_88], xmm7                                         ; +0x1ab, 0x14004cc0b\nlea     rcx, [rbp+57h+var_A0]                                          ; +0x1b0, 0x14004cc10\nmovss   [rbp+57h+var_98], xmm0                                         ; +0x1b4, 0x14004cc14\nmovss   [rbp+57h+var_80], xmm9                                         ; +0x1b9, 0x14004cc19\nmov     [rbp+57h+var_9C], 0                                            ; +0x1bf, 0x14004cc1f\nmov     [rbp+57h+var_94], 0                                            ; +0x1c6, 0x14004cc26\nmov     dword ptr [rbp+57h+var_90], 3F800000h                          ; +0x1cd, 0x14004cc2d\ncall    sub_14004CF20                                                  ; +0x1d4, 0x14004cc34\nmovss   dword ptr [rbp+57h+var_90+4], xmm10                            ; +0x1d9, 0x14004cc39\nlea     rcx, [rbp+57h+var_A0]                                          ; +0x1df, 0x14004cc3f\nxorps   xmm10, xmm11                                                   ; +0x1e3, 0x14004cc43\nmovss   dword ptr [rbp+57h+var_90], xmm8                               ; +0x1e7, 0x14004cc47\nmovss   [rbp+57h+var_84], xmm10                                        ; +0x1ed, 0x14004cc4d\nmovss   [rbp+57h+var_80], xmm8                                         ; +0x1f3, 0x14004cc53\nmov     [rbp+57h+var_A0], 3F800000h                                    ; +0x1f9, 0x14004cc59\nmov     [rbp+57h+var_98], 0                                            ; +0x200, 0x14004cc60\nmov     [rbp+57h+var_88], 0                                            ; +0x207, 0x14004cc67\ncall    sub_14004CF20                                                  ; +0x20e, 0x14004cc6e\nmovzx   ecx, byte ptr [rdi+148h]                                       ; +0x213, 0x14004cc73\nlea     r11, [rsp+0C0h+var_s0]                                         ; +0x21a, 0x14004cc7a\nmovups  xmm0, xmmword ptr [rbx]                                        ; +0x222, 0x14004cc82\nmov     rdi, [r11+18h]                                                 ; +0x225, 0x14004cc85\nmovaps  xmm6, xmmword ptr [r11-10h]                                    ; +0x229, 0x14004cc89\nmovaps  xmm7, xmmword ptr [r11-20h]                                    ; +0x22e, 0x14004cc8e\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x233, 0x14004cc93\nmovaps  xmm9, xmmword ptr [r11-40h]                                    ; +0x238, 0x14004cc98\nmovaps  xmm10, xmmword ptr [r11-50h]                                   ; +0x23d, 0x14004cc9d\nmovaps  xmm11, xmmword ptr [r11-60h]                                   ; +0x242, 0x14004cca2\nmovaps  xmm12, xmmword ptr [r11-70h]                                   ; +0x247, 0x14004cca7\nmovd    xmm2, ecx                                                      ; +0x24c, 0x14004ccac\ncvtdq2ps xmm2, xmm2                                                    ; +0x250, 0x14004ccb0\ndivss   xmm2, cs:dword_140835964                                       ; +0x253, 0x14004ccb3\nshufps  xmm2, xmm2, 0                                                  ; +0x25b, 0x14004ccbb\nmulps   xmm0, xmm2                                                     ; +0x25f, 0x14004ccbf\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x262, 0x14004ccc2\nmovups  xmm0, xmmword ptr [rbx+10h]                                    ; +0x265, 0x14004ccc5\nmulps   xmm0, xmm2                                                     ; +0x269, 0x14004ccc9\nmulss   xmm2, dword ptr [rbx+20h]                                      ; +0x26c, 0x14004cccc\nmovups  xmmword ptr [rbx+10h], xmm0                                    ; +0x271, 0x14004ccd1\nmovss   dword ptr [rbx+20h], xmm2                                      ; +0x275, 0x14004ccd5\nmov     rbx, [r11+10h]                                                 ; +0x27a, 0x14004ccda\nmov     rsp, r11                                                       ; +0x27e, 0x14004ccde\npop     rbp                                                            ; +0x281, 0x14004cce1\nretn                                                                   ; +0x282, 0x14004cce2", "xrefs": ["CCSpriteWithHue::updateColor @ 0x14004ca57", "GJShopLayer::init @ 0x1403b06a7", "GJShopLayer::init @ 0x1403b0aac", "RewardUnlockLayer::init @ 0x140563bb9", "SecretLayer5::updateTweenActionInt @ 0x14058ae88", "<???> @ 0x1409100c4"], "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"}