//
// GameStatsManager::isSpecialChestUnlocked from 0x1402ee780 to 0x1402ee881 (257 bytes)
//
// 40 xrefs:
// > GJNotificationCell::loadFromNotification @ 0x14015bde2
// > GJNotificationCell::refreshChest @ 0x14015c604
// > FollowRewardPage::init @ 0x14020b552
// > FollowRewardPage::init @ 0x14020b89f
// > FollowRewardPage::init @ 0x14020bbe7
// > FollowRewardPage::init @ 0x14020bf1d
// > FollowRewardPage::init @ 0x14020c264
// > FollowRewardPage::init @ 0x14020c5b2
// > FollowRewardPage::init @ 0x14020c8f5
// > FollowRewardPage::updateRate @ 0x14020d195
// > FollowRewardPage::updateRate @ 0x14020d25c
// > FollowRewardPage::updateRate @ 0x14020d323
// > FollowRewardPage::updateRate @ 0x14020d3ea
// > FollowRewardPage::updateRate @ 0x14020d4b1
// > FollowRewardPage::updateRate @ 0x14020d578
// > FollowRewardPage::updateRate @ 0x14020d63f
// > GameStatsManager::recountSpecialStats @ 0x1402e8d2d
// > GameStatsManager::isItemUnlocked @ 0x1402e96fa
// > GameStatsManager::unlockSpecialChest @ 0x1402ee8c6
// > GauntletSelectLayer::onPlay @ 0x1402ffc55
// > GauntletNode::generateNode @ 0x140302652
// > GJPathsLayer::onPath @ 0x140392fed
// > GJShopLayer::showReactMessage @ 0x1403b3462
// > GJShopLayer::ccTouchBegan @ 0x1403b4ec9
// > NotificationsPage::notificationRewardFinished @ 0x140478cf6
// > RewardsPage::init @ 0x140562105
// > RewardsPage::init @ 0x14056217f
// > RewardsPage::init @ 0x1405621f9
// > RewardsPage::init @ 0x140562273
// > RewardsPage::init @ 0x1405622ed
// > RewardsPage::init @ 0x140562367
// > RewardsPage::init @ 0x1405623dd
// > SecretRewardsLayer::init @ 0x140568f1f
// > SecretLayer3::init @ 0x1405809da
// > SecretLayer3::init @ 0x140580cda
// > SecretLayer4::init @ 0x14058623a
// > SecretLayer5::claimOnlineReward @ 0x14058c0e4
// > SecretLayer5::onlineRewardStatusFinished @ 0x14058c39f
// > SupportLayer::customSetup @ 0x14066a364
// > ??> @ 0x14091e0ec
//
// This function is hookable on this platform (idp: pc, 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 11:29:56 +0000
//
// Hidden C++ exception states: #wind=2
_BOOL8 __fastcall GameStatsManager::isSpecialChestUnlocked(__int64 a1, _QWORD *a2)
{
__int64 v2; // rbx
size_t v4; // r8
bool v5; // di
void *v6; // rcx
void *Block[2]; // [rsp+38h] [rbp-30h] BYREF
__m128i si128; // [rsp+48h] [rbp-20h]
v2 = (__int64)a2;
if ( a2[3] > 0xFu )
a2 = (_QWORD *)*a2;
*(_OWORD *)Block = 0;
si128 = 0;
v4 = -1;
do
++v4;
while ( *((_BYTE *)a2 + v4) );
sub_14003D230(Block, a2, v4);
v5 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 888), Block) != 0;
if ( si128.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
sub_14003D310(v2);
return v5;
}