//
// GJChestSprite::setColor from 0x10025dd30 to 0x10025ddfc (204 bytes)
//
// 2 xrefs:
// > sub_10025DDFC @ 0x10025de00
// > ??> @ 0x100910900
//
// This function is hookable on this platform (idp: arm, 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 11:01:37 +0000
//
__int64 __fastcall GJChestSprite::setColor(_BYTE *a1, __int16 *a2, float a3)
{
unsigned int v4; // s0
int v5; // w8
unsigned int v6; // s0
int v7; // w9
__int64 result; // x0
__int64 v9; // x19
__int64 v10; // x0
__int16 v11; // [xsp+Ch] [xbp-14h] BYREF
char v12; // [xsp+Eh] [xbp-12h]
v11 = *a2;
v12 = *((_BYTE *)a2 + 2);
if ( a1[604] == 1 )
{
LOBYTE(a3) = v11;
*(float *)&v4 = (float)LODWORD(a3) * 0.4;
v5 = (int)*(float *)&v4;
LOBYTE(v4) = HIBYTE(v11);
*(float *)&v6 = (float)v4 * 0.4;
v7 = (int)*(float *)&v6;
LOBYTE(v6) = v12;
v12 = (int)(float)((float)v6 * 0.4);
v11 = v5 | ((_WORD)v7 << 8);
}
cocos2d::CCSprite::setColor(a1, &v11);
result = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 488LL))(a1);
if ( result )
{
v9 = result;
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v10 = sub_1002E75A0(v9, 0);
return (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v10 + 960LL))(v10, &v11);
}
}
return result;
}