//
// GJChestSprite::setColor from 0xa8a024 to 0xa8a118 (244 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJChestSprite::setColor @ 0xa8a120
// > ??> @ 0x8afe8
// > ??> @ 0x1499590
//
// 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 13:00:36 +0000
//
__int64 __fastcall GJChestSprite::setColor(unsigned __int8 *a1, __int16 *a2)
{
__int16 v3; // w2
unsigned __int8 v4; // w1
int v5; // w0
cocos2d::CCArray *v6; // x0
cocos2d::CCArray *v7; // x20
__int64 v9; // x0
__int16 v10; // [xsp+30h] [xbp+30h] BYREF
unsigned __int8 v11; // [xsp+32h] [xbp+32h]
v3 = *a2;
v4 = *((_BYTE *)a2 + 2);
v5 = a1[604];
v10 = v3;
v11 = v4;
if ( v5 )
{
HIBYTE(v10) = (unsigned int)(float)((float)HIBYTE(v10) * 0.4);
v11 = (unsigned int)(float)((float)v4 * 0.4);
LOBYTE(v10) = (unsigned int)(float)((float)(unsigned __int8)v10 * 0.4);
}
cocos2d::CCSprite::setColor(a1, &v10);
v6 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(unsigned __int8 *))(*(_QWORD *)a1 + 488LL))(a1);
v7 = v6;
if ( v6 && (unsigned int)cocos2d::CCArray::count(v6) )
{
v9 = cocos2d::CCArray::objectAtIndex(v7, 0);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v9 + 960LL))(v9, &v10);
}
return _stack_chk_guard;
}