//
// GameStatsManager::isSpecialChestUnlocked from 0x8ccc1c to 0x8ccd44 (296 bytes)
//
// 50 xrefs:
// > GJNotificationCell::refreshChest @ 0x739f34
// > GameStatsManager::getNextVideoAdReward @ 0x8cec68
// > GameStatsManager::getNextVideoAdReward @ 0x8ceca4
// > GameStatsManager::getNextVideoAdReward @ 0x8cece0
// > GameStatsManager::getNextVideoAdReward @ 0x8ced1c
// > GameStatsManager::getNextVideoAdReward @ 0x8ced58
// > GameStatsManager::getNextVideoAdReward @ 0x8ced94
// > GameStatsManager::getNextVideoAdReward @ 0x8cedd0
// > GameStatsManager::getNextVideoAdReward @ 0x8cee0c
// > GameStatsManager::getNextVideoAdReward @ 0x8cee48
// > GameStatsManager::getNextVideoAdReward @ 0x8cee84
// > GameStatsManager::isGauntletChestUnlocked @ 0x8dfa0c
// > GameStatsManager::isPathChestUnlocked @ 0x8e0200
// > GameStatsManager::isItemUnlocked @ 0x8e8170
// > GameStatsManager::unlockSpecialChest @ 0x8eadc0
// > SupportLayer::customSetup @ 0x902ee8
// > GauntletNode::generateNode @ 0xa75cb8
// > GJShopLayer::showReactMessage @ 0xa7ded4
// > GJShopLayer::ccTouchBegan @ 0xa7edd0
// > RewardsPage::init @ 0xa85ea8
// > RewardsPage::init @ 0xa86544
// > RewardsPage::init @ 0xa86588
// > RewardsPage::init @ 0xa865cc
// > RewardsPage::init @ 0xa86624
// > RewardsPage::init @ 0xa86694
// > RewardsPage::init @ 0xa86700
// > SecretLayer3::init @ 0xa92f8c
// > SecretLayer3::init @ 0xa931a8
// > SecretLayer4::init @ 0xa97538
// > FollowRewardPage::updateRate @ 0xaaa5f4
// > FollowRewardPage::updateRate @ 0xaaa6a4
// > FollowRewardPage::updateRate @ 0xaaa6fc
// > FollowRewardPage::updateRate @ 0xaaa760
// > FollowRewardPage::updateRate @ 0xaaa7b8
// > FollowRewardPage::updateRate @ 0xaaa810
// > FollowRewardPage::updateRate @ 0xaaa868
// > FollowRewardPage::init @ 0xaab730
// > FollowRewardPage::init @ 0xaabb34
// > FollowRewardPage::init @ 0xaabc08
// > FollowRewardPage::init @ 0xaabcdc
// > FollowRewardPage::init @ 0xaabd9c
// > FollowRewardPage::init @ 0xaabe5c
// > FollowRewardPage::init @ 0xaabf70
// > SecretRewardsLayer::init @ 0xb9fa44
// > SecretRewardsLayer::init @ 0xba08c0
// > SecretRewardsLayer::init @ 0xba0980
// > SecretLayer5::claimOnlineReward @ 0xbc6430
// > SecretLayer5::onlineRewardStatusFinished @ 0xbc6d2c
// > NotificationsPage::notificationRewardFinished @ 0xc5fd54
// > ??> @ 0xe3590
//
// 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 12:56:37 +0000
//
bool __fastcall GameStatsManager::isSpecialChestUnlocked(__int64 a1, char *a2)
{
__int64 v2; // x24
const char *v3; // x21
size_t v4; // x0
size_t v5; // x19
unsigned __int64 v6; // x0
char *v7; // x3
_BOOL4 v8; // w19
__int64 v10; // [xsp+40h] [xbp+40h] BYREF
size_t v11; // [xsp+48h] [xbp+48h]
void *v12; // [xsp+50h] [xbp+50h]
v2 = *(_QWORD *)(a1 + 784);
v3 = a2 + 1;
if ( (*a2 & 1) != 0 )
v3 = *((const char **)a2 + 2);
v10 = 0;
v11 = 0;
v12 = nullptr;
v4 = strlen(v3);
v5 = v4;
if ( v4 > 0xFFFFFFFFFFFFFFEFLL )
sub_62CC1C();
if ( v4 > 0x16 )
{
v6 = (v4 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v10 = v6 | 1;
v7 = (char *)operator new(v6);
v12 = v7;
v11 = v5;
LABEL_6:
v7 = (char *)memcpy(v7, v3, v5);
goto LABEL_7;
}
LOBYTE(v10) = 2 * v4;
v7 = (char *)&v10 + 1;
if ( v4 )
goto LABEL_6;
LABEL_7:
v7[v5] = 0;
v8 = cocos2d::CCDictionary::objectForKey(v2, &v10) != 0;
if ( (v10 & 1) != 0 )
operator delete(v12);
return v8;
}