//
// FollowRewardPage::updateRate from 0xaaa500 to 0xaaa910 (1040 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'FollowRewardPage::updateRate @ 0xaaa914
// > ??> @ 0x6d9c0
// > ??> @ 0x14a4480
//
// 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 13:00:53 +0000
//
__int64 __fastcall FollowRewardPage::updateRate(cocos2d::CCArray **this)
{
unsigned int v2; // w19
GameStatsManager *v3; // x0
__int64 v5; // x22
_BOOL8 v6; // x0
_BOOL4 v7; // w22
GameManager *v8; // x0
unsigned int UGV; // w0
unsigned int v10; // w1
__int64 v11; // x0
__int64 v12; // x2
__int64 v13; // x22
__int64 v14; // x23
__int64 v15; // x0
__int64 (__fastcall *v16)(__int64); // x1
void (__fastcall *v17)(__int64, _QWORD); // x22
int v18; // w0
__int64 v19; // x22
_BOOL8 v20; // x0
GameManager *v21; // x0
__int64 v22; // x22
_BOOL8 isSpecialChestUnlocked; // x0
GameManager *v24; // x0
__int64 v25; // x22
_BOOL8 v26; // x0
GameManager *v27; // x0
__int64 v28; // x22
_BOOL8 v29; // x0
GameManager *v30; // x0
__int64 v31; // x22
_BOOL8 v32; // x0
GameManager *v33; // x0
__int64 v34; // x22
_BOOL8 v35; // x0
GameManager *v36; // x0
__int64 v37; // [xsp+50h] [xbp+50h] BYREF
__int64 v38; // [xsp+58h] [xbp+58h]
void *v39; // [xsp+60h] [xbp+60h]
v2 = 0;
v3 = (GameStatsManager *)cocos2d::CCArray::count(*(this + 86));
if ( (_DWORD)v3 )
{
do
{
if ( v2 )
{
switch ( v2 )
{
case 1u:
v22 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0008", 4u);
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v22, (char *)&v37);
v7 = isSpecialChestUnlocked;
if ( (v37 & 1) != 0 )
operator delete(v39);
v24 = (GameManager *)GameManager::sharedState((GameManager *)isSpecialChestUnlocked);
UGV = (unsigned __int8)GameManager::getUGV(v24, "24");
break;
case 2u:
v25 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0009", 4u);
v26 = GameStatsManager::isSpecialChestUnlocked(v25, (char *)&v37);
v7 = v26;
if ( (v37 & 1) != 0 )
operator delete(v39);
v27 = (GameManager *)GameManager::sharedState((GameManager *)v26);
UGV = (unsigned __int8)GameManager::getUGV(v27, "23");
break;
case 3u:
v28 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0010", 4u);
v29 = GameStatsManager::isSpecialChestUnlocked(v28, (char *)&v37);
v7 = v29;
if ( (v37 & 1) != 0 )
operator delete(v39);
v30 = (GameManager *)GameManager::sharedState((GameManager *)v29);
UGV = (unsigned __int8)GameManager::getUGV(v30, "26");
break;
case 4u:
v31 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0011", 4u);
v32 = GameStatsManager::isSpecialChestUnlocked(v31, (char *)&v37);
v7 = v32;
if ( (v37 & 1) != 0 )
operator delete(v39);
v33 = (GameManager *)GameManager::sharedState((GameManager *)v32);
UGV = (unsigned __int8)GameManager::getUGV(v33, "27");
break;
case 5u:
v34 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0024", 4u);
v35 = GameStatsManager::isSpecialChestUnlocked(v34, (char *)&v37);
v7 = v35;
if ( (v37 & 1) != 0 )
operator delete(v39);
v36 = (GameManager *)GameManager::sharedState((GameManager *)v35);
UGV = (unsigned __int8)GameManager::getUGV(v36, "32");
break;
case 6u:
v5 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0025", 4u);
v6 = GameStatsManager::isSpecialChestUnlocked(v5, (char *)&v37);
v7 = v6;
if ( (v37 & 1) != 0 )
operator delete(v39);
v8 = (GameManager *)GameManager::sharedState((GameManager *)v6);
UGV = (unsigned __int8)GameManager::getUGV(v8, "39");
break;
default:
goto LABEL_9;
}
}
else
{
v19 = GameStatsManager::sharedState(v3);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "0007", 4u);
v20 = GameStatsManager::isSpecialChestUnlocked(v19, (char *)&v37);
v7 = v20;
if ( (v37 & 1) != 0 )
operator delete(v39);
v21 = (GameManager *)GameManager::sharedState((GameManager *)v20);
UGV = (unsigned __int8)GameManager::getUGV(v21, "22");
}
if ( UGV > v7 )
{
v10 = v2++;
v11 = cocos2d::CCArray::objectAtIndex(*(this + 86), v10);
v12 = *(_QWORD *)v11;
*(_BYTE *)(v11 + 604) = 0;
v13 = v11;
(*(void (__fastcall **)(__int64, __int64 *))(v12 + 960))(v11, &qword_117B4F0);
v14 = (__int64)*(this + 73);
v15 = v13;
v16 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 64LL);
v17 = *(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 560LL);
v18 = v16(v15);
v17(v14, (unsigned int)(v18 + 10));
goto LABEL_10;
}
LABEL_9:
++v2;
LABEL_10:
v3 = (GameStatsManager *)cocos2d::CCArray::count(*(this + 86));
}
while ( v2 < (unsigned int)v3 );
}
return _stack_chk_guard;
}