//
// GJShopLayer::dialogClosed from 0x1003127c0 to 0x100312936 (374 bytes)
//
// 2 xrefs:
// > sub_100312960 @ 0x10031296c
// > ??> @ 0x100b1b8e8
//
// 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:28:39 +0000
//
void __fastcall GJShopLayer::dialogClosed(__int64 a1, __int64 a2, __m128 a3)
{
__int64 v4; // rax
__int64 v5; // rax
double v6; // xmm0_8
__int64 v7; // rdi
__int64 v8; // rax
__int64 v9; // rdi
__int64 v10; // rbx
__int64 v11; // rax
char *v12; // rax
__int64 v13; // rax
__int64 v14; // r14
char *v15; // r15
char v16; // [rsp+0h] [rbp-50h] BYREF
char v17[15]; // [rsp+1h] [rbp-4Fh] BYREF
void *v18; // [rsp+10h] [rbp-40h]
char v19; // [rsp+18h] [rbp-38h] BYREF
void *v20[3]; // [rsp+19h] [rbp-37h] BYREF
int v21[7]; // [rsp+34h] [rbp-1Ch] BYREF
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )
{
v4 = FMODAudioEngine::sharedEngine(*(double *)a3.i64);
v19 = 22;
strcpy((char *)v20, "door001.ogg");
FMODAudioEngine::playEffect(v4, &v19, 1.0, 0.0, 0.80000001);
if ( (v19 & 1) != 0 )
operator delete(*(void **)((char *)&v20[1] + 7));
v21[0] = -16777216;
v5 = cocos2d::CCLayerColor::create_1(v21);
v6 = (*(double (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v5, 1000);
v7 = FMODAudioEngine::sharedEngine(v6);
FMODAudioEngine::stopAllMusic(v7, 1);
v8 = cocos2d::CCDirector::sharedDirector(v7, 1);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 160LL))(v8);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v9, a1);
v10 = cocos2d::CCDirector::sharedDirector(v9, a1);
v11 = GJGarageLayer::scene(v9);
v12 = cocos2d::CCTransitionFade::create_1(v11, 1.0);
cocos2d::CCDirector::replaceScene(v10, v12);
}
else if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 2 )
{
v13 = GameStatsManager::sharedState();
v16 = 8;
strcpy(v17, "0022");
v14 = GameStatsManager::unlockSpecialChest(v13, (__int64)&v16, a3);
if ( (v16 & 1) != 0 )
operator delete(v18);
if ( v14 )
{
v15 = RewardUnlockLayer::create(*(_DWORD *)(v14 + 64), 0);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v15, 100);
RewardUnlockLayer::showCollectReward((__int64)v15, v14);
}
}
}