//
// MenuGameLayer::destroyPlayer from 0x140471660 to 0x140471920 (704 bytes)
//
// 2 xrefs:
// > MenuGameLayer::ccTouchBegan @ 0x140471d2f
// > ??> @ 0x1409281b4
//
// This function is hookable on this platform (idp: pc, 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 11:32:39 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall MenuGameLayer::destroyPlayer(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // r8
__int64 v4; // r9
int v5; // ecx
cocos2d::CCParticleSystem *v6; // rdi
__int64 v7; // rdx
__int64 v8; // rbx
__int64 v9; // rax
__int64 v10; // rax
int v11; // edx
__int64 v12; // rdx
__int64 v13; // rcx
__int64 v14; // r8
cocos2d::CCObject *v15; // rdi
__int64 v16; // rdx
__int64 v17; // rbx
__int64 v18; // rax
__int16 v19; // [rsp+30h] [rbp-68h]
char v20[16]; // [rsp+40h] [rbp-58h] BYREF
__int64 v21; // [rsp+50h] [rbp-48h]
__int64 v22; // [rsp+58h] [rbp-40h]
char *v23; // [rsp+60h] [rbp-38h]
void *v24; // [rsp+68h] [rbp-30h] BYREF
float v25; // [rsp+70h] [rbp-28h]
int v26; // [rsp+74h] [rbp-24h]
*(_BYTE *)(a1 + 416) = 1;
v2 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v23 = (char *)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v23);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v2 = qword_14090BFE0;
}
GameStatsManager::incrementStat(v2, "9", 1u);
v23 = v20;
v20[15] = 0;
v21 = 14;
v22 = 15;
strcpy(v20, "explode_11.ogg");
v5 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v24 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v24);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v5 = qword_14090BF60;
}
FMODAudioEngine::playEffect(v5, (__int64)v20, v3, v4, 1056964608);
v6 = cocos2d::CCParticleSystemQuad::create("explodeEffect.plist", 0);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v6 + 1528LL))(v6, 2);
(*(void (__fastcall **)(__int64, cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v6, 1);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v6 + 1544LL))(v6, v7);
v8 = *(_QWORD *)v6;
v9 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 200LL))(*(_QWORD *)(a1 + 432));
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(v8 + 184))(v6, v9);
v10 = *(_QWORD *)(a1 + 432);
v19 = *(_WORD *)(v10 + 2706);
v11 = *(unsigned __int8 *)(v10 + 2708);
*(float *)&v24 = (float)(unsigned __int8)v19 / 255.0;
*((float *)&v24 + 1) = (float)HIBYTE(v19) / 255.0;
v25 = (float)v11 / 255.0;
v26 = 1065353216;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, void **))(*(_QWORD *)v6 + 1352LL))(v6, &v24);
cocos2d::CCParticleSystem::resetSystem(v6);
v15 = CCCircleWave::create(v13, v12, v14, 0, 1);
v16 = *(_QWORD *)(a1 + 432);
*((_WORD *)v15 + 170) = *(_WORD *)(v16 + 2706);
*((_BYTE *)v15 + 342) = *(_BYTE *)(v16 + 2708);
v17 = *(_QWORD *)v15;
v18 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 200LL))(*(_QWORD *)(a1 + 432));
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v17 + 184))(v15, v18);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, v15, 0);
MenuGameLayer::resetPlayer(a1);
}