//
// GameObject::playDestroyObjectAnim from 0x1003e7ba4 to 0x1003e8908 (3428 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::destroyObject @ 0x100284d6c
//
// 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 11:04:26 +0000
//
void __fastcall GameObject::playDestroyObjectAnim(__int64 a1, __int64 a2)
{
__int64 v4; // x22
_BOOL4 v5; // w8
__int64 v6; // x0
int v7; // w9
double *v8; // x0
void *v9; // x21
double *v10; // x0
void *v11; // x23
__int64 v12; // x0
__int64 v13; // x0
void *v14; // x19
__int64 v15; // x0
__int64 v16; // x0
__int64 v17; // x24
__int64 ObjectZOrder; // x0
__int64 v19; // x0
__int64 v20; // x0
unsigned __int8 *v21; // x0
__int16 v22; // w24
__int16 v23; // w25
char v24; // w26
unsigned __int8 *v25; // x0
__int16 v26; // w27
__int16 v27; // w28
char *v28; // x0
char *v29; // x0
float *v30; // x0
int i; // w19
__int64 v32; // x27
const char *v33; // x20
_QWORD *v34; // x28
__int64 v35; // x21
void *v36; // x0
__int64 CString; // x0
__int64 v38; // x0
__int64 v39; // x21
void *v40; // x0
__int64 v41; // x0
__int64 v42; // x0
__int64 v43; // x21
void *v44; // x0
__int64 v45; // x0
__int64 v46; // x0
__int64 v47; // x21
void *v48; // x0
__int64 v49; // x0
_QWORD *v50; // x0
_BYTE *v51; // x28
__int64 v52; // x1
float *v53; // x21
char v54; // w0
__int64 v55; // x1
__int64 v56; // x2
__int64 v57; // x3
__int64 v58; // x4
__int64 v59; // x5
__int64 v60; // x6
__int64 v61; // x7
int v62; // w23
int v63; // w19
int hasUniqueCoin; // w21
double *v65; // x0
__int64 v66; // x0
__int64 v67; // x22
int v68; // s0
int v74; // s0
_WORD *v75; // x22
__int64 v76; // x0
char *v77; // x0
__int64 v78; // x0
__int64 v79; // x0
_QWORD *v80; // x22
int v81; // w8
__int64 v82; // x0
const char *v83; // x8
int v84; // w9
const char *v85; // x10
const char *v86; // x19
const char *v87; // x0
void *v88; // x20
__int64 v89; // x21
__int64 v90; // x0
__int64 v91; // x0
__int64 v92; // x0
_QWORD *v93; // x21
__int64 v94; // x22
void *v95; // x0
__int64 v96; // x0
__int64 v97; // x0
__int64 v98; // x22
void *v99; // x0
__int64 v100; // x0
__int64 v101; // x0
__int64 v102; // x22
void *v103; // x0
__int64 v104; // x0
__int64 v105; // x0
__int64 v106; // x22
void *v107; // x0
__int64 v108; // x0
_QWORD *v109; // x0
void *v110; // x0
_DWORD *v111; // x0
void **v112; // x0
void *v113; // x21
__int64 v114; // x0
__int64 v115; // x22
float v116; // s8
float v117; // s0
float v118; // s8
float v119; // s0
__int64 v120; // x22
unsigned int v121; // w23
__int64 ParentMode; // x0
_OWORD *v123; // x22
__int64 v124; // x0
__int64 v125; // x0
__int64 v126; // x0
void **v127; // x0
void *v128; // x22
__int64 v129; // x2
float v130; // s8
__int64 v131; // x0
__int64 v132; // x0
__int64 v133; // x0
float *v134; // x23
char v135; // w0
__int64 v136; // x1
__int64 v137; // x2
__int64 v138; // x3
__int64 v139; // x4
__int64 v140; // x5
__int64 v141; // x6
__int64 v142; // x7
__int64 v143; // x0
__int64 v144; // [xsp+10h] [xbp-E0h]
char v145; // [xsp+18h] [xbp-D8h]
__int64 v146; // [xsp+20h] [xbp-D0h]
__int64 v147; // [xsp+28h] [xbp-C8h]
float v148; // [xsp+34h] [xbp-BCh] BYREF
float v149; // [xsp+38h] [xbp-B8h] BYREF
void *__p[2]; // [xsp+40h] [xbp-B0h] BYREF
__int64 v151; // [xsp+50h] [xbp-A0h]
void *v152[2]; // [xsp+58h] [xbp-98h] BYREF
char v153; // [xsp+6Fh] [xbp-81h]
void *v154[2]; // [xsp+70h] [xbp-80h] BYREF
__int64 v155; // [xsp+80h] [xbp-70h]
if ( !a2 )
return;
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 896LL))(a1);
if ( (_DWORD)v4 )
{
v5 = 0;
}
else
{
v6 = *(_QWORD *)(a1 + 888);
if ( v6 )
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 896LL))(v6) == 0;
else
v5 = 1;
}
v7 = *(_DWORD *)(a1 + 1028);
if ( v7 == 1614 )
{
if ( ((*(unsigned __int8 *)(a1 + 999) | v5) & 1) == 0 )
{
v9 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"smallCoin_01_001.png");
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v9 + 912LL))(v9, v4);
v10 = (double *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v9 + 328LL))(v9);
sub_100026438(v154, v10);
sub_1000262BC((float *)v152, *(float *)v154 * 0.5, *((float *)v154 + 1) * 0.5);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"smallCoin_01_color_001.png");
(*(void (__fastcall **)(void *, void *, __int64))(*(_QWORD *)v9 + 464LL))(v9, v11, 1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v11 + 912LL))(v11, v4);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v11 + 184LL))(v11, v152);
v12 = *(_QWORD *)(a1 + 888);
if ( v12 )
{
v13 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 944LL))(v12);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v11 + 960LL))(v11, v13);
}
v14 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"smallCoin_01_highlight_001.png");
(*(void (__fastcall **)(void *, void *, __int64))(*(_QWORD *)v9 + 464LL))(v9, v14, 2);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v14 + 184LL))(v14, v152);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v14 + 912LL))(v14, v4);
v15 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 480LL))(a1, 2);
if ( v15 )
{
v16 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 944LL))(v15);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v14 + 960LL))(v14, v16);
}
v146 = (__int64)v14;
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 136LL))(a1);
(*(void (__fastcall **)(void *))(*(_QWORD *)v9 + 128LL))(v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 152LL))(a1);
(*(void (__fastcall **)(void *))(*(_QWORD *)v9 + 144LL))(v9);
v17 = *(_QWORD *)(a1 + 216);
if ( v17 )
{
ObjectZOrder = GameObject::getObjectZOrder(a1);
(*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)v17 + 464LL))(v17, v9, ObjectZOrder);
}
v19 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v9 + 184LL))(v9, v19);
v144 = a1;
v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 944LL))(a1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v9 + 960LL))(v9, v20);
v21 = (unsigned __int8 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v9 + 944LL))(v9);
v22 = *v21;
v23 = v21[1];
v24 = v21[2];
v25 = (unsigned __int8 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v11 + 944LL))(v11);
v26 = *v25;
v27 = v25[1];
v145 = v25[2];
BYTE2(v149) = -56;
LOWORD(v149) = -1;
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v9 + 960LL))(v9, &v149);
BYTE2(v149) = -56;
LOWORD(v149) = -1;
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v11 + 960LL))(v11, &v149);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v14 + 912LL))(v14, 0);
v28 = cocos2d::CCTintTo::create(v22, v23, v24, 0.3);
v147 = (__int64)v9;
cocos2d::CCNode::runAction((__int64)v9, (__int64)v28);
v29 = cocos2d::CCTintTo::create(v26, v27, v145, 0.3);
cocos2d::CCNode::runAction((__int64)v11, (__int64)v29);
v30 = cocos2d::CCFadeTo::create(v4, 0.3);
cocos2d::CCNode::runAction((__int64)v14, (__int64)v30);
for ( i = 0; i != 3; ++i )
{
if ( i )
{
if ( i == 2 )
{
v32 = v146;
v33 = "highlight_";
}
else
{
v32 = (__int64)v11;
v33 = "color_";
}
}
else
{
v32 = v147;
v33 = "";
}
v34 = sub_1002E736C();
v35 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v34);
v36 = sub_1003065B0("smallCoin_01_%s001.png", v33);
CString = cocos2d::CCString::getCString((__int64)v36);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v35, CString);
v38 = sub_1002E74E0((__int64)v34);
v39 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v38);
v40 = sub_1003065B0("smallCoin_02_%s001.png", v33);
v41 = cocos2d::CCString::getCString((__int64)v40);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v39, v41);
v42 = sub_1002E74E0((__int64)v34);
v43 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v42);
v44 = sub_1003065B0("smallCoin_03_%s001.png", v33);
v45 = cocos2d::CCString::getCString((__int64)v44);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v43, v45);
v46 = sub_1002E74E0((__int64)v34);
v47 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v46);
v48 = sub_1003065B0("smallCoin_04_%s001.png", v33);
v49 = cocos2d::CCString::getCString((__int64)v48);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v47, v49);
sub_1002E74E0((__int64)v34);
v50 = cocos2d::CCAnimation::createWithSpriteFrames((__int64)v34, 0.05);
v51 = cocos2d::CCAnimate::create((__int64)v50);
v52 = (__int64)cocos2d::CCRepeatForever::create((__int64)v51);
if ( i )
{
v51[132] = 1;
cocos2d::CCNode::runAction(v32, v52);
v53 = cocos2d::CCDelayTime::create(0.3);
v54 = (unsigned __int8)cocos2d::CCFadeTo::create(0, 0.3);
v52 = sub_10021D420((__int64)v53, v55, v56, v57, v58, v59, v60, v61, v54);
}
else
{
v51[133] = 1;
}
cocos2d::CCNode::runAction(v32, v52);
}
sub_1003E7768(v144, v147, 0, 30.0, 36.0, 54.0, 108.0, 12.0, 0.6, 0.4, 0.2, 0.0, 0.0);
}
}
else
{
if ( v7 == 143 )
{
v8 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
sub_1000262F4(v154, v8);
GJBaseGameLayer::spawnParticle(a2, (__int64)"glassDestroy01.plist", 0, 2, (__int64)v154);
return;
}
v62 = *(_DWORD *)(a1 + 920);
if ( v62 == 31 )
{
LABEL_31:
v63 = 13158600;
hasUniqueCoin = GJBaseGameLayer::hasUniqueCoin(a2, (_DWORD *)a1);
v65 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
sub_1000262F4(v154, v65);
v66 = GJBaseGameLayer::spawnParticle(a2, (__int64)"coinPickupEffect.plist", 0, 2, (__int64)v154);
if ( v62 == 31 && (v67 = v66) != 0 )
{
v68 = *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v66 + 1352LL))(v66) + 12);
__asm { FMOV V1.2S, #1.0 }
v154[0] = _D1;
LODWORD(v154[1]) = 1065353216;
HIDWORD(v154[1]) = v68;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v67 + 1360LL))(v67, v154);
v74 = *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v67 + 1384LL))(v67) + 12);
v154[0] = (void *)0x3F0000003F000000LL;
LODWORD(v154[1]) = 1056964608;
HIDWORD(v154[1]) = v74;
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v67 + 1392LL))(v67, v154);
v75 = CCCircleWave::create(0, 0, 25.0, 5.0, 0.3);
}
else
{
v75 = CCCircleWave::create(0, 0, 25.0, 5.0, 0.3);
if ( v62 == 31 )
v63 = 13158600;
else
v63 = 51455;
}
v75[170] = v63;
*((_BYTE *)v75 + 342) = BYTE2(v63);
v78 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
(*(void (__fastcall **)(_WORD *, __int64))(*(_QWORD *)v75 + 184LL))(v75, v78);
(*(void (__fastcall **)(_QWORD, _WORD *, _QWORD))(**(_QWORD **)(a2 + 3920) + 464LL))(
*(_QWORD *)(a2 + 3920),
v75,
0);
v79 = CCCircleWave::create_1(0);
v80 = (_QWORD *)v79;
if ( v62 == 31 )
v81 = -1;
else
v81 = 0xFFFF;
*(_BYTE *)(v79 + 342) = BYTE2(v81);
*(_WORD *)(v79 + 340) = v81;
v82 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
(*(void (__fastcall **)(_QWORD *, __int64))(*v80 + 184LL))(v80, v82);
(*(void (__fastcall **)(_QWORD, _QWORD *, _QWORD))(**(_QWORD **)(a2 + 3920) + 464LL))(
*(_QWORD *)(a2 + 3920),
v80,
0);
v83 = "secretCoin";
v80[44] = 0x400000001LL;
v84 = *(_DWORD *)(a1 + 920);
if ( hasUniqueCoin )
v83 = "secretCoin_b";
v85 = "secretCoin_2";
if ( hasUniqueCoin )
v85 = "secretCoin_2_b";
if ( v84 == 31 )
v86 = v85;
else
v86 = v83;
if ( v84 == 31 )
v87 = "secretCoin_2_01_001.png";
else
v87 = "secretCoin_01_001.png";
v88 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v87);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 136LL))(a1);
(*(void (__fastcall **)(void *))(*(_QWORD *)v88 + 160LL))(v88);
v89 = *(_QWORD *)(a1 + 216);
if ( v89 )
{
v90 = GameObject::getObjectZOrder(a1);
(*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)v89 + 464LL))(v89, v88, v90);
}
v91 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v88 + 184LL))(v88, v91);
if ( v62 == 31 )
{
v92 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 944LL))(a1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v88 + 960LL))(v88, v92);
}
v93 = sub_1002E736C();
v94 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v93);
v95 = sub_1003065B0("%s_01_001.png", v86);
v96 = cocos2d::CCString::getCString((__int64)v95);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v94, v96);
v97 = sub_1002E74E0((__int64)v93);
v98 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v97);
v99 = sub_1003065B0("%s_01_002.png", v86);
v100 = cocos2d::CCString::getCString((__int64)v99);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v98, v100);
v101 = sub_1002E74E0((__int64)v93);
v102 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v101);
v103 = sub_1003065B0("%s_01_003.png", v86);
v104 = cocos2d::CCString::getCString((__int64)v103);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v102, v104);
v105 = sub_1002E74E0((__int64)v93);
v106 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v105);
v107 = sub_1003065B0("%s_01_004.png", v86);
v108 = cocos2d::CCString::getCString((__int64)v107);
cocos2d::CCSpriteFrameCache::spriteFrameByName(v106, v108);
sub_1002E74E0((__int64)v93);
v109 = cocos2d::CCAnimation::createWithSpriteFrames((__int64)v93, 0.05);
v110 = cocos2d::CCAnimate::create((__int64)v109);
v111 = cocos2d::CCRepeatForever::create((__int64)v110);
cocos2d::CCNode::runAction((__int64)v88, (__int64)v111);
sub_1003E7768(a1, (__int64)v88, 0, 50.0, 60.0, 90.0, 180.0, 20.0, 0.75, 0.5, 0.25, 0.0, 0.0);
return;
}
if ( v62 != 30 )
{
if ( v62 != 22 )
return;
goto LABEL_31;
}
if ( ((*(unsigned __int8 *)(a1 + 999) | v5) & 1) == 0 )
{
v76 = ObjectToolbox::sharedState();
v77 = (char *)ObjectToolbox::intKeyToFrame(v76, *(_DWORD *)(a1 + 1028));
sub_100009900(v154, v77);
if ( SHIBYTE(v155) < 0 )
{
sub_1000097D0(__p, v154[0], (unsigned __int64)v154[1]);
}
else
{
*(_OWORD *)__p = *(_OWORD *)v154;
v151 = v155;
}
sub_1002F2D3C((char *)__p, v152);
if ( SHIBYTE(v151) < 0 )
operator delete(__p[0]);
if ( v155 >= 0 )
v112 = v154;
else
v112 = (void **)v154[0];
v113 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v112);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v113 + 912LL))(v113, v4);
v114 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 480LL))(a1, 1);
v115 = v114;
if ( v114 )
{
v116 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v114 + 136LL))(v114);
v117 = (*(float (__fastcall **)(__int64))(*(_QWORD *)a1 + 136LL))(a1);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v113 + 128LL))(v113, v116 * v117);
v118 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v115 + 152LL))(v115);
v119 = (*(float (__fastcall **)(__int64))(*(_QWORD *)a1 + 152LL))(a1);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v113 + 144LL))(v113, v118 * v119);
}
v120 = sub_1002F3514(a1);
v121 = *(unsigned __int8 *)(a1 + 884);
ParentMode = GameObject::getParentMode(a1);
v123 = sub_1002F34B0(a1, v120, v121, ParentMode);
v124 = GameObject::getObjectZOrder(a1);
(*(void (__fastcall **)(_OWORD *, void *, __int64))(*(_QWORD *)v123 + 464LL))(v123, v113, v124);
v125 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v113 + 184LL))(v113, v125);
v126 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 944LL))(a1);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v113 + 960LL))(v113, v126);
if ( *(_QWORD *)(a1 + 888) )
{
if ( v153 >= 0 )
v127 = v152;
else
v127 = (void **)v152[0];
v128 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v127);
if ( *(_BYTE *)(a1 + 1053) )
v129 = 1;
else
v129 = 0xFFFFFFFFLL;
(*(void (__fastcall **)(void *, void *, __int64))(*(_QWORD *)v113 + 464LL))(v113, v128, v129);
v130 = *(float *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v113 + 328LL))(v113);
v131 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v113 + 328LL))(v113);
sub_1000262BC(&v149, v130 * 0.5, *(float *)(v131 + 4) * 0.5);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v128 + 184LL))(v128, &v149);
v132 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 888) + 944LL))(*(_QWORD *)(a1 + 888));
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v128 + 960LL))(v128, v132);
v133 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 888) + 896LL))(*(_QWORD *)(a1 + 888));
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v128 + 912LL))(v128, v133);
v134 = cocos2d::CCDelayTime::create(0.45);
v135 = (unsigned __int8)cocos2d::CCFadeTo::create(0, 0.15);
v143 = sub_10021D420((__int64)v134, v136, v137, v138, v139, v140, v141, v142, v135);
cocos2d::CCNode::runAction((__int64)v128, v143);
}
GJBaseGameLayer::generatePickupAnimRandVal(a2, a1, &v149, &v148);
sub_1003E7768(a1, (__int64)v113, 1, 20.0, 30.0, 65.0, 115.0, 10.0, 0.6, 0.45, 0.15, v149, v148);
if ( v153 < 0 )
operator delete(v152[0]);
if ( SHIBYTE(v155) < 0 )
operator delete(v154[0]);
}
}
}