//
// RateDemonLayer::selectRating from 0x100284190 to 0x100284278 (232 bytes)
//
// 2 xrefs:
// > RateDemonLayer::init @ 0x10028416d
// > RateDemonLayer::init @ 0x100283da4
//
// 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 __fastcall RateDemonLayer::selectRating(RateDemonLayer *a1, cocos2d::CCObject *a2)
{
int v2; // eax
unsigned int v3; // r14d
__int64 v4; // r15
__int64 v5; // r12
int m_demonRate; // r13d
void *v7; // rsi
_BOOL8 v8; // r14
ButtonSprite *v9; // rax
if ( a2 )
v2 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
else
v2 = -1;
a1->m_demonRate = v2;
if ( (unsigned int)sub_100720070(a1->m_demons) )
{
v3 = 0;
do
{
v4 = sub_1007200C0(a1->m_demons, v3);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1056LL))(v4);
m_demonRate = a1->m_demonRate;
v7 = &unk_100818A33;
if ( m_demonRate == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4) )
v7 = &unk_100818A36;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v5 + 944LL))(v5, v7);
++v3;
}
while ( v3 < (unsigned int)sub_100720070(a1->m_demons) );
}
v8 = a1->m_demonRate != -1;
v9 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_submitButton->getNormalImage)(a1->m_submitButton);
ButtonSprite::setColor(v9, (cocos2d::ccColor3B)(v8 ? -1 : 0xFFA6A6A6));
}