//
// SupportLayer::onGetReward from 0x5399bc to 0x539a36 (122 bytes)
//
// 0 xrefs:
//
// 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:52:13 +0000
//
int __fastcall SupportLayer::onGetReward(SupportLayer *this, cocos2d::CCObject *a2)
{
int *v3; // r6
int v4; // r2
int v5; // r3
RewardUnlockLayer **v6; // r6
int result; // r0
RewardsPage *v8; // r2
RewardUnlockLayer *v9; // r4
int v10[3]; // [sp+0h] [bp-14h] BYREF
memset(v10, 0, sizeof(v10));
v3 = (int *)GameStatsManager::sharedState(this);
std::string::__init(v10, "0023", 4u);
v6 = (RewardUnlockLayer **)GameStatsManager::unlockSpecialChest(v3, (int)v10, v4, v5);
result = std::string::~string((int)v10);
if ( v6 )
{
v9 = (RewardUnlockLayer *)RewardUnlockLayer::create(v6[15], 0, v8);
(*(void (__fastcall **)(SupportLayer *, RewardUnlockLayer *, int))(*(_DWORD *)this + 232))(this, v9, 100);
return RewardUnlockLayer::showCollectReward(v9, (GJRewardItem *)v6);
}
return result;
}