//
// GJWorldNode::unlockActiveItem from 0x62e74c to 0x62eaba (878 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:55:15 +0000
//
int __fastcall GJWorldNode::unlockActiveItem(int this)
{
int v1; // r4
cocos2d::CCSpriteFrameCache *v2; // r5
void (__fastcall *v3)(cocos2d::CCSpriteFrameCache *, int); // r6
cocos2d::CCSpriteFrameCache *v4; // r0
cocos2d::CCSprite *v5; // r1
int v6; // r0
unsigned int i; // r6
const char *v8; // r1
int v9; // r0
int v10; // r0
int v11; // r9
cocos2d::CCNode *v12; // r7
float v13; // s17
float v14; // r1
cocos2d::CCAction *v15; // r0
cocos2d::CCSprite *v16; // r0
cocos2d::CCNode *v17; // r0
float v18; // r7
float v19; // r2
cocos2d::CCEaseBounceOut *v20; // r0
cocos2d::CCActionInterval *v21; // r1
cocos2d::CCAction *v22; // r0
GameLevelManager *v23; // r0
GameLevelManager *v24; // r5
char *v25; // r0
int v26; // r3
bool v27; // r2
int v28; // r5
int v29; // r9
int v30; // r7
void (__fastcall *v31)(int, int *); // r11
int v32; // s16
int v33; // r9
int v34; // r7
void (__fastcall *v35)(int, int *); // r11
int v36; // s17
CCCircleWave *v37; // r5
char v38; // r1
char v39; // r2
int v40; // r3
CCCircleWave *v41; // r5
char v42; // r1
char v43; // r2
int v44; // r3
bool v45; // [sp+0h] [bp-4Ch]
bool v46; // [sp+4h] [bp-48h]
_BYTE v47[8]; // [sp+18h] [bp-34h] BYREF
float v48[2]; // [sp+20h] [bp-2Ch] BYREF
int v49[2]; // [sp+28h] [bp-24h] BYREF
cocos2d::CCSprite *v50; // [sp+30h] [bp-1Ch]
int v51; // [sp+34h] [bp-18h] BYREF
int v52; // [sp+38h] [bp-14h]
float v53; // [sp+3Ch] [bp-10h]
int v54; // [sp+40h] [bp-Ch]
v1 = this;
if ( *(_DWORD *)(this + 268) )
{
v49[0] = 0;
v49[1] = 0;
v50 = nullptr;
std::string::__init(v49, "worldLevelBtn_001.png", 0x15u);
v2 = (cocos2d::CCSpriteFrameCache *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v1 + 268) + 536))(*(_DWORD *)(v1 + 268));
v3 = *(void (__fastcall **)(cocos2d::CCSpriteFrameCache *, int))(*(_DWORD *)v2 + 580);
v4 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v2);
if ( (v49[0] & 1) != 0 )
v5 = v50;
else
v5 = (cocos2d::CCSprite *)((char *)v49 + 1);
v6 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v4, (const char *)v5);
v3(v2, v6);
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v1 + 264)); ++i )
{
v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v1 + 264), i);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 172))(v9, 1);
}
v10 = *(_DWORD *)(v1 + 304);
if ( v10 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 172))(v10, 1);
v11 = 3;
do
{
if ( (v49[0] & 1) != 0 )
v16 = v50;
else
v16 = (cocos2d::CCSprite *)((char *)v49 + 1);
v17 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(v16, v8);
v12 = v17;
(*(void (__fastcall **)(cocos2d::CCSpriteFrameCache *, cocos2d::CCNode *, int))(*(_DWORD *)v2 + 232))(v2, v17, 2);
(*(void (__fastcall **)(float *, cocos2d::CCSpriteFrameCache *))(*(_DWORD *)v2 + 168))(v48, v2);
v13 = v48[0] * 0.5;
(*(void (__fastcall **)(int *, cocos2d::CCSpriteFrameCache *))(*(_DWORD *)v2 + 168))(&v51, v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, v13, *(float *)&v52 * 0.5);
(*(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_DWORD *)v12 + 92))(v12, v47);
(*(void (__fastcall **)(cocos2d::CCNode *, __int16 *))(*(_DWORD *)v12 + 480))(v12, &word_BEEE08);
v51 = 770;
v52 = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, int, int))(*(_DWORD *)v12 + 540))(v12, 770, 1);
v15 = (cocos2d::CCAction *)cocos2d::CCFadeOut::create(COERCE_COCOS2D_CCFADEOUT_(0.5), v14);
cocos2d::CCNode::runAction(v12, v15);
--v11;
}
while ( v11 );
v18 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCSpriteFrameCache *))(*(_DWORD *)v2 + 84))(v2));
(*(void (__fastcall **)(cocos2d::CCSpriteFrameCache *, int))(*(_DWORD *)v2 + 80))(v2, 1070386381);
v20 = (cocos2d::CCEaseBounceOut *)cocos2d::CCScaleTo::create(COERCE_COCOS2D_CCSCALETO_(0.5), v18, v19);
v22 = (cocos2d::CCAction *)cocos2d::CCEaseBounceOut::create(v20, v21);
cocos2d::CCNode::runAction(v2, v22);
v23 = (GameLevelManager *)(*(int (__fastcall **)(_DWORD, int))(**(_DWORD **)(v1 + 268) + 528))(
*(_DWORD *)(v1 + 268),
1);
v24 = (GameLevelManager *)GameLevelManager::sharedState(v23);
v25 = (char *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v1 + 268) + 32))(*(_DWORD *)(v1 + 268));
*(_BYTE *)(GameLevelManager::getMainLevel(v24, v25, 0, v26) + 478) = 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v48, (const cocos2d::CCPoint *)(v1 + 284));
v28 = cocos2d::CCParticleSystemQuad::create((cocos2d::CCParticleSystemQuad *)"coinPickupEffect.plist", nullptr, v27);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v28 + 792))(v28, 1);
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v1 + 232))(v1, v28, 10);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v28 + 92))(v28, v48);
v29 = *(unsigned __int8 *)(v1 + 293);
v30 = *(unsigned __int8 *)(v1 + 294);
v31 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v28 + 680);
v32 = *(unsigned __int8 *)(v1 + 292);
v54 = 1065353216;
*(float *)&v52 = (float)v29 / 255.0;
*(float *)&v51 = (float)v32 / 255.0;
v53 = (float)v30 / 255.0;
v31(v28, &v51);
v33 = *(unsigned __int8 *)(v1 + 293);
v34 = *(unsigned __int8 *)(v1 + 294);
v35 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v28 + 696);
v36 = *(unsigned __int8 *)(v1 + 292);
v54 = 1065353216;
*(float *)&v52 = (float)v33 / 255.0;
*(float *)&v51 = (float)v36 / 255.0;
v53 = (float)v34 / 255.0;
v35(v28, &v51);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v28 + 80))(v28, 1061997773);
v37 = CCCircleWave::create((CCCircleWave *)0x41800000, 4.0, (cocos2d::CCActionTween *)0x3E99999A, 0.0, 0, v46);
v38 = *(_BYTE *)(v1 + 292);
v39 = *(_BYTE *)(v1 + 293);
*((_BYTE *)v37 + 282) = *(_BYTE *)(v1 + 294);
v40 = *(_DWORD *)v37;
*((_BYTE *)v37 + 280) = v38;
*((_BYTE *)v37 + 281) = v39;
(*(void (__fastcall **)(CCCircleWave *, float *))(v40 + 92))(v37, v48);
(*(void (__fastcall **)(int, CCCircleWave *, _DWORD))(*(_DWORD *)v1 + 232))(v1, v37, 0);
v41 = CCCircleWave::create((CCCircleWave *)0x40800000, 1109393408, (cocos2d::CCActionTween *)0x3E99999A, 0.0, v45);
v42 = *(_BYTE *)(v1 + 292);
v43 = *(_BYTE *)(v1 + 293);
*((_BYTE *)v41 + 282) = *(_BYTE *)(v1 + 294);
v44 = *(_DWORD *)v41;
*((_BYTE *)v41 + 280) = v42;
*((_BYTE *)v41 + 281) = v43;
(*(void (__fastcall **)(CCCircleWave *, float *))(v44 + 92))(v41, v48);
(*(void (__fastcall **)(int, CCCircleWave *, int))(*(_DWORD *)v1 + 232))(v1, v41, 10);
*((_DWORD *)v41 + 73) = 1;
*((_DWORD *)v41 + 74) = 4;
return std::string::~string((int)v49);
}
return this;
}