//
// SecretLayer5::onlineRewardStatusFinished from 0x59d554 to 0x59d5fa (166 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'SecretLayer5::onlineRewardStatusFinished @ 0x59d604
//
// 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
//
void __fastcall SecretLayer5::onlineRewardStatusFinished(int a1, stl::StringData::Internal *a2)
{
GameStatsManager *v4; // r8
int RewardForSpecialChest; // r8
GameStatsManager *v6; // r8
stl::StringData::Internal *v7; // r2
stl::StringData::Internal *v8; // r3
int isSpecialChestUnlocked; // r8
std::string v10[2]; // [sp+0h] [bp-8h] BYREF
v10[0].m_data.m_data = (stl::StringData::Internal *)a1;
v10[1].m_data.m_data = a2;
v4 = GameStatsManager::sharedState();
sub_775C20(v10);
RewardForSpecialChest = GameStatsManager::getRewardForSpecialChest((int)v4, v10);
sub_774008(v10);
if ( !RewardForSpecialChest
|| (v6 = GameStatsManager::sharedState(),
sub_775C20(v10),
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked((int)v6, (char **)v10, v7, v8),
sub_774008(v10),
isSpecialChestUnlocked) )
{
(*(void (__fastcall **)(int))(*(_DWORD *)a1 + 592))(a1);
}
else
{
*(_DWORD *)(a1 + 384) = 1;
sub_775D40(a1 + 388, a2);
if ( !*(_BYTE *)(a1 + 380) )
SecretLayer5::handleSecretResponse((SecretLayer5 *)a1);
}
}