//
// GJRateLevelLayer::onRate from 0x9531b8 to 0x9532d4 (284 bytes)
//
// 3 xrefs:
// > ??> @ 0xfa7c8
// > GJRateLevelLayer::init @ 0x952a64
// > ??> @ 0x15479f0
//
// This function is hookable on this platform (idp: arm, 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:57:23 +0000
//
__int64 __fastcall GJRateLevelLayer::onRate(GJRateLevelLayer *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
GameLevelManager *v4; // x0
__int64 v6; // x0
__int64 v7; // x0
char v8; // w1
__int64 v9[2]; // [xsp+30h] [xbp+30h] BYREF
void *v10; // [xsp+40h] [xbp+40h]
if ( *((_DWORD *)this + 270) != -1 )
{
v3 = (GameLevelManager *)GameLevelManager::sharedState(_stack_chk_guard);
v4 = (GameLevelManager *)(unsigned __int8)GameLevelManager::suggestLevelStars(
v3,
(const char *)(unsigned int)(*(_DWORD *)(*((_QWORD *)this + 131) + 328LL)
- *(_DWORD *)(*((_QWORD *)this + 131) + 332LL)),
*((_DWORD *)this + 270),
*(_DWORD *)(*((_QWORD *)this + 138) + 596LL),
*((_BYTE *)this + 1084),
0);
if ( (_BYTE)v4 )
{
*(_QWORD *)(GameLevelManager::sharedState(v4) + 1360) = (char *)this + 1024;
v6 = *((_QWORD *)this + 137);
if ( v6 )
*(_QWORD *)(v6 + 664) = 0;
v9[0] = 0;
v9[1] = 0;
v10 = nullptr;
std::string::__init(v9, "Sending rating...", 0x11u);
v7 = UploadActionPopup::create((char *)this + 1016, v9);
v8 = v9[0];
*((_QWORD *)this + 137) = v7;
if ( (v8 & 1) != 0 )
{
operator delete(v10);
v7 = *((_QWORD *)this + 137);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
}
}
return _stack_chk_guard;
}