//
// GJPathPage::onUnlock from 0x58e988 to 0x58ea1a (146 bytes)
//
// 0 xrefs:
//
// 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 GJPathPage::onUnlock(GJPathPage *a1, cocos2d::CCObject *a2)
{
int v3; // r4
GameStatsManager *v4; // r0
GJStoreItem *StoreItem; // r4
int v6; // r8
GameStatsManager *v7; // r9
int Stat; // r9
PurchaseItemPopup *v9; // r0
char *v10[3]; // [sp+0h] [bp+0h] BYREF
v10[0] = (char *)a1;
v10[1] = (char *)a2;
v3 = a1->m_pathNumber + 5;
v4 = GameStatsManager::sharedState();
StoreItem = GameStatsManager::getStoreItem(v4, v3);
v6 = StoreItem->m_price.random - StoreItem->m_price.seed;
v7 = GameStatsManager::sharedState();
GJStoreItem::getCurrencyKey((GJStoreItem *)v10, (int)StoreItem);
Stat = GameStatsManager::getStat(v7, v10[0]);
sub_774008(v10);
if ( v6 <= Stat )
{
v9 = PurchaseItemPopup::create(StoreItem);
v9->m_delegate = &a1->GJPurchaseDelegate;
v9->show(v9);
}
else
{
GJPathPage::showCantAffordMessage(a1, StoreItem);
}
}