//
// RateDemonLayer::onRate from 0x100270e80 to 0x100270f88 (264 bytes)
//
// 1 xrefs:
// > RateDemonLayer::init @ 0x100270c84
//
// 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
//
void __fastcall RateDemonLayer::onRate(__int64 a1, double a2)
{
__int64 v2; // rax
char v3; // al
char v4; // cl
__int64 v5; // rax
__int64 v6; // rax
void (__fastcall ***v7)(_QWORD); // rdi
void *v8[4]; // [rsp+0h] [rbp-20h] BYREF
if ( *(_DWORD *)(a1 + 716) != -1 )
{
v2 = GameLevelManager::sharedState(a2);
v3 = GameLevelManager::rateDemon(
v2,
*(unsigned int *)(a1 + 712),
*(unsigned int *)(a1 + 716),
*(unsigned __int8 *)(a1 + 720));
v4 = *(_BYTE *)(a1 + 720);
if ( v3 && (v4 & 1) != 0 )
{
*(_QWORD *)(GameLevelManager::sharedState(a2) + 1360) = a1 + 672;
v5 = *(_QWORD *)(a1 + 728);
if ( v5 )
*(_QWORD *)(v5 + 664) = 0;
strcpy((char *)v8, "\"Sending rating...");
v6 = UploadActionPopup::create(a1 + 664, v8);
*(_QWORD *)(a1 + 728) = v6;
if ( ((__int64)v8[0] & 1) != 0 )
{
operator delete(v8[2]);
v6 = *(_QWORD *)(a1 + 728);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
v4 = *(_BYTE *)(a1 + 720);
}
if ( (v4 & 1) == 0 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
v7 = *(void (__fastcall ****)(_QWORD))(a1 + 736);
if ( v7 )
(**v7)(v7);
}
}
}