//
// GJWorldNode::unlockActiveItem from 0xaa8754 to 0xaa8c14 (1216 bytes)
//
// 4 xrefs:
// > ??> @ 0xef908
// > WorldSelectLayer::animateInActiveIsland @ 0xaa6094
// > GJWorldNode::init @ 0xaa7884
// > ??> @ 0x15473c0
//
// 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:52 +0000
//
__int64 __fastcall GJWorldNode::unlockActiveItem(GJWorldNode *this)
{
cocos2d::CCSpriteFrameCache **v2; // x21
void (__fastcall *v3)(cocos2d::CCSpriteFrameCache **, __int64); // x20
cocos2d::CCSpriteFrameCache *v4; // x0
const char *v5; // x1
__int64 v6; // x0
unsigned int i; // w20
__int64 v8; // x0
__int64 v9; // x0
int v10; // w23
cocos2d::CCSprite *v11; // x0
cocos2d::CCNode *v12; // x20
float v13; // s8
cocos2d::CCFadeOut *v14; // x0
cocos2d::CCAction *v15; // x0
float v16; // s8
cocos2d::CCScaleTo *v17; // x0
cocos2d::CCEaseBounceOut *v18; // x0
cocos2d::CCActionInterval *v19; // x1
cocos2d::CCAction *v20; // x0
GameLevelManager *v21; // x0
GameLevelManager *v22; // x20
unsigned int v23; // w0
bool v24; // w2
__int64 v25; // x20
int v26; // w3
float v27; // s0
void (__fastcall *v28)(__int64, float *); // x2
float v29; // s2
float v30; // s1
float v31; // s0
void (__fastcall *v32)(__int64, float *); // x2
float v33; // s2
__int64 v34; // x0
char v35; // w4
__int64 v36; // x20
char v37; // w3
__int64 v38; // x2
__int64 v39; // x0
char v40; // w4
__int64 v41; // x20
char v42; // w3
__int64 v43; // x2
char v44; // w0
_BYTE v46[8]; // [xsp+80h] [xbp+80h] BYREF
float v47; // [xsp+88h] [xbp+88h] BYREF
float v48; // [xsp+90h] [xbp+90h] BYREF
float v49; // [xsp+94h] [xbp+94h]
float v50; // [xsp+98h] [xbp+98h]
float v51; // [xsp+9Ch] [xbp+9Ch]
__int64 v52[2]; // [xsp+A0h] [xbp+A0h] BYREF
void *v53; // [xsp+B0h] [xbp+B0h]
if ( *((_QWORD *)this + 41) )
{
v52[0] = 0;
v52[1] = 0;
v53 = nullptr;
std::string::__init(v52, "worldLevelBtn_001.png", 0x15u);
v2 = (cocos2d::CCSpriteFrameCache **)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 1072LL))(*((_QWORD *)this + 41));
v3 = *((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v2 + 145);
v4 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(*v2);
v5 = (char *)v52 + 1;
if ( (v52[0] & 1) != 0 )
v5 = (const char *)v53;
v6 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v4, v5);
v3(v2, v6);
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 40)); ++i )
{
v8 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 40), i);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 344LL))(v8, 1);
}
v9 = *((_QWORD *)this + 47);
if ( v9 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 344LL))(v9, 1);
v10 = 3;
do
{
v11 = (cocos2d::CCSprite *)((char *)v52 + 1);
if ( (v52[0] & 1) != 0 )
v11 = (cocos2d::CCSprite *)v53;
v12 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(v11, (const char *)LOBYTE(v52[0]));
(*((void (__fastcall **)(cocos2d::CCSpriteFrameCache **, cocos2d::CCNode *, __int64))*v2 + 58))(v2, v12, 2);
(*((void (__fastcall **)(cocos2d::CCSpriteFrameCache **))*v2 + 42))(v2);
v13 = v47 * 0.5;
(*((void (__fastcall **)(cocos2d::CCSpriteFrameCache **))*v2 + 42))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v13, v49 * 0.5);
(*(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_QWORD *)v12 + 184LL))(v12, v46);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v12 + 960LL))(v12, &qword_117B200);
v14 = (cocos2d::CCFadeOut *)(*(__int64 (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v12 + 1080LL))(
v12,
0x100000302LL);
v15 = (cocos2d::CCAction *)cocos2d::CCFadeOut::create(v14, 0.5);
cocos2d::CCNode::runAction(v12, v15);
--v10;
}
while ( v10 );
v16 = (*((float (__fastcall **)(cocos2d::CCSpriteFrameCache **))*v2 + 21))(v2);
v17 = (cocos2d::CCScaleTo *)(*((__int64 (__fastcall **)(cocos2d::CCSpriteFrameCache **, float))*v2 + 20))(v2, 1.6);
v18 = (cocos2d::CCEaseBounceOut *)cocos2d::CCScaleTo::create(v17, 0.5, v16);
v20 = (cocos2d::CCAction *)cocos2d::CCEaseBounceOut::create(v18, v19);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v2, v20);
v21 = (GameLevelManager *)(*(__int64 (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 41) + 1056LL))(
*((_QWORD *)this + 41),
1);
v22 = (GameLevelManager *)GameLevelManager::sharedState(v21);
v23 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 64LL))(*((_QWORD *)this + 41));
*(_BYTE *)(GameLevelManager::getMainLevel(v22, (const char *)v23, 0) + 650) = 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v47, (GJWorldNode *)((char *)this + 356));
v25 = cocos2d::CCParticleSystemQuad::create((cocos2d::CCParticleSystemQuad *)"coinPickupEffect.plist", nullptr, v24);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v25 + 1584LL))(v25, 1);
(*(void (__fastcall **)(GJWorldNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v25, 10);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v25 + 184LL))(v25, &v47);
v26 = *((unsigned __int8 *)this + 366);
v27 = (float)*((unsigned __int8 *)this + 364);
v28 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v25 + 1360LL);
v29 = (float)*((unsigned __int8 *)this + 365) / 255.0;
v51 = 1.0;
v49 = v29;
v50 = (float)v26 / 255.0;
v48 = v27 / 255.0;
v28(v25, &v48);
v30 = (float)*((unsigned __int8 *)this + 366);
v31 = (float)*((unsigned __int8 *)this + 364);
v32 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v25 + 1392LL);
v33 = (float)*((unsigned __int8 *)this + 365) / 255.0;
v51 = 1.0;
v49 = v33;
v50 = v30 / 255.0;
v48 = v31 / 255.0;
v32(v25, &v48);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v25 + 160LL))(v25, 0.8);
v34 = CCCircleWave::create(nullptr, 16.0, 4.0, 0.3, 0);
v35 = *((_BYTE *)this + 365);
v36 = v34;
v37 = *((_BYTE *)this + 366);
v38 = *(_QWORD *)v34;
*(_BYTE *)(v34 + 340) = *((_BYTE *)this + 364);
*(_BYTE *)(v34 + 341) = v35;
*(_BYTE *)(v34 + 342) = v37;
(*(void (__fastcall **)(__int64, float *))(v38 + 184))(v34, &v47);
(*(void (__fastcall **)(GJWorldNode *, __int64, _QWORD))(*(_QWORD *)this + 464LL))(this, v36, 0);
v39 = CCCircleWave::create(nullptr, 4.0, 40.0, 0.3);
v40 = *((_BYTE *)this + 365);
v41 = v39;
v42 = *((_BYTE *)this + 366);
v43 = *(_QWORD *)v39;
*(_BYTE *)(v39 + 340) = *((_BYTE *)this + 364);
*(_BYTE *)(v39 + 341) = v40;
*(_BYTE *)(v39 + 342) = v42;
(*(void (__fastcall **)(__int64, float *))(v43 + 184))(v39, &v47);
(*(void (__fastcall **)(GJWorldNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v41, 10);
v44 = v52[0];
*(_DWORD *)(v41 + 352) = 1;
*(_DWORD *)(v41 + 356) = 4;
if ( (v44 & 1) != 0 )
operator delete(v53);
}
return _stack_chk_guard;
}