//
// SecretRewardsLayer::updateUnlockedGoldLabel from 0x1002e9f44 to 0x1002ea008 (196 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::init @ 0x1002e92f8
// > SecretRewardsLayer::onGoldChest @ 0x1002e9e44
//
// 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 SecretRewardsLayer::updateUnlockedGoldLabel(SecretRewardsLayer *a1)
{
GameStatsManager *v2; // x0
int v3; // w20
GameStatsManager *v4; // x0
int v5; // w21
cocos2d::CCSprite *m_goldPriceSprite; // x22
cocos2d::CCString *v7; // x0
const char *CString; // x0
cocos2d::CCSprite *v9; // x0
_WORD v10[3]; // [xsp+18h] [xbp-28h] BYREF
char v11; // [xsp+1Eh] [xbp-22h]
v2 = GameStatsManager::sharedState();
v3 = GameStatsManager::countUnlockedSecretChests(v2, Gold);
v4 = GameStatsManager::sharedState();
v5 = GameStatsManager::countSecretChests(v4, Gold);
m_goldPriceSprite = a1->m_goldPriceSprite;
v7 = (cocos2d::CCString *)sub_100268F4C("%i / %i", v3, v5);
CString = cocos2d::CCString::getCString(v7);
((void (__fastcall *)(cocos2d::CCSprite *, const char *))m_goldPriceSprite->isCascadeOpacityEnabled)(
m_goldPriceSprite,
CString);
v9 = a1->m_goldPriceSprite;
if ( v3 >= v5 )
{
v11 = 50;
v10[2] = -206;
}
else
{
qmemcpy(v10, "dWp", 3);
}
((void (*)(void))v9->getTexture)();
}