//
// SecretRewardsLayer::updateUnlockedGoldLabel from 0x100632770 to 0x100632821 (177 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::init @ 0x100631836
// > SecretRewardsLayer::onGoldChest @ 0x1006325f8
//
// 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 *v1; // rax
int v2; // r14d
GameStatsManager *v3; // rax
int v4; // r15d
cocos2d::CCSprite *m_goldPriceSprite; // r12
cocos2d::CCString *v6; // rax
const char *CString; // rax
cocos2d::CCSprite *v8; // rdi
cocos2d::CCSprite_vtbl *v9; // rax
__int16 *v10; // rsi
char v11; // [rsp+0h] [rbp-30h]
__int16 v12; // [rsp+8h] [rbp-28h] BYREF
char v13; // [rsp+Ah] [rbp-26h]
_WORD v14[18]; // [rsp+Ch] [rbp-24h] BYREF
v1 = GameStatsManager::sharedState();
v2 = GameStatsManager::countUnlockedSecretChests(v1, Gold);
v3 = GameStatsManager::sharedState();
v4 = GameStatsManager::countSecretChests(v3, Gold);
m_goldPriceSprite = a1->m_goldPriceSprite;
v6 = (cocos2d::CCString *)sub_1007AB580("%i / %i", v11);
CString = cocos2d::CCString::getCString(v6);
((void (__fastcall *)(cocos2d::CCSprite *, const char *))m_goldPriceSprite->isCascadeOpacityEnabled)(
m_goldPriceSprite,
CString);
v8 = a1->m_goldPriceSprite;
if ( v2 >= v4 )
{
v13 = 50;
v12 = -206;
v9 = v8->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v10 = &v12;
}
else
{
qmemcpy(v14, "dWp", 3);
v9 = v8->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v10 = v14;
}
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v9->getTexture)(v8, v10);
}