//
// GJShopLayer::dGJShopLayer from 0x100322c60 to 0x100322d66 (262 bytes)
//
// 4 xrefs:
// > sub_100322D70 @ 0x100322d75
// > sub_100322D80 @ 0x100322d8c
// > sub_100322DA0 @ 0x100322da9
// > sub_100322DC0 @ 0x100322dd3
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall GJShopLayer::dGJShopLayer(__int64 a1)
{
cocos2d::CCDirector *v2; // rax
cocos2d::CCTouchDispatcher *v3; // rax
cocos2d::CCObject *v4; // rdi
*(_QWORD *)a1 = off_1009136F8;
*(_QWORD *)(a1 + 320) = off_100913B90;
*(_QWORD *)(a1 + 328) = &off_100913C00;
*(_QWORD *)(a1 + 336) = off_100913C18;
*(_QWORD *)(a1 + 344) = off_100913C38;
*(_QWORD *)(a1 + 352) = off_100913C58;
*(_QWORD *)(a1 + 408) = &off_100913C80;
*(_QWORD *)(a1 + 416) = &off_100913C98;
*(_QWORD *)(a1 + 424) = off_100913CB0;
v2 = cocos2d::CCDirector::sharedDirector();
v3 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v2->getTouchDispatcher)(v2);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, (cocos2d::CCObject *)a1);
if ( GameManager::sharedState()->m_rewardedVideoDelegate == (RewardedVideoDelegate *)(a1 + 424) )
{
GameManager::sharedState()->m_rewardedVideoDelegate = nullptr;
v4 = *(cocos2d::CCObject **)(a1 + 448);
if ( !v4 )
goto LABEL_6;
goto LABEL_5;
}
v4 = *(cocos2d::CCObject **)(a1 + 448);
if ( v4 )
LABEL_5:
cocos2d::CCObject::release(v4);
LABEL_6:
if ( (*(_BYTE *)(a1 + 464) & 1) != 0 )
operator delete(*(void **)(a1 + 480));
return cocos2d::CCLayer::dCCLayer(a1);
}