//
// RateDemonLayer::selectRating from 0x4e606c to 0x4e611e (178 bytes)
//
// 1 xrefs:
// > RateDemonLayer::init @ 0x4e65c8
//
// 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 v3; // r5
int v4; // r0
int v5; // r8
int v6; // r0
int m_demonRate; // r10
int v8; // r7
char *v9; // r1
int (*getNormalImage)(void); // r3
ButtonSprite *v11; // r0
int v12; // r3
int v13; // r1
if ( a2 )
a1->m_demonRate = a2->getTag(a2);
else
a1->m_demonRate = -1;
v3 = 0;
while ( v3 < cocos2d::CCArray::count(a1->m_demons) )
{
v4 = cocos2d::CCArray::objectAtIndex(a1->m_demons, v3++);
v5 = v4;
v6 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 528))(v4);
m_demonRate = a1->m_demonRate;
v8 = v6;
if ( m_demonRate == (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 32))(v5) )
v9 = &byte_9AC9CB;
else
v9 = &byte_9AC9C8;
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v8 + 472))(v8, v9);
}
getNormalImage = (int (*)(void))a1->m_submitButton->getNormalImage;
if ( a1->m_demonRate == -1 )
{
v11 = (ButtonSprite *)getNormalImage();
v12 = 42662;
v13 = 166;
}
else
{
v11 = (ButtonSprite *)getNormalImage();
v12 = 0xFFFF;
v13 = 255;
}
ButtonSprite::setColor(v11, (cocos2d::ccColor3B)(v12 | (v13 << 16)));
}