//
// RateDemonLayer::onRate from 0x61663c to 0x6166e4 (168 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:54:55 +0000
//
GameLevelManager *__fastcall RateDemonLayer::onRate(GameLevelManager *this, cocos2d::CCObject *a2, int a3, int a4)
{
GameLevelManager *v4; // r4
GameLevelManager *v5; // r0
int v6; // r3
int v7; // r2
int v8; // r3
GameLevelManager *v9; // [sp+0h] [bp-10h] BYREF
cocos2d::CCObject *v10; // [sp+4h] [bp-Ch]
int v11; // [sp+8h] [bp-8h]
int v12; // [sp+Ch] [bp-4h]
v9 = this;
v10 = a2;
v11 = a3;
v12 = a4;
v4 = this;
if ( *((_DWORD *)this + 137) != -1 )
{
v5 = (GameLevelManager *)GameLevelManager::sharedState(this);
this = (GameLevelManager *)GameLevelManager::rateDemon(
v5,
*((const char **)v4 + 136),
*((_DWORD *)v4 + 137),
*((unsigned __int8 *)v4 + 552));
if ( this && *((_BYTE *)v4 + 552) )
{
*(_DWORD *)(GameLevelManager::sharedState(this) + 888) = (char *)v4 + 524;
v6 = *((_DWORD *)v4 + 139);
if ( v6 )
*(_DWORD *)(v6 + 520) = 0;
v9 = nullptr;
v10 = nullptr;
v11 = 0;
std::string::__init((int *)&v9, "Sending rating...", 0x11u);
*((_DWORD *)v4 + 139) = UploadActionPopup::create((int)v4 + 520, (int)&v9, v7, v8);
std::string::~string((int)&v9);
this = (GameLevelManager *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v4 + 139) + 656))(*((_DWORD *)v4 + 139));
}
if ( !*((_BYTE *)v4 + 552) )
return (GameLevelManager *)RateDemonLayer::onClose(v4, (cocos2d::CCObject *)*((unsigned __int8 *)v4 + 552));
}
return this;
}