//
// RateDemonLayer::selectRating from 0x100270d40 to 0x100270e28 (232 bytes)
//
// 2 xrefs:
// > RateDemonLayer::init @ 0x100270d21
// > RateDemonLayer::init @ 0x100270958
//
// 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:37 +0000
//
__int64 __fastcall RateDemonLayer::selectRating(__int64 a1, __int64 a2)
{
int v2; // eax
unsigned int v3; // r14d
__int64 v4; // r15
__int64 v5; // r12
int v6; // r13d
void *v7; // rsi
int v8; // r14d
_QWORD *v9; // rax
if ( a2 )
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
else
v2 = -1;
*(_DWORD *)(a1 + 716) = v2;
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 696)) )
{
v3 = 0;
do
{
v4 = sub_1007FEFE0(*(_QWORD *)(a1 + 696), v3);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1072LL))(v4);
v6 = *(_DWORD *)(a1 + 716);
v7 = &unk_100A06F33;
if ( v6 == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4) )
v7 = &unk_100A06F36;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v5 + 960LL))(v5, v7);
++v3;
}
while ( v3 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 696)) );
}
v8 = *(_DWORD *)(a1 + 716) != -1;
v9 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 1072LL))(*(_QWORD *)(a1 + 688));
return ButtonSprite::setColor(v9, -v8 | 0xFFA6A6A6);
}