//
// FollowRewardPage::onSpecialItem from 0x1004254ec to 0x100425944 (1112 bytes)
//
// 1 xrefs:
// > FollowRewardPage::init @ 0x100425064
//
// 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
//
void __fastcall FollowRewardPage::onSpecialItem(FollowRewardPage *a1, cocos2d::CCObject *a2)
{
__int64 v4; // x20
GameManager *v5; // x0
bool UGV; // w22
GameManager *v7; // x0
GameManager *v8; // x0
GameManager *v9; // x0
GameManager *v10; // x0
GameManager *v11; // x0
GameStatsManager *v12; // x20
std::string *v13; // x21
std::string *v14; // x4
FLAlertLayer *v15; // x19
GJRewardItem *v16; // x0
GJRewardItem *v17; // x20
RewardUnlockLayer *v18; // x21
std::string v19; // [xsp+0h] [xbp-C0h] BYREF
std::string __p; // [xsp+20h] [xbp-A0h] BYREF
std::string v21; // [xsp+40h] [xbp-80h] BYREF
std::string v22; // [xsp+58h] [xbp-68h] BYREF
std::string v23; // [xsp+70h] [xbp-50h] BYREF
std::string v24; // [xsp+88h] [xbp-38h] BYREF
v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
memset(&v24, 0, sizeof(v24));
sub_100009900(&v23, "");
sub_100009900(&v22, "");
sub_100009900(&v21, "");
if ( (int)v4 > 3 )
{
switch ( (_DWORD)v4 )
{
case 4:
std::string::assign(&v24, "0010");
v9 = GameManager::sharedState();
UGV = GameManager::getUGV(v9, "26");
std::string::assign(&v23, "Twitch");
std::string::assign(&v22, "Follow Geometry Dash on Twitch\nto unlock this chest!");
std::string::assign(&v21, "Follow!");
break;
case 5:
std::string::assign(&v24, "0011");
v11 = GameManager::sharedState();
UGV = GameManager::getUGV(v11, "27");
std::string::assign(&v23, "Discord");
std::string::assign(&v22, "Join Geometry Dash on Discord\nto unlock this chest!");
std::string::assign(&v21, "Join!");
break;
case 6:
std::string::assign(&v24, "0024");
v7 = GameManager::sharedState();
UGV = GameManager::getUGV(v7, "32");
std::string::assign(&v23, "Reddit");
std::string::assign(&v22, "Join Geometry Dash on Reddit\nto unlock this chest!");
std::string::assign(&v21, "Join!");
break;
default:
goto LABEL_35;
}
}
else
{
switch ( (_DWORD)v4 )
{
case 1:
std::string::assign(&v24, "0007");
v8 = GameManager::sharedState();
UGV = GameManager::getUGV(v8, "22");
std::string::assign(&v23, "YouTube");
std::string::assign(&v22, "Subscribe to RobTop Games on YouTube\nto unlock this chest!");
std::string::assign(&v21, "Sub!");
break;
case 2:
std::string::assign(&v24, "0008");
v10 = GameManager::sharedState();
UGV = GameManager::getUGV(v10, "24");
std::string::assign(&v23, "Twitter");
std::string::assign(&v22, "Follow RobTop Games on Twitter\nto unlock this chest!");
std::string::assign(&v21, "Follow!");
break;
case 3:
std::string::assign(&v24, "0009");
v5 = GameManager::sharedState();
UGV = GameManager::getUGV(v5, "23");
std::string::assign(&v23, "Facebook");
std::string::assign(&v22, "Like Geometry Dash on Facebook\nto unlock this chest!");
std::string::assign(&v21, "Like!");
break;
default:
goto LABEL_35;
}
}
if ( UGV )
{
v12 = GameStatsManager::sharedState();
if ( SHIBYTE(v24.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&v19, v24.__r_.__value_.__l.__data_, v24.__r_.__value_.__l.__size_);
else
v19 = v24;
v16 = GameStatsManager::unlockSpecialChest(v12, (__int64)&v19);
v17 = v16;
if ( SHIBYTE(v19.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(v19.__r_.__value_.__l.__data_);
if ( !v17 )
goto LABEL_35;
}
else if ( !v16 )
{
goto LABEL_35;
}
FollowRewardPage::switchToOpenedState((FollowRewardPage *)v16, (CCMenuItemSpriteExtra *)a2);
v18 = RewardUnlockLayer::create(v17->m_rewardType, nullptr);
((void (__fastcall *)(FollowRewardPage *, RewardUnlockLayer *, __int64))a1->addChild_0)(a1, v18, 100);
RewardUnlockLayer::showCollectReward(v18, v17);
goto LABEL_35;
}
if ( (v23.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v13 = &v23;
else
v13 = (std::string *)v23.__r_.__value_.__r.__words[0];
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__p, v22.__r_.__value_.__l.__data_, v22.__r_.__value_.__l.__size_);
else
__p = v22;
if ( (v21.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v14 = &v21;
else
v14 = (std::string *)v21.__r_.__value_.__r.__words[0];
v15 = FLAlertLayer::create_1(
(__int64)&a1->FLAlertLayerProtocol,
(__int64)v13,
(__int64)&__p,
(__int64)"Cancel",
(__int64)v14,
380.0);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
((void (__fastcall *)(FLAlertLayer *, __int64))v15->setTag)(v15, v4);
ButtonSprite::updateBGImage(v15->m_button2, "GJ_button_02.png");
((void (__fastcall *)(FLAlertLayer *))v15->show)(v15);
LABEL_35:
if ( SHIBYTE(v21.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v21.__r_.__value_.__l.__data_);
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v22.__r_.__value_.__l.__data_);
if ( SHIBYTE(v23.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v23.__r_.__value_.__l.__data_);
if ( SHIBYTE(v24.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v24.__r_.__value_.__l.__data_);
}