//
// AnimatedShopKeeper::playReactAnimation from 0xa7d120 to 0xa7d2ec (460 bytes)
//
// 2 xrefs:
// > GJShopLayer::ccTouchBegan @ 0xa7edf8
// > ??> @ 0x424f0
//
// 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 AnimatedShopKeeper::playReactAnimation(AnimatedShopKeeper *this)
{
unsigned __int64 v2; // x1
cocos2d::CCString *v3; // x0
const char *CString; // x0
size_t v5; // x0
FMODAudioEngine *v6; // x0
__int64 v7; // x22
char v8; // w1
int v9; // w0
char *v11; // [xsp+38h] [xbp+38h]
__int64 v12; // [xsp+40h] [xbp+40h] BYREF
size_t v13; // [xsp+48h] [xbp+48h]
void *v14; // [xsp+50h] [xbp+50h]
__int64 v15; // [xsp+58h] [xbp+58h] BYREF
size_t v16; // [xsp+60h] [xbp+60h]
void *v17; // [xsp+68h] [xbp+68h]
__int64 v18[2]; // [xsp+70h] [xbp+70h] BYREF
void *v19; // [xsp+80h] [xbp+80h]
if ( !*((_BYTE *)this + 733) )
{
v2 = (unsigned int)(*((_DWORD *)this + 185) + 1);
if ( (int)v2 > 3 )
v2 = 1;
*((_DWORD *)this + 185) = v2;
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"grunt0%i.ogg", (const char *)v2);
CString = (const char *)cocos2d::CCString::getCString(v3);
v12 = 0;
v11 = (char *)CString;
v13 = 0;
v14 = nullptr;
v5 = strlen(CString);
v6 = (FMODAudioEngine *)std::string::__init(&v12, v11, v5);
v7 = FMODAudioEngine::sharedEngine(v6);
v15 = 0;
v16 = 0;
v17 = nullptr;
if ( (v12 & 1) != 0 )
{
std::string::__init(&v15, v14, v13);
}
else
{
v17 = v14;
v15 = v12;
v16 = v13;
}
FMODAudioEngine::playEffect(v7, (char *)&v15, 1.0, 0.0, 0.65);
if ( (v15 & 1) != 0 )
operator delete(v17);
v18[0] = 0;
v18[1] = 0;
v19 = nullptr;
std::string::__init(v18, "react01", 7u);
CCAnimatedSprite::runAnimationForced((__int64)this, (char *)v18);
if ( (v18[0] & 1) != 0 )
operator delete(v19);
v8 = v12;
v9 = *((_DWORD *)this + 184) + 1;
*((_BYTE *)this + 733) = 1;
*((_DWORD *)this + 184) = v9;
if ( (v8 & 1) != 0 )
operator delete(v14);
}
return _stack_chk_guard;
}