//
// SecretRewardsLayer::dialogClosed from 0x100716da0 to 0x100716ec4 (292 bytes)
//
// 2 xrefs:
// > sub_100716ED0 @ 0x100716edc
// > ??> @ 0x100b999c0
//
// 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:36:08 +0000
//
__int64 __fastcall SecretRewardsLayer::dialogClosed(__int64 a1, __int64 a2)
{
__int64 v3; // rax
const char *v4; // rsi
__int64 v5; // r14
__int64 v6; // rdi
__int64 v7; // rax
__int64 v8; // rax
__int64 result; // rax
__int64 v10; // rax
_BYTE *v11; // rax
_QWORD *v12; // rax
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 2 )
{
v3 = GameManager::sharedState();
v4 = "20";
GameManager::setUGV(v3, "20");
v5 = cocos2d::CCDirector::sharedDirector();
v6 = 2;
}
else if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )
{
v7 = GameManager::sharedState();
v4 = "11";
GameManager::setUGV(v7, "11");
v5 = cocos2d::CCDirector::sharedDirector();
v6 = 1;
}
else if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 3 )
{
v8 = GameManager::sharedState();
v4 = "34";
GameManager::setUGV(v8, "34");
v5 = cocos2d::CCDirector::sharedDirector();
v6 = 4;
}
else
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result != 4 )
return result;
v10 = GameManager::sharedState();
v4 = "35";
GameManager::setUGV(v10, "35");
v5 = cocos2d::CCDirector::sharedDirector();
v6 = 3;
}
v11 = GJShopLayer::scene(v6, (__int64)v4);
v12 = cocos2d::CCTransitionMoveInT::create((__int64)v11, 0.5);
result = cocos2d::CCDirector::replaceScene(v5, v12);
if ( (_BYTE)result )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
return result;
}