//
// LevelPage::addSecretCoin from 0x512f00 to 0x51303a (314 bytes)
//
// 1 xrefs:
// > LevelSelectLayer::updatePageWithObject @ 0x514d12
//
// 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:51:33 +0000
//
int __fastcall LevelPage::addSecretCoin(cocos2d::CCNode **this)
{
const char *v2; // r1
GameObject *v3; // r0
int v4; // r6
int (__fastcall *v5)(int, _BYTE *); // r8
cocos2d::CCArray *v6; // r0
cocos2d::CCSpriteFrameCache *v7; // r6
cocos2d::CCSpriteFrameCache *v8; // r8
cocos2d::CCString *v9; // r0
const char *CString; // r0
cocos2d::CCObject *v11; // r0
cocos2d::CCSpriteFrameCache *v12; // r0
cocos2d::CCSpriteFrameCache *v13; // r8
cocos2d::CCString *v14; // r0
const char *v15; // r0
cocos2d::CCObject *v16; // r0
cocos2d::CCSpriteFrameCache *v17; // r0
cocos2d::CCSpriteFrameCache *v18; // r8
cocos2d::CCString *v19; // r0
const char *v20; // r0
cocos2d::CCObject *v21; // r0
cocos2d::CCSpriteFrameCache *v22; // r0
cocos2d::CCSpriteFrameCache *v23; // r8
cocos2d::CCString *v24; // r0
const char *v25; // r0
cocos2d::CCObject *v26; // r0
float v27; // r2
cocos2d::CCAnimate *v28; // r0
cocos2d::CCAnimation *v29; // r1
cocos2d::CCRepeatForever *v30; // r0
cocos2d::CCActionInterval *v31; // r1
cocos2d::CCAction *v32; // r0
float v34[2]; // [sp+4h] [bp-14h] BYREF
_BYTE v35[8]; // [sp+Ch] [bp-Ch] BYREF
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v34);
v3 = GameObject::createWithFrame((GameObject *)"secretCoin_01_001.png", v2);
*(this + 99) = v3;
*((_BYTE *)v3 + 261) = 0;
(*((void (__fastcall **)(cocos2d::CCNode **, _DWORD, int))*this + 58))(this, *(this + 99), 1);
v4 = (int)*(this + 99);
v5 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v4 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, v34[0] * 0.5, v34[1] * 0.5);
v6 = (cocos2d::CCArray *)v5(v4, v35);
v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::create(v6);
v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7);
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_001.png", "secretCoin");
CString = (const char *)cocos2d::CCString::getCString(v9);
v11 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v8, CString);
v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v7, v11);
v13 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v12);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_002.png", "secretCoin");
v15 = (const char *)cocos2d::CCString::getCString(v14);
v16 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, v15);
v17 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v7, v16);
v18 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v17);
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_003.png", "secretCoin");
v20 = (const char *)cocos2d::CCString::getCString(v19);
v21 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v18, v20);
v22 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v7, v21);
v23 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v22);
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_01_004.png", "secretCoin");
v25 = (const char *)cocos2d::CCString::getCString(v24);
v26 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v23, v25);
cocos2d::CCArray::addObject(v7, v26);
v28 = (cocos2d::CCAnimate *)cocos2d::CCAnimation::createWithSpriteFrames(v7, (cocos2d::CCArray *)0x3DEB851F, v27);
v30 = (cocos2d::CCRepeatForever *)cocos2d::CCAnimate::create(v28, v29);
v32 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v30, v31);
return cocos2d::CCNode::runAction(*(this + 99), v32);
}