//
// ChallengesPage::createChallengeNode from 0x6000f0 to 0x60025e (366 bytes)
//
// 3 xrefs:
// > ChallengesPage::init @ 0x60057a
// > ChallengesPage::challengeStatusFinished @ 0x600a3e
// > ChallengesPage::claimItem @ 0x600b88
//
// 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:40 +0000
//
int *__fastcall ChallengesPage::createChallengeNode(
cocos2d::CCDictionary **this,
const char *a2,
int a3,
cocos2d::CCDelayTime *a4,
bool a5)
{
int v9; // r6
GameStatsManager *v10; // r0
GameStatsManager *v11; // r0
GameStatsManager *Challenge; // r0
GameStatsManager *v13; // r0
GameStatsManager *v14; // r0
cocos2d::CCLabelBMFont **v15; // r0
bool v16; // r3
int *v17; // r4
const cocos2d::CCPoint *v18; // r0
cocos2d::CCDirector *v19; // r0
void (__fastcall *v20)(int *, _BYTE *); // r5
cocos2d::CCDirector *v21; // r0
float v22; // r0
float v23; // r1
cocos2d::CCSequence *v24; // r5
const cocos2d::CCPoint *v25; // r2
cocos2d::CCEaseElasticOut *v26; // r0
float v27; // r2
cocos2d::CCFiniteTimeAction *v28; // r0
cocos2d::CCAction *v29; // r0
void (__fastcall *v31)(int *, _BYTE *); // [sp+4h] [bp-30h]
float v32[2]; // [sp+Ch] [bp-28h] BYREF
_BYTE v33[8]; // [sp+14h] [bp-20h] BYREF
_BYTE v34[4]; // [sp+1Ch] [bp-18h] BYREF
float v35; // [sp+20h] [bp-14h]
_BYTE v36[8]; // [sp+24h] [bp-10h] BYREF
v9 = a5;
if ( cocos2d::CCDictionary::objectForKey(*(this + 138), (int)a2) )
return nullptr;
cocos2d::CCDirector::sharedDirector(nullptr);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v32);
v10 = (GameStatsManager *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v33,
v32[0] * 0.5,
(float)((float)(v32[1] * 0.5) + 80.0) + 5.0);
v11 = (GameStatsManager *)GameStatsManager::sharedState(v10);
Challenge = (GameStatsManager *)GameStatsManager::getChallenge(v11, a2);
if ( !Challenge )
{
v13 = (GameStatsManager *)GameStatsManager::sharedState(nullptr);
Challenge = (GameStatsManager *)GameStatsManager::processChallengeQueue(v13, a2);
v9 = 1;
}
v14 = (GameStatsManager *)GameStatsManager::sharedState(Challenge);
v15 = (cocos2d::CCLabelBMFont **)GameStatsManager::getChallenge(v14, a2);
v17 = ChallengeNode::create(v15, (GJChallengeItem *)this, (ChallengesPage *)v9, v16);
(*(void (__fastcall **)(_DWORD, int *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v17);
v31 = *(void (__fastcall **)(int *, _BYTE *))(*v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, 0.0, (float)(int)(a2 - 1) * -80.0);
cocos2d::CCPoint::operator+(v34, v33, v36);
v31(v17, v34);
cocos2d::CCDictionary::setObject(*(this + 138), (cocos2d::CCObject *)v17, (int)a2);
if ( !a3 )
{
v18 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int *))(*v17 + 96))(v17);
v19 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, v18);
v20 = *(void (__fastcall **)(int *, _BYTE *))(*v17 + 92);
v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v19);
v22 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v21));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v22 + 160.0, v35);
v20(v17, v36);
v24 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(a4, v23);
v26 = (cocos2d::CCEaseElasticOut *)cocos2d::CCMoveTo::create(
(cocos2d::CCMoveTo *)0x3F000000,
COERCE_FLOAT(v34),
v25);
v28 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseElasticOut::create(
v26,
(cocos2d::CCActionInterval *)0x3F19999A,
v27);
v29 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v24, v28, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v17, v29);
}
return v17;
}