//
// RateLevelLayer::selectRating from 0x10005e93c to 0x10005ea30 (244 bytes)
//
// 2 xrefs:
// > RateLevelLayer::init @ 0x10005e914
// > RateLevelLayer::init @ 0x10005e744
//
// 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 RateLevelLayer::selectRating(RateLevelLayer *a1, cocos2d::CCObject *a2)
{
int v3; // w0
__int64 v4; // x20
__int64 v5; // x0
int m_levelRate; // w20
ButtonSprite *v7; // x0
int v8; // w1
_WORD v9[2]; // [xsp+Ch] [xbp-34h] BYREF
if ( a2 )
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
else
v3 = -1;
a1->m_levelRate = v3;
if ( (unsigned int)sub_10024A36C(a1->m_difficulties) )
{
v4 = 0;
do
{
v5 = sub_10024A388(a1->m_difficulties, v4);
if ( (_DWORD)v4 != a1->m_levelRate )
memset(v9, 125, 3);
(*(void (**)(void))(*(_QWORD *)v5 + 944LL))();
v4 = (unsigned int)(v4 + 1);
}
while ( (unsigned int)v4 < (unsigned int)sub_10024A36C(a1->m_difficulties) );
}
m_levelRate = a1->m_levelRate;
v7 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_submitButton->getNormalImage)(a1->m_submitButton);
if ( m_levelRate == -1 )
v8 = 10921638;
else
v8 = 0xFFFFFF;
ButtonSprite::setColor(v7, (cocos2d::ccColor3B)v8);
}