{"type": "func", "start": 5031680, "end": 5032046, "name": "ChallengesPage::createChallengeNode", "pseudocode": "// \n// ChallengesPage::createChallengeNode from 0x4cc700 to 0x4cc86e (366 bytes)\n// \n// 3 xrefs:\n// > ChallengesPage::init @ 0x4ccb8a\n// > ChallengesPage::challengeStatusFinished @ 0x4cd01e\n// > ChallengesPage::claimItem @ 0x4cd168\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nChallengeNode *ChallengesPage::createChallengeNode(ChallengesPage *a1, int a2, bool a3, float a4, bool a5)\n{\n  _BOOL4 v8; // r9\n  cocos2d::CCDirector *v10; // r0\n  GameStatsManager *v11; // r0\n  GameStatsManager *v12; // r0\n  GameStatsManager *v13; // r0\n  GJChallengeItem *Challenge; // r0\n  ChallengeNode *v15; // r4\n  const cocos2d::CCPoint *v16; // r0\n  void (__fastcall *v17)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5\n  cocos2d::CCDirector *v18; // r0\n  float v19; // r0\n  cocos2d::CCSequence *v20; // r5\n  cocos2d::CCEaseElasticOut *v21; // r0\n  float v22; // r2\n  cocos2d::CCFiniteTimeAction *v23; // r0\n  cocos2d::CCAction *v24; // r0\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+4h] [bp-30h]\n  cocos2d::CCSize v27; // [sp+Ch] [bp-28h] BYREF\n  cocos2d::CCPoint v28; // [sp+14h] [bp-20h] BYREF\n  cocos2d::CCPoint v29; // [sp+1Ch] [bp-18h] BYREF\n  cocos2d::CCPoint v30; // [sp+24h] [bp-10h] BYREF\n\n  v8 = a3;\n  if ( cocos2d::CCDictionary::objectForKey(a1->m_challengeNodes, a2) )\n    return nullptr;\n  v10 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(&v27, v10);\n  cocos2d::CCPoint::CCPoint(&v28, v27.width * 0.5, (float)((float)(v27.height * 0.5) + 80.0) + 5.0);\n  v11 = GameStatsManager::sharedState();\n  if ( !GameStatsManager::getChallenge(v11, a2) )\n  {\n    v12 = GameStatsManager::sharedState();\n    GameStatsManager::processChallengeQueue(v12, a2);\n    a5 = 1;\n  }\n  v13 = GameStatsManager::sharedState();\n  Challenge = GameStatsManager::getChallenge(v13, a2);\n  v15 = ChallengeNode::create(Challenge, a1, a5);\n  a1->m_mainLayer->addChild(a1->m_mainLayer, v15);\n  setPosition = v15->setPosition;\n  cocos2d::CCPoint::CCPoint(&v30, 0.0, (float)(a2 - 1) * -80.0);\n  cocos2d::CCPoint::operator+(&v29, &v28, &v30);\n  setPosition(v15, &v29);\n  cocos2d::CCDictionary::setObject(a1->m_challengeNodes, v15, a2);\n  if ( !v8 )\n  {\n    v16 = v15->getPosition(v15);\n    cocos2d::CCPoint::CCPoint(&v29, v16);\n    v17 = v15->setPosition;\n    v18 = cocos2d::CCDirector::sharedDirector();\n    v19 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v18));\n    cocos2d::CCPoint::CCPoint(&v30, v19 + 160.0, v29.y);\n    v17(v15, &v30);\n    v20 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(a4);\n    v21 = (cocos2d::CCEaseElasticOut *)cocos2d::CCMoveTo::create(0.5, &v29);\n    v23 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseElasticOut::create(\n                                           v21,\n                                           (cocos2d::CCActionInterval *)0x3F19999A,\n                                           v22);\n    v24 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v20, v23, 0);\n    cocos2d::CCNode::runAction(v15, v24);\n  }\n  return v15;\n}", "assembly": "; \n; ChallengesPage::createChallengeNode from 0x4cc700 to 0x4cc86e (366 bytes)\n; \n; 3 xrefs:\n; > ChallengesPage::init @ 0x4ccb8a\n; > ChallengesPage::challengeStatusFinished @ 0x4cd01e\n; > ChallengesPage::claimItem @ 0x4cd168\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x4cc700\nMOV             R11, R3                                                ; +0x4, 0x4cc704\nLDR             R4, =(__stack_chk_guard_ptr - 0x4CC714)                ; +0x6, 0x4cc706\nSUB             SP, SP, #0x34                                          ; +0x8, 0x4cc708\nMOV             R8, R0                                                 ; +0xa, 0x4cc70a\nLDR.W           R0, [R0,#0x210]; this                                  ; +0xc, 0x4cc70c\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0x10, 0x4cc710\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x12, 0x4cc712\nMOV             R5, R1                                                 ; +0x14, 0x4cc714\nMOV             R9, R2                                                 ; +0x16, 0x4cc716\nLDRB.W          R6, [SP,#0x34+arg_0]                                   ; +0x18, 0x4cc718\nLDR             R3, [R4]                                               ; +0x1c, 0x4cc71c\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x1e, 0x4cc71e\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x20, 0x4cc720\nSTR             R4, [SP,#0x34+var_34]                                  ; +0x24, 0x4cc724\nCMP             R0, #0                                                 ; +0x26, 0x4cc726\nBNE.W           loc_4CC858                                             ; +0x28, 0x4cc728\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x2c, 0x4cc72c\nADD.W           R10, SP, #0x34+var_20                                  ; +0x30, 0x4cc730\nMOV             R1, R0                                                 ; +0x34, 0x4cc734\nADD             R0, SP, #0x34+var_28; this                             ; +0x36, 0x4cc736\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x38, 0x4cc738\nVMOV.F32        S14, #0.5                                              ; +0x3c, 0x4cc73c\nVLDR            S13, [SP,#0x34+var_24]                                 ; +0x40, 0x4cc740\nMOV             R0, R10; this                                          ; +0x44, 0x4cc744\nVLDR            S15, =80.0                                             ; +0x46, 0x4cc746\nVMLA.F32        S15, S13, S14                                          ; +0x4a, 0x4cc74a\nVLDR            S13, [SP,#0x34+var_28]                                 ; +0x4e, 0x4cc74e\nVMUL.F32        S14, S13, S14                                          ; +0x52, 0x4cc752\nVMOV            R1, S14; float                                         ; +0x56, 0x4cc756\nVMOV.F32        S14, #5.0                                              ; +0x5a, 0x4cc75a\nVADD.F32        S15, S15, S14                                          ; +0x5e, 0x4cc75e\nVMOV            R2, S15; float                                         ; +0x62, 0x4cc762\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x66, 0x4cc766\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x6a, 0x4cc76a\nMOV             R1, R5; int                                            ; +0x6e, 0x4cc76e\nBL              _ZN16GameStatsManager12getChallengeEi; GameStatsManager::getChallenge(int) ; +0x70, 0x4cc770\nCBNZ            R0, loc_4CC782                                         ; +0x74, 0x4cc774\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x76, 0x4cc776\nMOV             R1, R5; int                                            ; +0x7a, 0x4cc77a\nBL              _ZN16GameStatsManager21processChallengeQueueEi; GameStatsManager::processChallengeQueue(int) ; +0x7c, 0x4cc77c\nMOVS            R6, #1                                                 ; +0x80, 0x4cc780\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x82, 0x4cc782\nMOV             R1, R5; int                                            ; +0x86, 0x4cc786\nBL              _ZN16GameStatsManager12getChallengeEi; GameStatsManager::getChallenge(int) ; +0x88, 0x4cc788\nMOV             R2, R6; ChallengesPage *                               ; +0x8c, 0x4cc78c\nMOV             R1, R8; GJChallengeItem *                              ; +0x8e, 0x4cc78e\nADD             R7, SP, #0x34+var_10                                   ; +0x90, 0x4cc790\nBL              _ZN13ChallengeNode6createEP15GJChallengeItemP14ChallengesPageb; ChallengeNode::create(GJChallengeItem *,ChallengesPage *,bool) ; +0x92, 0x4cc792\nADD             R6, SP, #0x34+var_18                                   ; +0x96, 0x4cc796\nMOV             R4, R0                                                 ; +0x98, 0x4cc798\nLDR.W           R0, [R8,#0x1C8]                                        ; +0x9a, 0x4cc79a\nMOV             R1, R4                                                 ; +0x9e, 0x4cc79e\nLDR             R3, [R0]                                               ; +0xa0, 0x4cc7a0\nLDR.W           R3, [R3,#0xDC]                                         ; +0xa2, 0x4cc7a2\nBLX             R3                                                     ; +0xa6, 0x4cc7a6\nLDR             R3, [R4]                                               ; +0xa8, 0x4cc7a8\nVLDR            S14, =-80.0                                            ; +0xaa, 0x4cc7aa\nMOVS            R1, #0; float                                          ; +0xae, 0x4cc7ae\nMOV             R0, R7; this                                           ; +0xb0, 0x4cc7b0\nLDR             R3, [R3,#0x5C]                                         ; +0xb2, 0x4cc7b2\nSTR             R3, [SP,#0x34+var_30]                                  ; +0xb4, 0x4cc7b4\nSUBS            R3, R5, #1                                             ; +0xb6, 0x4cc7b6\nVMOV            S15, R3                                                ; +0xb8, 0x4cc7b8\nVCVT.F32.S32    S15, S15                                               ; +0xbc, 0x4cc7bc\nVMUL.F32        S15, S15, S14                                          ; +0xc0, 0x4cc7c0\nVMOV            R2, S15; float                                         ; +0xc4, 0x4cc7c4\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xc8, 0x4cc7c8\nMOV             R2, R7                                                 ; +0xcc, 0x4cc7cc\nMOV             R0, R6                                                 ; +0xce, 0x4cc7ce\nMOV             R1, R10                                                ; +0xd0, 0x4cc7d0\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xd2, 0x4cc7d2\nMOV             R0, R4                                                 ; +0xd6, 0x4cc7d6\nMOV             R1, R6                                                 ; +0xd8, 0x4cc7d8\nLDR             R3, [SP,#0x34+var_30]                                  ; +0xda, 0x4cc7da\nBLX             R3                                                     ; +0xdc, 0x4cc7dc\nLDR.W           R0, [R8,#0x210]; this                                  ; +0xde, 0x4cc7de\nMOV             R1, R4; cocos2d::CCObject *                            ; +0xe2, 0x4cc7e2\nMOV             R2, R5; int                                            ; +0xe4, 0x4cc7e4\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0xe6, 0x4cc7e6\nCMP.W           R9, #0                                                 ; +0xea, 0x4cc7ea\nBNE             loc_4CC854                                             ; +0xee, 0x4cc7ee\nLDR             R3, [R4]                                               ; +0xf0, 0x4cc7f0\nMOV             R0, R4                                                 ; +0xf2, 0x4cc7f2\nLDR             R3, [R3,#0x60]                                         ; +0xf4, 0x4cc7f4\nBLX             R3                                                     ; +0xf6, 0x4cc7f6\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0xf8, 0x4cc7f8\nMOV             R0, R6; this                                           ; +0xfa, 0x4cc7fa\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xfc, 0x4cc7fc\nLDR             R3, [R4]                                               ; +0x100, 0x4cc800\nLDR             R5, [R3,#0x5C]                                         ; +0x102, 0x4cc802\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x104, 0x4cc804\nBL              _ZN7cocos2d10CCDirector14getScreenRightEv; cocos2d::CCDirector::getScreenRight(void) ; +0x108, 0x4cc808\nVLDR            S15, =160.0                                            ; +0x10c, 0x4cc80c\nLDR             R2, [SP,#0x34+var_14]; float                           ; +0x110, 0x4cc810\nVMOV            S14, R0                                                ; +0x112, 0x4cc812\nMOV             R0, R7; this                                           ; +0x116, 0x4cc816\nVADD.F32        S15, S14, S15                                          ; +0x118, 0x4cc818\nVMOV            R1, S15; float                                         ; +0x11c, 0x4cc81c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x120, 0x4cc820\nMOV             R1, R7                                                 ; +0x124, 0x4cc824\nMOV             R0, R4                                                 ; +0x126, 0x4cc826\nBLX             R5                                                     ; +0x128, 0x4cc828\nMOV             R0, R11; this                                          ; +0x12a, 0x4cc82a\nBL              _ZN7cocos2d11CCDelayTime6createEf; cocos2d::CCDelayTime::create(float) ; +0x12c, 0x4cc82c\nMOV             R1, R6; float                                          ; +0x130, 0x4cc830\nMOV             R5, R0                                                 ; +0x132, 0x4cc832\nMOV.W           R0, #0x3F000000; this                                  ; +0x134, 0x4cc834\nBL              _ZN7cocos2d8CCMoveTo6createEfRKNS_7CCPointE; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const&) ; +0x138, 0x4cc838\nLDR             R1, =0x3F19999A; cocos2d::CCActionInterval *           ; +0x13c, 0x4cc83c\nBL              _ZN7cocos2d16CCEaseElasticOut6createEPNS_16CCActionIntervalEf; cocos2d::CCEaseElasticOut::create(cocos2d::CCActionInterval *,float) ; +0x13e, 0x4cc83e\nMOV             R2, R9                                                 ; +0x142, 0x4cc842\nMOV             R1, R0; cocos2d::CCFiniteTimeAction *                  ; +0x144, 0x4cc844\nMOV             R0, R5; this                                           ; +0x146, 0x4cc846\nBL              _ZN7cocos2d10CCSequence6createEPNS_18CCFiniteTimeActionEz; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x148, 0x4cc848\nMOV             R1, R0; cocos2d::CCAction *                            ; +0x14c, 0x4cc84c\nMOV             R0, R4; this                                           ; +0x14e, 0x4cc84e\nBL              _ZN7cocos2d6CCNode9runActionEPNS_8CCActionE; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x150, 0x4cc850\nMOV             R0, R4                                                 ; +0x154, 0x4cc854\nB               loc_4CC85A                                             ; +0x156, 0x4cc856\nMOVS            R0, #0                                                 ; +0x158, 0x4cc858\nLDR             R3, [SP,#0x34+var_34]                                  ; +0x15a, 0x4cc85a\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x15c, 0x4cc85c\nLDR             R3, [R3]                                               ; +0x15e, 0x4cc85e\nCMP             R2, R3                                                 ; +0x160, 0x4cc860\nBEQ             loc_4CC868                                             ; +0x162, 0x4cc862\nBLX             __stack_chk_fail                                       ; +0x164, 0x4cc864\nADD             SP, SP, #0x34 ; '4'                                    ; +0x168, 0x4cc868\nPOP.W           {R4-R11,PC}                                            ; +0x16a, 0x4cc86a", "xrefs": ["ChallengesPage::init @ 0x4ccb8a", "ChallengesPage::challengeStatusFinished @ 0x4cd01e", "ChallengesPage::claimItem @ 0x4cd168"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}