//
// DailyLevelPage::claimLevelReward from 0x607c00 to 0x607ce8 (232 bytes)
//
// 1 xrefs:
// > DailyLevelNode::onClaimReward @ 0x608cc2
//
// 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:45 +0000
//
int *__fastcall DailyLevelPage::claimLevelReward(
int *a1,
DailyLevelNode *a2,
GJGameLevel *a3,
const cocos2d::CCPoint *a4)
{
GameStatsManager *v8; // r0
cocos2d::CCObject *v9; // r0
RewardsPage *v10; // r2
GJRewardItem *v11; // r4
RewardUnlockLayer *v12; // r8
int v13; // r3
GameStatsManager *v14; // r0
int BonusDiamonds; // r11
int v16; // r0
GameLevelManager *v17; // r0
_DWORD *v18; // r0
_BYTE v20[8]; // [sp+24h] [bp-10h] BYREF
v8 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)a1);
v9 = GameStatsManager::completedDailyLevel(v8, a3);
v11 = v9;
if ( v9 )
{
v12 = (RewardUnlockLayer *)RewardUnlockLayer::create(*((RewardUnlockLayer **)v9 + 15), 0, v10);
(*(void (__fastcall **)(int *, RewardUnlockLayer *, int))(*a1 + 232))(a1, v12, 100);
RewardUnlockLayer::showCollectReward(v12, v11);
}
else
{
v14 = (GameStatsManager *)GameStatsManager::sharedState(nullptr);
BonusDiamonds = GameStatsManager::getBonusDiamonds(v14, *((_DWORD *)a3 + 193) - *((_DWORD *)a3 + 194));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, a4);
v16 = CurrencyRewardLayer::create(0, 0, 0, BonusDiamonds, 0, 0, 0, 0, (const cocos2d::CCPoint *)v20, 0, 0.0, 1.0);
(*(void (__fastcall **)(int *, int, int))(*a1 + 232))(a1, v16, 14);
}
v17 = (GameLevelManager *)DailyLevelPage::exitDailyNode((int)a1, a2, nullptr, v13);
v18 = (_DWORD *)GameLevelManager::sharedState(v17);
if ( GameLevelManager::getDailyID(v18, a1[139]) <= *((_DWORD *)a3 + 186) - *((_DWORD *)a3 + 187) )
return DailyLevelPage::createDailyNode(
(DailyLevelPage *)a1,
nullptr,
0,
(cocos2d::CCDelayTime *)0x3F000000,
nullptr);
else
return (int *)DailyLevelPage::downloadAndCreateNode((DailyLevelPage *)a1);
}