//
// PurchaseItemPopup::onPurchase from 0xa7c7e4 to 0xa7c840 (92 bytes)
//
// 3 xrefs:
// > ??> @ 0x4b700
// > PurchaseItemPopup::init @ 0xa80f4c
// > ??> @ 0x1541848
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:00:29 +0000
//
__int64 __fastcall PurchaseItemPopup::onPurchase(PurchaseItemPopup *this, cocos2d::CCObject *a2)
{
GameStatsManager *v3; // x0
void (__fastcall ***v4)(_QWORD, _QWORD); // x0
v3 = (GameStatsManager *)GameStatsManager::sharedState(this);
if ( (unsigned __int8)GameStatsManager::purchaseItem(
v3,
(const char *)(unsigned int)(*(_DWORD *)(*((_QWORD *)this + 83) + 316LL)
- *(_DWORD *)(*((_QWORD *)this + 83) + 320LL))) )
{
v4 = *((void (__fastcall ****)(_QWORD, _QWORD))this + 84);
if ( v4 )
(**v4)(v4, *((_QWORD *)this + 83));
}
return PurchaseItemPopup::onClose(this, nullptr);
}