//
// GJGameLevel::getCoinKey from 0x14016cda0 to 0x14016ce14 (116 bytes)
//
// 17 xrefs:
// > LevelCell::loadCustomLevelCell @ 0x1400afd19
// > EndLevelLayer::customSetup @ 0x14013438a
// > EndLevelLayer::customSetup @ 0x1401343e2
// > EndLevelLayer::customSetup @ 0x14013442d
// > GameLevelManager::updateLevelRewards @ 0x140146577
// > GameLevelManager::getLevelLeaderboard @ 0x140158461
// > GameLevelManager::getLevelLeaderboard @ 0x1401584ab
// > GameManager::verifyCoinUnlocks @ 0x14017e632
// > GameManager::verifyCoinUnlocks @ 0x14017e65a
// > GameManager::verifyCoinUnlocks @ 0x14017e682
// > GameManager::verifyCoinUnlocks @ 0x14017e74d
// > GameManager::verifyCoinUnlocks @ 0x14017e775
// > GameManager::verifyCoinUnlocks @ 0x14017e79d
// > GJBaseGameLayer::processItems @ 0x1402163c1
// > GJBaseGameLayer::processItems @ 0x1402165d1
// > GJBaseGameLayer::hasUniqueCoin @ 0x1402167c4
// > ??> @ 0x1406cadc4
//
// 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
//
const char *GJGameLevel::getCoinKey(GJGameLevel *a1, int a2)
{
__int64 v2; // r8
int random; // edx
cocos2d::CCString *v4; // rax
__int64 v6; // rdx
bool v7; // zf
const char *v8; // rcx
cocos2d::CCString *v9; // rax
v2 = (unsigned int)a2;
random = a1->m_levelID.random;
if ( a1->m_dailyID.random - a1->m_dailyID.seed <= 0 )
{
v6 = (unsigned int)(random - a1->m_levelID.seed);
v7 = !a1->m_gauntletLevel;
v8 = "%i_%i_g";
if ( v7 )
v8 = "%i_%i";
v9 = cocos2d::CCString::createWithFormat(v8, v6, v2);
return cocos2d::CCString::getCString(v9);
}
else
{
v4 = cocos2d::CCString::createWithFormat(
"%i_%i_%i",
random - a1->m_levelID.seed,
v2,
a1->m_dailyID.random - a1->m_dailyID.seed);
return cocos2d::CCString::getCString(v4);
}
}