//
// RateDemonLayer::selectRating from 0x933b24 to 0x933c48 (292 bytes)
//
// 4 xrefs:
// > RateDemonLayer::init @ 0x934460
// > ??> @ 0x33528
// > RateDemonLayer::init @ 0x9342b4
// > ??> @ 0x1229890
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void RateDemonLayer::selectRating(RateDemonLayer *a1, cocos2d::CCObject *a2)
{
unsigned int i; // w19
__int64 v4; // x20
__int64 v5; // x22
__int64 (*getNormalImage)(void); // x1
ButtonSprite *v7; // x0
void *v8; // x1
if ( a2 )
a1->m_demonRate = a2->getTag(a2);
else
a1->m_demonRate = -1;
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(a1->m_demons); ++i )
{
v4 = cocos2d::CCArray::objectAtIndex(a1->m_demons, i);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1056LL))(v4);
(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4);
(*(void (**)(void))(*(_QWORD *)v5 + 944LL))();
}
getNormalImage = (__int64 (*)(void))a1->m_submitButton->getNormalImage;
if ( a1->m_demonRate == -1 )
{
v7 = (ButtonSprite *)getNormalImage();
LODWORD(v8) = 10921638;
}
else
{
v7 = (ButtonSprite *)getNormalImage();
v8 = &unk_FFFFFF;
}
ButtonSprite::setColor(v7, (cocos2d::ccColor3B)v8);
}