//
// GameToolbox::getMultipliedHSV from 0x1004ec870 to 0x1004ec905 (149 bytes)
//
// 4 xrefs:
// > PlayLayer::applyCustomEnterEffect @ 0x100085da8
// > GJBaseGameLayer::processAreaTintGroupAction @ 0x1001211e4
// > GJEffectManager::calculateInheritedColor @ 0x1002c9d90
// > GJEffectManager::colorForPulseEffect @ 0x1002c9fae
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:31:22 +0000
//
unsigned __int64 __fastcall GameToolbox::getMultipliedHSV(__int64 a1, float a2)
{
__int64 v2; // rcx
__int64 v3; // rsi
unsigned int v4; // eax
__m128i v5; // xmm3
v2 = *(unsigned __int8 *)(a1 + 12);
v3 = *(unsigned __int8 *)(a1 + 13);
if ( (v2 & 1) == 0 )
{
v4 = *(_DWORD *)(a1 + 8);
if ( (v3 & 1) == 0 )
goto LABEL_3;
LABEL_5:
v5 = _mm_cvtsi32_si128(v4);
*(float *)v5.i32 = *(float *)v5.i32 * a2;
return ((unsigned __int64)*(unsigned __int16 *)(a1 + 14) << 48)
| (v3 << 40)
| (v2 << 32)
| (unsigned int)_mm_cvtsi128_si32(v5);
}
v4 = *(_DWORD *)(a1 + 8);
if ( (v3 & 1) != 0 )
goto LABEL_5;
LABEL_3:
v5 = _mm_cvtsi32_si128(v4);
*(float *)v5.i32 = (float)(*(float *)v5.i32 * a2) + (float)(1.0 - a2);
return ((unsigned __int64)*(unsigned __int16 *)(a1 + 14) << 48)
| (v3 << 40)
| (v2 << 32)
| (unsigned int)_mm_cvtsi128_si32(v5);
}