// // GauntletSelectLayer::onPlay from 0x60ad54 to 0x60b072 (798 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:54:47 +0000 // GJRewardItem *__fastcall GauntletSelectLayer::onPlay(GJRewardItem *this, cocos2d::CCObject *a2) { GJRewardItem *v2; // r4 GameLevelManager *isItemUnlocked; // r0 const char *v5; // r5 GameStatsManager *v6; // r0 cocos2d::CCArray *v7; // r10 cocos2d::CCObject *v8; // r0 cocos2d::CCObject *v9; // r0 cocos2d::CCObject *v10; // r0 int v11; // r2 cocos2d::CCDirector *v12; // r5 GameLevelManager *v13; // r0 GameStatsManager *SavedGauntlet; // r6 GameStatsManager *v15; // r0 int v16; // r1 int v17; // r2 int v18; // r3 GameManager *v19; // r0 AdToolbox *v20; // r0 int v21; // r1 int v22; // r2 int v23; // r3 int *v24; // r5 GameManager *isGauntletChestUnlocked; // r0 GameStatsManager *v26; // r0 int v27; // r4 cocos2d::CCDirector *v28; // r0 cocos2d::CCDirector *v29; // r4 int v30; // r0 float v31; // r0 cocos2d::CCScene *v32; // r2 cocos2d::CCScene *v33; // r0 cocos2d::CCNode *v34; // r7 float v35; // r1 cocos2d::CCSequence *v36; // r9 cocos2d::CCFiniteTimeAction *v37; // r0 cocos2d::CCAction *v38; // r0 GameStatsManager *v39; // r0 GameStatsManager *v40; // r0 RewardsPage *v41; // r2 GJRewardItem *v42; // r5 RewardUnlockLayer *v43; // r6 int v44; // [sp+4h] [bp-2Ch] int v45; // [sp+4h] [bp-2Ch] int v46; // [sp+4h] [bp-2Ch] int v47; // [sp+14h] [bp-1Ch] BYREF int v48; // [sp+18h] [bp-18h] int v49; // [sp+1Ch] [bp-14h] int v50; // [sp+20h] [bp-10h] BYREF int v51; // [sp+24h] [bp-Ch] int v52; // [sp+28h] [bp-8h] v2 = this; if ( !*((_BYTE *)this + 349) && !*((_BYTE *)this + 364) && !*((_BYTE *)this + 373) ) { isItemUnlocked = (GameLevelManager *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2); v5 = (const char *)isItemUnlocked; if ( isItemUnlocked != (GameLevelManager *)byte_8 || (v6 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)byte_8), (isItemUnlocked = (GameLevelManager *)GameStatsManager::isItemUnlocked(v6, 12, 5)) != nullptr) ) { v13 = (GameLevelManager *)GameLevelManager::sharedState(isItemUnlocked); SavedGauntlet = (GameStatsManager *)GameLevelManager::getSavedGauntlet(v13, v5); v15 = (GameStatsManager *)GameStatsManager::sharedState(SavedGauntlet); if ( GameStatsManager::isGauntletUnlocked(v15, (int)v5) ) { isGauntletChestUnlocked = GJMapPack::hasCompletedMapPack(SavedGauntlet); if ( isGauntletChestUnlocked && (v26 = (GameStatsManager *)GameStatsManager::sharedState(isGauntletChestUnlocked), (isGauntletChestUnlocked = (GameManager *)GameStatsManager::isGauntletChestUnlocked(v26, (int)v5)) == nullptr) ) { v34 = (cocos2d::CCNode *)cocos2d::CCDictionary::objectForKey(*((cocos2d::CCDictionary **)v2 + 90), (int)v5); v36 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F000000, v35); v37 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v34, GauntletNode::onClaimReward, 0); v38 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v36, v37, 0); v39 = (GameStatsManager *)cocos2d::CCNode::runAction(v34, v38); v40 = (GameStatsManager *)GameStatsManager::sharedState(v39); this = GameStatsManager::unlockGauntletChest(v40, (int)v5); v42 = this; if ( this ) { v43 = (RewardUnlockLayer *)RewardUnlockLayer::create(*((RewardUnlockLayer **)this + 15), 0, v41); (*(void (__fastcall **)(GJRewardItem *, RewardUnlockLayer *, int))(*(_DWORD *)v2 + 232))(v2, v43, 100); return (GJRewardItem *)RewardUnlockLayer::showCollectReward(v43, v42); } } else { *((_BYTE *)v2 + 349) = 1; v27 = GameManager::sharedState(isGauntletChestUnlocked); v28 = (cocos2d::CCDirector *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2); *(_DWORD *)(v27 + 864) = v28; v29 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v28); v30 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2); v31 = GauntletLayer::scene(v30); v33 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create((cocos2d::CCTransitionFade *)0x3F000000, v31, v32); return (GJRewardItem *)cocos2d::CCDirector::replaceScene(v29, v33); } } else { this = (GJRewardItem *)AdToolbox::hasCachedRewardedVideo(nullptr, v16, v17, v18); if ( this ) { if ( !*((_BYTE *)v2 + 372) ) { *((_BYTE *)v2 + 372) = 1; v19 = (GameManager *)GameManager::sharedState(this); *((_DWORD *)v19 + 248) = (char *)v2 + 324; v20 = (AdToolbox *)GameManager::sharedState(v19); *((_DWORD *)v20 + 330) = v5; *((_DWORD *)v2 + 92) = v5; return (GJRewardItem *)AdToolbox::showRewardedVideo(v20, v21, v22, v23); } } else { v50 = 0; v51 = 0; v52 = 0; std::string::__init( &v50, "The Gauntlet cannot be unlocked right now.\nPlease try again later.", 0x4Au); v24 = FLAlertLayer::create( 0, (cocos2d::CCLabelBMFont *)"Unlock Gauntlet", (int)&v50, (ButtonSprite *)"OK", nullptr, 380.0); std::string::~string((int)&v50); return (GJRewardItem *)(*(int (__fastcall **)(int *))(*v24 + 656))(v24); } } } else { v47 = 0; v48 = 0; v49 = 0; v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr); std::string::__init(&v47, "...", 3u); v50 = 0; v51 = 0; v52 = 0; std::string::__init(&v50, "It's no use, that Gauntlet is locked.", 0x35u); LOWORD(v44) = -1; BYTE2(v44) = -1; v8 = (cocos2d::CCObject *)DialogObject::create((int)&v47, (int)&v50, 2, 1065353216, 0, v44); cocos2d::CCArray::addObject(v7, v8); std::string::~string((int)&v50); std::string::~string((int)&v47); v47 = 0; v48 = 0; v49 = 0; std::string::__init(&v47, "...", 3u); v50 = 0; v51 = 0; v52 = 0; std::string::__init(&v50, "The Demon Guardian was the only one who could open it.", 0x3Eu); LOWORD(v45) = -1; BYTE2(v45) = -1; v9 = (cocos2d::CCObject *)DialogObject::create((int)&v47, (int)&v50, 2, 1061997773, 0, v45); cocos2d::CCArray::addObject(v7, v9); std::string::~string((int)&v50); std::string::~string((int)&v47); v47 = 0; v48 = 0; v49 = 0; std::string::__init(&v47, "...", 3u); v50 = 0; v51 = 0; v52 = 0; std::string::__init(&v50, "Not sure what happened to him. He always was a bit crazy.", 0x39u); LOWORD(v46) = -1; BYTE2(v46) = -1; v10 = (cocos2d::CCObject *)DialogObject::create((int)&v47, (int)&v50, 2, 1065353216, 0, v46); cocos2d::CCArray::addObject(v7, v10); std::string::~string((int)&v50); std::string::~string((int)&v47); v12 = DialogLayer::createWithObjects(v7, (cocos2d::CCArray *)((char *)&dword_0 + 2), v11); (*(void (__fastcall **)(GJRewardItem *, cocos2d::CCDirector *, int))(*(_DWORD *)v2 + 232))(v2, v12, 100); DialogLayer::updateChatPlacement(v12, 0); return (GJRewardItem *)DialogLayer::animateInRandomSide(v12); } } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source