{"type": "func", "start": 4300144320, "end": 4300144469, "name": "GameToolbox::getMultipliedHSV", "pseudocode": "// \n// GameToolbox::getMultipliedHSV from 0x1004efec0 to 0x1004eff55 (149 bytes)\n// \n// 4 xrefs:\n// > PlayLayer::applyCustomEnterEffect @ 0x1000b84a8\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x100142c44\n// > GJEffectManager::calculateInheritedColor @ 0x1002df2f0\n// > GJEffectManager::colorForPulseEffect @ 0x1002df50e\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\ncocos2d::ccHSVValue __fastcall GameToolbox::getMultipliedHSV(const cocos2d::ccHSVValue *a1, float a2)\n{\n  __m128 v3; // xmm0\n  __int64 absoluteSaturation; // rcx\n  __int64 absoluteBrightness; // rsi\n  __m128 v6; // xmm2\n  float v; // eax\n  __m128i v8; // xmm3\n  cocos2d::ccHSVValue result; // 0:xmm0_8.8,8:rax.8\n\n  v3 = (__m128)*(unsigned __int64 *)&a1->h;\n  absoluteSaturation = a1->absoluteSaturation;\n  absoluteBrightness = a1->absoluteBrightness;\n  if ( (absoluteSaturation & 1) == 0 )\n  {\n    v6 = _mm_movehdup_ps(v3);\n    v6.f32[0] = (float)(v6.f32[0] * a2) + (float)(1.0 - a2);\n    v = a1->v;\n    if ( (absoluteBrightness & 1) == 0 )\n      goto LABEL_3;\nLABEL_5:\n    v8 = _mm_cvtsi32_si128(LODWORD(v));\n    *(float *)v8.i32 = *(float *)v8.i32 * a2;\n    goto LABEL_6;\n  }\n  v6 = _mm_movehdup_ps(v3);\n  v6.f32[0] = v6.f32[0] * a2;\n  v = a1->v;\n  if ( (absoluteBrightness & 1) != 0 )\n    goto LABEL_5;\nLABEL_3:\n  v8 = _mm_cvtsi32_si128(LODWORD(v));\n  *(float *)v8.i32 = (float)(*(float *)v8.i32 * a2) + (float)(1.0 - a2);\nLABEL_6:\n  v3.f32[0] = v3.f32[0] * a2;\n  v3.i64[0] = _mm_insert_ps(v3, v6, 16).u64[0];\n  *(_QWORD *)&result.v = ((unsigned __int64)*(unsigned __int16 *)a1->__pad << 48)\n                       | (absoluteBrightness << 40)\n                       | (absoluteSaturation << 32)\n                       | (unsigned int)_mm_cvtsi128_si32(v8);\n  result.h = v3.f32[0];\n  result.s = v3.f32[1];\n  return result;\n}", "assembly": "; \n; GameToolbox::getMultipliedHSV from 0x1004efec0 to 0x1004eff55 (149 bytes)\n; \n; 4 xrefs:\n; > PlayLayer::applyCustomEnterEffect @ 0x1000b84a8\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x100142c44\n; > GJEffectManager::calculateInheritedColor @ 0x1002df2f0\n; > GJEffectManager::colorForPulseEffect @ 0x1002df50e\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, 0x1004efec0\nmov     rbp, rsp                                                       ; +0x1, 0x1004efec1\nmovaps  xmm1, xmm0                                                     ; +0x4, 0x1004efec4\nmovsd   xmm0, qword ptr [rdi]                                          ; +0x7, 0x1004efec7\nmovzx   ecx, byte ptr [rdi+0Ch]                                        ; +0xb, 0x1004efecb\nmovzx   esi, byte ptr [rdi+0Dh]                                        ; +0xf, 0x1004efecf\nmovzx   edx, word ptr [rdi+0Eh]                                        ; +0x13, 0x1004efed3\ntest    cl, 1                                                          ; +0x17, 0x1004efed7\njz      short loc_1004EFF07                                            ; +0x1a, 0x1004efeda\nmovshdup xmm2, xmm0                                                    ; +0x1c, 0x1004efedc\nmulss   xmm2, xmm1                                                     ; +0x20, 0x1004efee0\nmov     eax, [rdi+8]                                                   ; +0x24, 0x1004efee4\ntest    sil, 1                                                         ; +0x27, 0x1004efee7\njnz     short loc_1004EFF28                                            ; +0x2b, 0x1004efeeb\nmovss   xmm4, cs:alpha                                                 ; +0x2d, 0x1004efeed\nsubss   xmm4, xmm1                                                     ; +0x35, 0x1004efef5\nmovd    xmm3, eax                                                      ; +0x39, 0x1004efef9\nmulss   xmm3, xmm1                                                     ; +0x3d, 0x1004efefd\naddss   xmm3, xmm4                                                     ; +0x41, 0x1004eff01\njmp     short loc_1004EFF30                                            ; +0x45, 0x1004eff05\nmovss   xmm3, cs:alpha                                                 ; +0x47, 0x1004eff07\nsubss   xmm3, xmm1                                                     ; +0x4f, 0x1004eff0f\nmovshdup xmm2, xmm0                                                    ; +0x53, 0x1004eff13\nmulss   xmm2, xmm1                                                     ; +0x57, 0x1004eff17\naddss   xmm2, xmm3                                                     ; +0x5b, 0x1004eff1b\nmov     eax, [rdi+8]                                                   ; +0x5f, 0x1004eff1f\ntest    sil, 1                                                         ; +0x62, 0x1004eff22\njz      short loc_1004EFEED                                            ; +0x66, 0x1004eff26\nmovd    xmm3, eax                                                      ; +0x68, 0x1004eff28\nmulss   xmm3, xmm1                                                     ; +0x6c, 0x1004eff2c\nmulss   xmm0, xmm1                                                     ; +0x70, 0x1004eff30\ninsertps xmm0, xmm2, 10h                                               ; +0x74, 0x1004eff34\nmovd    eax, xmm3                                                      ; +0x7a, 0x1004eff3a\nshl     rdx, 30h                                                       ; +0x7e, 0x1004eff3e\nshl     rsi, 28h                                                       ; +0x82, 0x1004eff42\nshl     rcx, 20h                                                       ; +0x86, 0x1004eff46\nor      rcx, rsi                                                       ; +0x8a, 0x1004eff4a\nor      rcx, rdx                                                       ; +0x8d, 0x1004eff4d\nor      rax, rcx                                                       ; +0x90, 0x1004eff50\npop     rbp                                                            ; +0x93, 0x1004eff53\nretn                                                                   ; +0x94, 0x1004eff54", "xrefs": ["PlayLayer::applyCustomEnterEffect @ 0x1000b84a8", "GJBaseGameLayer::processAreaTintGroupAction @ 0x100142c44", "GJEffectManager::calculateInheritedColor @ 0x1002df2f0", "GJEffectManager::colorForPulseEffect @ 0x1002df50e"], "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"}