//
// CurrencySprite::init from 0x6041f8 to 0x604990 (1944 bytes)
//
// 1 xrefs:
// > CurrencySprite::create @ 0x6049e6
//
// 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:54:43 +0000
//
int __fastcall CurrencySprite::init(int a1, int a2, int a3)
{
char v6; // r3
float v7; // s16
char v8; // r2
char v9; // r3
char v10; // r2
char v11; // r3
char v12; // r1
char *v13; // r1
const char *v14; // r1
int v15; // r3
cocos2d::CCSprite *v17; // r0
int v18; // r0
int v19; // r1
int v20; // r6
void (__fastcall *v21)(int, _DWORD); // r9
float v22; // r0
const char *v23; // r1
cocos2d::CCNode *v24; // r6
void (__fastcall *v25)(cocos2d::CCNode *, _BYTE *); // r8
float v26; // s18
int v27; // r0
float v28; // r2
cocos2d::CCRepeatForever *v29; // r0
cocos2d::CCActionInterval *v30; // r1
cocos2d::CCAction *v31; // r0
void (__fastcall *v32)(cocos2d::CCNode *, _DWORD); // r8
int v33; // r0
void (__fastcall *v34)(cocos2d::CCNode *, _DWORD); // r8
const char *v35; // r1
cocos2d::CCNode *v36; // r8
void (__fastcall *v37)(cocos2d::CCNode *, _BYTE *); // r11
int v38; // r0
float v39; // r2
cocos2d::CCRepeatForever *v40; // r0
cocos2d::CCActionInterval *v41; // r1
cocos2d::CCAction *v42; // r0
const char *v43; // r1
cocos2d::CCSprite *v44; // r0
cocos2d::CCNode *v45; // r6
void (__fastcall *v46)(cocos2d::CCNode *, _BYTE *); // r8
float v47; // r1
cocos2d::CCEaseIn *v48; // r0
float v49; // r2
cocos2d::CCAction *v50; // r0
int v51; // [sp+0h] [bp-14h]
unsigned int v52; // [sp+Ch] [bp-8h]
__int16 v53; // [sp+10h] [bp-4h] BYREF
char v54; // [sp+12h] [bp-2h]
__int16 v55; // [sp+14h] [bp+0h] BYREF
char v56; // [sp+16h] [bp+2h]
__int16 v57; // [sp+18h] [bp+4h] BYREF
char v58; // [sp+1Ah] [bp+6h]
_BYTE v59[8]; // [sp+1Ch] [bp+8h] BYREF
int v60[2]; // [sp+24h] [bp+10h] BYREF
char *v61; // [sp+2Ch] [bp+18h]
int v62; // [sp+30h] [bp+1Ch] BYREF
int v63; // [sp+34h] [bp+20h]
cocos2d::CCSprite *v64; // [sp+38h] [bp+24h]
v60[0] = 0;
v60[1] = 0;
v61 = nullptr;
v62 = 0;
v63 = 0;
v64 = nullptr;
v53 = -1;
v58 = -1;
v54 = -1;
v56 = -1;
v55 = -1;
v57 = -1;
switch ( a2 )
{
case 2:
std::string::assign(v60, "GJ_bigStar_noShadow_001.png");
std::string::assign(&v62, "GJ_bigStar_glow_001.png");
v8 = -1;
v53 = -26881;
v9 = 0;
goto LABEL_7;
case 3:
std::string::assign(v60, "GJ_bigDiamond_noShadow_001.png");
std::string::assign(&v62, "GJ_bigDiamond_glow_001.png");
HIBYTE(v53) = -1;
v54 = -1;
LOBYTE(v53) = (unsigned int)(float)((float)((float)((float)rand() * 4.6566e-10) * 125.0) + 130.0);
HIBYTE(v55) = -1;
v56 = -1;
LOBYTE(v55) = (unsigned int)(float)((float)((float)((float)rand() * 4.6566e-10) * 125.0) + 130.0);
HIBYTE(v57) = -1;
v58 = -1;
LOBYTE(v57) = (unsigned int)(float)((float)((float)((float)rand() * 4.6566e-10) * 175.0) + 80.0);
goto LABEL_25;
case 4:
std::string::assign(v60, "fireShardBig_001.png");
std::string::assign(&v62, "shard_glow_001.png");
v53 = -26881;
v55 = -1;
LOBYTE(v57) = -1;
v11 = 100;
v54 = 0;
v56 = 0;
goto LABEL_19;
case 5:
std::string::assign(v60, "iceShardBig_001.png");
std::string::assign(&v62, "shard_glow_001.png");
v55 = -256;
v53 = -56;
v9 = -1;
LOBYTE(v57) = 0;
v10 = -106;
v54 = -1;
v56 = -1;
goto LABEL_22;
case 6:
std::string::assign(v60, "poisonShardBig_001.png");
std::string::assign(&v62, "shard_glow_001.png");
v10 = -1;
v9 = 0;
v53 = -106;
v55 = -106;
v12 = 100;
v54 = 0;
v56 = 0;
goto LABEL_21;
case 7:
std::string::assign(v60, "shadowShardBig_001.png");
std::string::assign(&v62, "shard_glow_001.png");
v9 = -1;
v10 = 0;
v53 = 255;
v54 = -1;
v55 = 100;
v56 = -1;
LOBYTE(v57) = -1;
goto LABEL_22;
case 8:
std::string::assign(v60, "lavaShardBig_001.png");
std::string::assign(&v62, "shard_glow_001.png");
v53 = -26881;
v9 = 0;
v55 = 13055;
LOBYTE(v57) = -1;
v10 = 100;
v54 = 0;
v56 = 0;
goto LABEL_22;
case 9:
std::string::assign(v60, "GJ_bigKey_001.png");
std::string::assign(&v62, "GJ_bigKey_glow_001.png");
v6 = -1;
v53 = -1;
v54 = -1;
v55 = -1;
v56 = -1;
v57 = -1;
goto LABEL_4;
case 10:
std::string::assign(v60, "shard0201ShardBig_001.png");
std::string::assign(&v62, "shard2_glow_001.png");
v9 = 0;
v53 = -26881;
v54 = 0;
v55 = -14081;
v56 = 0;
v57 = -26881;
goto LABEL_23;
case 11:
std::string::assign(v60, "shard0202ShardBig_001.png");
std::string::assign(&v62, "shard2_glow_001.png");
v9 = 0;
v53 = 255;
v54 = 0;
v55 = 13055;
v56 = 0;
LOBYTE(v57) = -1;
goto LABEL_17;
case 12:
std::string::assign(v60, "shard0203ShardBig_001.png");
std::string::assign(&v62, "shard2_glow_001.png");
v9 = -1;
v53 = -1;
v54 = -1;
v55 = -1;
v56 = -1;
LOBYTE(v57) = -1;
LABEL_17:
HIBYTE(v57) = v9;
goto LABEL_23;
case 13:
std::string::assign(v60, "shard0204ShardBig_001.png");
std::string::assign(&v62, "shard2_glow_001.png");
v11 = -1;
v53 = -1;
v54 = 0;
v55 = -1;
v56 = 50;
LOBYTE(v57) = -1;
LABEL_19:
HIBYTE(v57) = v11;
v58 = 0;
goto LABEL_25;
case 14:
std::string::assign(v60, "shard0205ShardBig_001.png");
std::string::assign(&v62, "shard2_glow_001.png");
v9 = -1;
v12 = -81;
v53 = -26881;
v55 = 255;
v54 = 50;
v10 = 0;
v56 = -81;
LABEL_21:
LOBYTE(v57) = v12;
goto LABEL_22;
case 15:
std::string::assign(v60, "GJ_bigMoon_noShadow_001.png");
std::string::assign(&v62, "GJ_bigMoon_glow_001.png");
v9 = -1;
v8 = 0;
v53 = -27136;
LABEL_7:
LOBYTE(v55) = v8;
LOBYTE(v57) = v8;
v10 = -56;
v54 = v9;
HIBYTE(v55) = -106;
v56 = v9;
LABEL_22:
HIBYTE(v57) = v10;
LABEL_23:
v58 = v9;
goto LABEL_25;
case 16:
std::string::assign(v60, "GJ_bigGoldKey_001.png");
std::string::assign(&v62, "GJ_bigGoldKey_glow_001.png");
v6 = 50;
v53 = -26881;
v55 = -26881;
v57 = -14081;
v54 = 50;
v56 = 50;
LABEL_4:
v58 = v6;
v7 = 1.5;
goto LABEL_26;
default:
std::string::assign(v60, "currencyOrb_001.png");
LABEL_25:
v7 = 1.0;
LABEL_26:
if ( (v60[0] & 1) != 0 )
v13 = v61;
else
v13 = (char *)v60 + 1;
v51 = cocos2d::CCSprite::initWithSpriteFrameName((cocos2d::CCSprite *)a1, v13);
if ( v51 )
{
if ( (v62 & 1) != 0 )
v15 = v63;
else
v15 = (int)(unsigned __int8)v62 >> 1;
if ( v15 && !a3 )
{
if ( (v62 & 1) != 0 )
v17 = v64;
else
v17 = (cocos2d::CCSprite *)((char *)&v62 + 1);
v18 = cocos2d::CCSprite::createWithSpriteFrameName(v17, v14);
*(_DWORD *)(a1 + 556) = v18;
if ( a2 == 3 )
v19 = 1059145646;
else
v19 = 1058642330;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 80))(v18, v19);
v20 = *(_DWORD *)(a1 + 556);
v21 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v20 + 80);
v22 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v20 + 84))(v20));
v21(v20, v22 * v7);
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 556));
(*(void (__fastcall **)(_DWORD, __int16 *))(**(_DWORD **)(a1 + 556) + 480))(*(_DWORD *)(a1 + 556), &v53);
v24 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"shineBurst_001.png",
v23);
(*(void (__fastcall **)(_DWORD, cocos2d::CCNode *))(**(_DWORD **)(a1 + 556) + 228))(
*(_DWORD *)(a1 + 556),
v24);
v25 = *(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_DWORD *)v24 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v59, *(const cocos2d::CCPoint **)(a1 + 556));
v25(v24, v59);
v26 = -1.0;
if ( (float)((float)rand() * 4.6566e-10) > 0.5 )
v26 = 1.0;
v27 = rand();
v29 = (cocos2d::CCRepeatForever *)cocos2d::CCRotateBy::create(
(cocos2d::CCRotateBy *)0x3F800000,
(float)((float)((float)((float)((float)v27 * 4.6566e-10) * 0.5) + 0.5)
* 180.0)
* v26,
v28);
v31 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v29, v30);
cocos2d::CCNode::runAction(v24, v31);
v32 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD))(*(_DWORD *)v24 + 80);
v33 = rand();
v32(v24, (float)((float)v33 * 4.6566e-10) + 1.8);
v34 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD))(*(_DWORD *)v24 + 456);
v52 = (unsigned int)(float)((float)((float)((float)((float)rand() * 4.6566e-10) * 0.4) + 0.6) * 255.0);
v34(v24, (unsigned __int8)v52);
(*(void (__fastcall **)(cocos2d::CCNode *, __int16 *))(*(_DWORD *)v24 + 480))(v24, &v55);
v36 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"shineBurst_001.png",
v35);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCNode *))(*(_DWORD *)v24 + 228))(v24, v36);
v37 = *(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_DWORD *)v36 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v59, v24);
v37(v36, v59);
(*(void (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v36 + 80))(v36, 1061997773);
(*(void (__fastcall **)(cocos2d::CCNode *, __int16 *))(*(_DWORD *)v36 + 480))(v36, &v57);
v38 = rand();
v40 = (cocos2d::CCRepeatForever *)cocos2d::CCRotateBy::create(
(cocos2d::CCRotateBy *)0x3F800000,
-(float)(v26
* (float)((float)((float)((float)((float)v38 * 4.6566e-10) * 0.5)
+ 0.5)
* 180.0)),
v39);
v42 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v40, v41);
cocos2d::CCNode::runAction(v36, v42);
if ( (v62 & 1) != 0 )
v44 = v64;
else
v44 = (cocos2d::CCSprite *)((char *)&v62 + 1);
v45 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(v44, v43);
(*(void (__fastcall **)(int, cocos2d::CCNode *, int))(*(_DWORD *)a1 + 232))(a1, v45, 10);
v46 = *(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_DWORD *)v45 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v59, (const cocos2d::CCPoint *)a1);
v46(v45, v59);
v48 = (cocos2d::CCEaseIn *)cocos2d::CCFadeOut::create((cocos2d::CCFadeOut *)0x3F000000, v47);
v50 = (cocos2d::CCAction *)cocos2d::CCEaseIn::create(v48, (cocos2d::CCActionInterval *)0x3FA66666, v49);
cocos2d::CCNode::runAction(v45, v50);
}
*(_DWORD *)(a1 + 544) = a2;
}
std::string::~string((int)&v62);
std::string::~string((int)v60);
return v51;
}
}