//
// GJChestSprite::create from 0x100200390 to 0x100200439 (169 bytes)
//
// 17 xrefs:
// > RewardUnlockLayer::init @ 0x1001ffc47
// > DailyLevelNode::init @ 0x1002175ae
// > GJNotificationCell::loadFromNotification @ 0x1002348c5
// > LevelCell::loadCustomLevelCell @ 0x100237c5c
// > GJPathRewardPopup::init @ 0x1002edf22
// > GJPathRewardPopup::init @ 0x1002edf8e
// > SecretLayer4::init @ 0x10039aac0
// > FollowRewardPage::init @ 0x10040ced4
// > SecretLayer3::init @ 0x10049d60d
// > SecretLayer3::init @ 0x10049d870
// > GauntletNode::generateNode @ 0x1005a2753
// > GauntletNode::generateNode @ 0x1005a27c5
// > GauntletNode::generateNode @ 0x1005a29fc
// > GauntletNode::generateNode @ 0x1005a2a6e
// > SecretRewardsLayer::init @ 0x10070da47
// > SecretRewardsLayer::init @ 0x10070e066
// > SecretRewardsLayer::generateChestItems @ 0x100711064
//
// 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 12:26:51 +0000
//
_QWORD *__fastcall GJChestSprite::create(int a1)
{
_QWORD *v1; // rbx
v1 = operator new(0x260u);
cocos2d::CCSprite::CCSprite(v1);
*v1 = off_100AE4C80;
v1[40] = off_100AE5168;
v1[43] = off_100AE51E8;
*(_QWORD *)((char *)v1 + 596) = 0;
*((_BYTE *)v1 + 604) = 0;
if ( (unsigned __int8)cocos2d::CCSprite::init(v1) )
{
*((_DWORD *)v1 + 149) = a1;
(*(void (__fastcall **)(_QWORD *, void *))(*v1 + 320LL))(v1, &unk_100BE1670);
GJChestSprite::switchToState(v1, 2, 0);
cocos2d::CCObject::autorelease(v1);
}
else
{
(*(void (__fastcall **)(_QWORD *))(*v1 + 16LL))(v1);
return nullptr;
}
return v1;
}