//
// GJItemIcon::darkenStoreItem from 0x8ba960 to 0x8baae4 (388 bytes)
//
// 4 xrefs:
// > GJItemIcon::darkenStoreItem @ 0x8bab1c
// > ShardsPage::init @ 0xaa46f0
// > GJPathPage::init @ 0xba71b0
// > ??> @ 0x8f7b8
//
// 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 12:56:27 +0000
//
cocos2d::CCArray *__fastcall GJItemIcon::darkenStoreItem(__int64 a1, __int64 a2)
{
_QWORD *v2; // x19
__int64 v3; // x0
cocos2d::CCArray *result; // x0
__int64 v5; // x20
cocos2d::CCArray *v6; // x20
bool v7; // cf
unsigned int v8; // w1
unsigned int i; // w19
__int64 v10; // x0
if ( *(_BYTE *)(a1 + 620) )
{
v2 = *(_QWORD **)(a1 + 600);
(*(void (__fastcall **)(_QWORD *, void *))(*v2 + 960LL))(v2, &unk_114C9B0);
(*(void (__fastcall **)(_QWORD *, __int64))(*v2 + 912LL))(v2, 120);
*((_BYTE *)v2 + 660) = 0;
SimplePlayer::updateColors((SimplePlayer *)v2);
SimplePlayer::hideSecondary((SimplePlayer *)v2);
v3 = v2[80];
if ( v3 )
{
GJRobotSprite::updateColor01(v3, a2);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v2[80] + 912LL))(v2[80], 4294967230LL);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)v2[80] + 1256LL))(v2[80]);
}
result = (cocos2d::CCArray *)v2[81];
if ( result )
{
GJRobotSprite::updateColor01(result, a2);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v2[81] + 912LL))(v2[81], 4294967230LL);
return (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v2[81] + 1256LL))(v2[81]);
}
}
else
{
v5 = *(_QWORD *)(a1 + 600);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v5 + 960LL))(v5, &unk_114C9B0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 912LL))(v5, 120);
result = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 488LL))(v5);
v6 = result;
if ( result )
{
v7 = (unsigned int)cocos2d::CCArray::count(result) == 0;
v8 = 0;
result = v6;
for ( i = 1; !v7; ++i )
{
v10 = cocos2d::CCArray::objectAtIndex(result, v8);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 344LL))(v10, 0);
v7 = i >= (unsigned int)cocos2d::CCArray::count(v6);
v8 = i;
result = v6;
}
}
}
return result;
}