//
// LevelInfoLayer::onRateStarsMod from 0x1402fe4e0 to 0x1402fe70a (554 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::init @ 0x1402f8940
// > ??> @ 0x1406d4280
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
void LevelInfoLayer::onRateStarsMod(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
GJAccountManager *v3; // rax
GJGameLevel *m_level; // rdi
GJRateLevelLayer *v5; // rbx
__int64 (__fastcall *show)(__int64); // rdx
RateStarsLayer *v7; // rax
if ( !a1->m_isBusy )
{
v3 = GJAccountManager::sharedState();
m_level = a1->m_level;
if ( v3->m_accountID - v3->m_unkInt1 == 2795 )
{
v5 = (GJRateLevelLayer *)operator new(0x420u);
SetupTriggerPopup::SetupTriggerPopup(v5);
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJRateLevelLayer_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::TextInputDelegate::__vftable = (TextInputDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::ConfigureValuePopupDelegate::__vftable = (ConfigureValuePopupDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->SetupTriggerPopup::SliderDelegate::__vftable = (SliderDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->UploadPopupDelegate::__vftable = (UploadPopupDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->UploadActionDelegate::__vftable = (UploadActionDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->LevelRateInfoDelegate::__vftable = (LevelRateInfoDelegate_vtbl *)&GJRateLevelLayer::`vftable';
v5->FLAlertLayerProtocol::__vftable = (FLAlertLayerProtocol_vtbl *)&GJRateLevelLayer::`vftable';
v5->m_level = nullptr;
v5->m_uploadFinished = 0;
v5->m_submitButton = nullptr;
v5->m_starButtons = nullptr;
v5->m_stars = 0;
v5->m_coinsToggled = 0;
v5->m_coinSprite = nullptr;
v5->m_uploadPopup = nullptr;
v5->m_difficultySprite = nullptr;
v5->m_featureState = 0;
v5->m_loadingCircle = nullptr;
cocos2d::CCPoint::CCPoint(&v5->m_center);
if ( GJRateLevelLayer::init(v5, m_level) )
{
cocos2d::CCObject::autorelease(v5);
}
else
{
((void (__fastcall *)(GJRateLevelLayer *, __int64))v5->~GJRateLevelLayer)(v5, 1);
v5 = nullptr;
}
show = (__int64 (__fastcall *)(__int64))v5->show;
if ( show == CollisionBlockPopup::show )
CollisionBlockPopup::show((__int64)v5);
else
show((__int64)v5);
}
else
{
v7 = RateStarsLayer::create(m_level->m_levelID.random - m_level->m_levelID.seed, m_level->m_levelLength == 5, 1);
v7->show(v7);
}
}
}