//
// ShareLevelLayer::selectRating from 0x10026dd00 to 0x10026de5a (346 bytes)
//
// 2 xrefs:
// > ShareLevelLayer::setupStars @ 0x10026d900
// > ShareLevelLayer::setupStars @ 0x10026d676
//
// This function is hookable on this platform (idp: pc, 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:27:36 +0000
//
__int64 __fastcall ShareLevelLayer::selectRating(__int64 a1, __int64 a2, double a3)
{
char v3; // al
unsigned int v4; // r14d
__int64 v5; // r15
__int64 v6; // r12
int v7; // r13d
const char *v8; // rsi
int v9; // eax
const std::string::value_type *CString; // r14
__int64 v11; // rax
__int64 v12; // rbx
__int64 v13; // rax
__int64 v14; // rax
char v16; // [rsp-8h] [rbp-30h]
v16 = v3;
if ( a2 )
*(_DWORD *)(a1 + 672) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 680)) )
{
v4 = 0;
do
{
v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 680), v4);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1072LL))(v5);
v7 = *(_DWORD *)(a1 + 672);
v8 = "GJ_button_04.png";
if ( v7 == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v5 + 64LL))(v5) )
v8 = "GJ_button_01.png";
ButtonSprite::updateBGImage(v6, (__int64)v8);
++v4;
}
while ( v4 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 680)) );
}
v9 = *(_DWORD *)(a1 + 672);
*(_DWORD *)(*(_QWORD *)(a1 + 664) + 1044LL) = v9;
if ( v9 == 1 )
{
CString = "difficulty_auto_btn_001.png";
}
else
{
v11 = sub_10088E820("difficulty_%02d_btn_001.png", v16);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v11);
}
v12 = *(_QWORD *)(a1 + 688);
v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(a3);
v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, CString);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 1160LL))(v12, v14);
}