//
// MenuGameLayer::destroyPlayer from 0x7dab38 to 0x7dad60 (552 bytes)
//
// 2 xrefs:
// > MenuGameLayer::ccTouchBegan @ 0x7dae80
// > ??> @ 0x101890
//
// 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 12:54:23 +0000
//
__int64 __fastcall MenuGameLayer::destroyPlayer(MenuGameLayer *this)
{
GameStatsManager *v2; // x0
FMODAudioEngine *v3; // x0
__int64 v4; // x0
bool v5; // w2
cocos2d::CCParticleSystem *v6; // x20
void (__fastcall *v7)(cocos2d::CCParticleSystem *, __int64); // x22
__int64 v8; // x0
unsigned __int8 *v9; // x2
int v10; // w3
int v11; // w4
float v12; // s2
void (__fastcall *v13)(cocos2d::CCParticleSystem *, float *); // x4
__int64 v14; // x20
_BYTE *v15; // x0
__int64 v16; // x2
char v17; // w3
char v18; // w1
void (__fastcall *v19)(__int64, __int64); // x22
__int64 v20; // x0
float v22[4]; // [xsp+30h] [xbp+30h] BYREF
char v23; // [xsp+40h] [xbp+40h] BYREF
char v24[15]; // [xsp+41h] [xbp+41h] BYREF
void *v25; // [xsp+50h] [xbp+50h]
*((_BYTE *)this + 412) = 1;
v2 = (GameStatsManager *)GameStatsManager::sharedState(_stack_chk_guard);
v3 = (FMODAudioEngine *)GameStatsManager::incrementStat(v2, "9");
v4 = FMODAudioEngine::sharedEngine(v3);
v25 = nullptr;
strcpy(v24, "explode_11.ogg");
v23 = 28;
FMODAudioEngine::playEffect(v4, &v23, 1.0, 0.0, 0.5);
if ( (v23 & 1) != 0 )
operator delete(v25);
v6 = (cocos2d::CCParticleSystem *)cocos2d::CCParticleSystemQuad::create(
(cocos2d::CCParticleSystemQuad *)"explodeEffect.plist",
nullptr,
v5);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v6 + 1568LL))(v6, 2);
(*(void (__fastcall **)(MenuGameLayer *, cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)this + 464LL))(this, v6, 1);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v6 + 1584LL))(v6, 1);
v7 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v6 + 184LL);
v8 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 54) + 192LL))(*((_QWORD *)this + 54));
v7(v6, v8);
v9 = *((unsigned __int8 **)this + 54);
v10 = v9[2604];
v11 = v9[2603];
LODWORD(v9) = v9[2602];
v12 = (float)v11;
v13 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, float *))(*(_QWORD *)v6 + 1360LL);
v22[3] = 1.0;
v22[2] = (float)v10 / 255.0;
v22[1] = v12 / 255.0;
v22[0] = (float)(int)v9 / 255.0;
v13(v6, v22);
cocos2d::CCParticleSystem::resetSystem(v6);
v14 = CCCircleWave::create(nullptr, 10.0, 90.0, 0.5);
v15 = *((_BYTE **)this + 54);
v16 = *(_QWORD *)v14;
v17 = v15[2602];
v18 = v15[2603];
*(_BYTE *)(v14 + 342) = v15[2604];
*(_BYTE *)(v14 + 340) = v17;
*(_BYTE *)(v14 + 341) = v18;
v19 = *(void (__fastcall **)(__int64, __int64))(v16 + 184);
v20 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 54) + 192LL))(*((_QWORD *)this + 54));
v19(v14, v20);
(*(void (__fastcall **)(MenuGameLayer *, __int64, _QWORD))(*(_QWORD *)this + 464LL))(this, v14, 0);
MenuGameLayer::resetPlayer((cocos2d::CCMotionStreak ***)this);
return _stack_chk_guard;
}