//
// LevelInfoLayer::onRate from 0x1002b17f0 to 0x1002b18fd (269 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::FLAlert_Clicked @ 0x1002b1b48
//
// 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:28:01 +0000
//
void __fastcall LevelInfoLayer::onRate(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // rdx
double v4; // xmm0_8
__int64 v5; // rax
_QWORD *v6; // rax
__int64 v7; // rax
__int64 v8; // rbx
_QWORD v9[2]; // [rsp+8h] [rbp-28h] BYREF
void *__p; // [rsp+18h] [rbp-18h]
if ( !*(_BYTE *)(a1 + 488) )
{
*(_QWORD *)&v4 = GameManager::sharedState(a1, a2, a3).u64[0];
if ( *(_BYTE *)(v5 + 932) )
{
v6 = (_QWORD *)sub_1005949B0(
(unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 504) + 328LL)
- *(_DWORD *)(*(_QWORD *)(a1 + 504) + 332LL)),
v4);
v6[86] = a1 + 424;
(*(void (__fastcall **)(_QWORD *))(*v6 + 1312LL))(v6);
}
else
{
GameManager::sharedState(a1, a2, v3);
*(_BYTE *)(v7 + 932) = 1;
__p = operator new(0x90u);
v9[0] = 145;
v9[1] = 136;
strcpy(
(char *)__p,
"Please rate the difficulty as fairly as possible. \n"
"(Demon and Auto levels are manually verified before accepted)");
v8 = FLAlertLayer::create_1(a1 + 440, "Rate Difficulty", v9, "OK", 0, 300.0);
if ( (v9[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 72LL))(v8, 7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
}
}
}