// // GauntletSelectLayer::init from 0x1402fda30 to 0x1402fe5b4 (2948 bytes) // // 2 xrefs: // > GauntletSelectLayer::scene @ 0x1402fd9e4 // > @ 0x14091e3ec // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // 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:30:07 +0000 // // Hidden C++ exception states: #wind=4 bool __fastcall GauntletSelectLayer::init(__int64 a1, int a2) { bool result; // al cocos2d::CCTextureCache *v4; // rax __int64 v5; // rdx __int64 v6; // rcx cocos2d::CCSpriteFrameCache *v7; // rax __int64 v8; // rdx __int64 v9; // rdx __int64 v10; // rcx __int64 v11; // rax __int64 v12; // rcx cocos2d::CCObject *v13; // rax struct cocos2d::CCSprite *v14; // rdi __int64 v15; // rbx __int64 v16; // rax __int64 v17; // rdi __int64 v18; // rbx __int64 v19; // rax struct cocos2d::CCSprite *v20; // rdi __int64 v21; // rbx __int64 v22; // rcx cocos2d::CCDirector *v23; // rax float v24; // xmm0_4 __int64 v25; // rax struct cocos2d::CCSprite *v26; // rdi __int64 v27; // rbx __int64 v28; // rax __int64 v29; // rbx __int64 v30; // rcx cocos2d::CCDirector *v31; // rax float v32; // xmm6_4 __int64 v33; // rcx cocos2d::CCDirector *v34; // rax float v35; // xmm0_4 __int64 v36; // rax struct cocos2d::CCSprite *v37; // rdi __int64 v38; // rbx __int64 v39; // rax __int64 v40; // rbx __int64 v41; // rcx cocos2d::CCDirector *v42; // rax float v43; // xmm6_4 __int64 v44; // rcx cocos2d::CCDirector *v45; // rax float v46; // xmm0_4 __int64 v47; // rax struct cocos2d::CCSprite *v48; // rdi __int64 v49; // rbx __int64 v50; // rax __int64 v51; // rbx __int64 v52; // rcx cocos2d::CCDirector *v53; // rax float v54; // xmm6_4 __int64 v55; // rcx cocos2d::CCDirector *v56; // rax float v57; // xmm0_4 __int64 v58; // rax struct cocos2d::CCSprite *v59; // rdi __int64 v60; // rbx __int64 v61; // rax __int64 v62; // rbx __int64 v63; // rcx cocos2d::CCDirector *v64; // rax float v65; // xmm6_4 __int64 v66; // rcx cocos2d::CCDirector *v67; // rax float v68; // xmm0_4 __int64 v69; // rax float v70; // xmm6_4 __int64 v71; // rcx __int64 v72; // r14 __int64 v73; // rcx char v74; // r12 const char *v75; // r15 const char *v76; // rcx cocos2d::CCSprite *v77; // rbx cocos2d::CCObject *v78; // rax __int64 v79; // rdi __int64 v80; // rcx cocos2d::CCDirector *v81; // rax float v82; // xmm0_4 __int64 v83; // rbx __int64 v84; // rax __int64 v85; // rax struct cocos2d::CCSprite *v86; // rax int v87; // ebx cocos2d::CCObject *v88; // rax __int64 v89; // rdi __int64 v90; // rcx cocos2d::CCDirector *v91; // rax float v92; // xmm0_4 __int64 v93; // rbx __int64 v94; // rax __int64 v95; // rax int v96; // eax cocos2d::CCObject *v97; // r15 struct cocos2d::CCMenu *v98; // r14 __int64 v99; // rbx __int64 v100; // rcx cocos2d::CCDirector *v101; // rax float v102; // xmm6_4 __int64 v103; // rcx cocos2d::CCDirector *v104; // rax float v105; // xmm0_4 __int64 v106; // rax int v107; // eax cocos2d::CCObject *v108; // rdi __int64 v109; // rbx __int64 v110; // rcx cocos2d::CCDirector *v111; // rax float v112; // xmm6_4 __int64 v113; // rcx cocos2d::CCDirector *v114; // rax float v115; // xmm0_4 __int64 v116; // rax __int64 v117; // rax cocos2d::CCLayerColor *v118; // rax void (__fastcall ***v119)(_QWORD, __int128 **); // rcx const struct cocos2d::CCPoint *v120; // rax char *v121; // rdi __int64 v122; // rbx __int64 v123; // rax struct cocos2d::CCSprite *v124; // rax cocos2d::CCObject *v125; // rax __int64 v126; // rdi __int64 v127; // rcx cocos2d::CCDirector *v128; // rax float v129; // xmm0_4 __int64 v130; // rbx __int64 v131; // rax __int64 v132; // rax __int64 v133; // rcx __int64 v134; // rdx __int64 v135; // rdx __int64 v136; // rcx __int64 v137; // rdx _BYTE v138[8]; // [rsp+48h] [rbp-59h] BYREF void *v139; // [rsp+50h] [rbp-51h] __int128 v140; // [rsp+58h] [rbp-49h] BYREF __int64 v141; // [rsp+68h] [rbp-39h] __int128 v142; // [rsp+70h] [rbp-31h] int v143; // [rsp+110h] [rbp+6Fh] BYREF __int128 *v144; // [rsp+118h] [rbp+77h] BYREF float v145; // [rsp+120h] [rbp+7Fh] BYREF float v146; // [rsp+124h] [rbp+83h] v143 = a2; result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1); if ( result ) { v4 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v4, "GauntletSheet.png", 0); v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6, v5); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v7, "GauntletSheet.plist"); LOBYTE(v8) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v8); LOBYTE(v9) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v9); v11 = cocos2d::CCDirector::sharedDirector(v10); cocos2d::CCDirector::getWinSize(v11, &v145); v13 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v12); *(_QWORD *)(a1 + 496) = v13; cocos2d::CCObject::retain(v13); v14 = cocos2d::CCSprite::create("GJ_gradientBG.png"); *(_QWORD *)(a1 + 432) = v14; v15 = *(_QWORD *)v14; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, 0.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v15 + 288))(v14, v16); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 432), 4294967294LL); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 120LL))(*(_QWORD *)(a1 + 432)); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 136LL))(*(_QWORD *)(a1 + 432)); v17 = **(_QWORD **)(a1 + 432); v18 = *(_QWORD *)(a1 + 432); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, -5.0, -5.0); (*(void (__fastcall **)(__int64, __int64))(v17 + 184))(v18, v19); memset(&v144, 51, 3); (**(void (__fastcall ***)(__int64, __int128 **))(*(_QWORD *)(a1 + 432) + 320LL))( *(_QWORD *)(a1 + 432) + 320LL, &v144); v20 = cocos2d::CCSprite::createWithSpriteFrameName("theLostGauntletsLabel_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v20); v21 = *(_QWORD *)v20; v23 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v22); v24 = cocos2d::CCDirector::getScreenTop(v23) - 28.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v145 * 0.5, v24); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v21 + 184))(v20, v25); LOWORD(v144) = 19532; memset(&v143, 76, 3); v26 = cocos2d::CCSprite::createWithSpriteFrameName("gauntletCorner_001.png"); v27 = *(_QWORD *)v26; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, 0.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v27 + 288))(v26, v28); v29 = *(_QWORD *)v26; v31 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v30); v32 = cocos2d::CCDirector::getScreenBottom(v31) - 1.0; v34 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v33); v35 = cocos2d::CCDirector::getScreenLeft(v34) - 1.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v35, v32); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v29 + 184))(v26, v36); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v26, 1); (**((void (__fastcall ***)(__int64, int *))v26 + 40))((__int64)v26 + 320, &v143); v37 = cocos2d::CCSprite::createWithSpriteFrameName("gauntletCorner_001.png"); v38 = *(_QWORD *)v37; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, 1.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v38 + 288))(v37, v39); v40 = *(_QWORD *)v37; v42 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v41); v43 = cocos2d::CCDirector::getScreenBottom(v42) - 1.0; v45 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v44); v46 = cocos2d::CCDirector::getScreenRight(v45) + 1.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v46, v43); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v40 + 184))(v37, v47); cocos2d::CCSprite::setFlipX(v37, 1); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v37, 1); (**((void (__fastcall ***)(__int64, int *))v37 + 40))((__int64)v37 + 320, &v143); v48 = cocos2d::CCSprite::createWithSpriteFrameName("gauntletCorner_001.png"); v49 = *(_QWORD *)v48; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, 0.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v49 + 288))(v48, v50); v51 = *(_QWORD *)v48; v53 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v52); v54 = cocos2d::CCDirector::getScreenTop(v53) + 1.0; v56 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v55); v57 = cocos2d::CCDirector::getScreenLeft(v56) - 1.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v57, v54); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v51 + 184))(v48, v58); cocos2d::CCSprite::setFlipY(v48, 1); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v48, 1); (**((void (__fastcall ***)(__int64, int *))v48 + 40))((__int64)v48 + 320, &v143); v59 = cocos2d::CCSprite::createWithSpriteFrameName("gauntletCorner_001.png"); v60 = *(_QWORD *)v59; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, 1.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v60 + 288))(v59, v61); v62 = *(_QWORD *)v59; v64 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v63); v65 = cocos2d::CCDirector::getScreenTop(v64) + 1.0; v67 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v66); v68 = cocos2d::CCDirector::getScreenRight(v67) + 1.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v68, v65); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v62 + 184))(v59, v69); cocos2d::CCSprite::setFlipX(v59, 1); cocos2d::CCSprite::setFlipY(v59, 1); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v59, 1); (**((void (__fastcall ***)(__int64, int *))v59 + 40))((__int64)v59 + 320, &v143); v70 = v146 * 0.5; v72 = cocos2d::CCMenu::create(v71); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v72, 5); v74 = *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v73) + 209); v75 = "navArrowBtn_001.png"; v76 = "navArrowBtn_001.png"; if ( v74 ) v76 = "controllerBtn_DPad_Left_001.png"; v77 = cocos2d::CCSprite::createWithSpriteFrameName(v76); (*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v77 + 160LL))(v77); if ( !v74 ) cocos2d::CCSprite::setFlipX(v77, 1); v78 = CCMenuItemSpriteExtra::create((int)v77, 0, a1, (__int64)GauntletSelectLayer::onPrev); *(_QWORD *)(a1 + 448) = v78; (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v72 + 464LL))(v72, v78); *(_DWORD *)(*(_QWORD *)(a1 + 448) + 372LL) = 0x40000000; v79 = **(_QWORD **)(a1 + 448); v81 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v80); v82 = cocos2d::CCDirector::getScreenLeft(v81) + 25.0; v83 = *(_QWORD *)(a1 + 448); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v82, v70); cocos2d::CCNode::convertToNodeSpace(v72, v138, v84); (*(void (__fastcall **)(__int64, __int64))(v79 + 184))(v83, v85); if ( v74 ) v75 = "controllerBtn_DPad_Right_001.png"; v86 = cocos2d::CCSprite::createWithSpriteFrameName(v75); v87 = (int)v86; (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v86 + 160LL))(v86); v88 = CCMenuItemSpriteExtra::create(v87, 0, a1, (__int64)GauntletSelectLayer::onNext); *(_QWORD *)(a1 + 456) = v88; (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v72 + 464LL))(v72, v88); *(_DWORD *)(*(_QWORD *)(a1 + 456) + 372LL) = 0x40000000; v89 = **(_QWORD **)(a1 + 456); v91 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v90); v92 = cocos2d::CCDirector::getScreenRight(v91) - 25.0; v93 = *(_QWORD *)(a1 + 456); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v92, v70); cocos2d::CCNode::convertToNodeSpace(v72, v138, v94); (*(void (__fastcall **)(__int64, __int64))(v89 + 184))(v93, v95); v96 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v97 = CCMenuItemSpriteExtra::create(v96, 0, a1, (__int64)GauntletSelectLayer::onBack); *((_DWORD *)v97 + 93) = 1070386381; v98 = cocos2d::CCMenu::create(v97, 0); (*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v98, 1); v99 = *(_QWORD *)v98; v101 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v100); v102 = cocos2d::CCDirector::getScreenTop(v101) - 22.0; v104 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v103); v105 = cocos2d::CCDirector::getScreenLeft(v104) + 25.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v105, v102); (*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v99 + 184))(v98, v106); v107 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v108 = CCMenuItemSpriteExtra::create(v107, 0, a1, (__int64)GauntletSelectLayer::onInfo); *((_DWORD *)v108 + 93) = 0x40000000; (*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v98 + 464LL))(v98, v108); v109 = *(_QWORD *)v108; v111 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v110); v112 = cocos2d::CCDirector::getScreenBottom(v111) + 30.0; v114 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v113); v115 = cocos2d::CCDirector::getScreenLeft(v114) + 30.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v115, v112); cocos2d::CCNode::convertToNodeSpace(v98, v138, v116); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v109 + 184))(v108, v117); if ( v74 ) GameToolbox::addBackButton(a1, (__int64)v97); v118 = LoadingCircle::create(); *(_QWORD *)(a1 + 488) = v118; *((_QWORD *)v118 + 69) = a1; *(_BYTE *)(*(_QWORD *)(a1 + 488) + 560LL) = 0; cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 488)); LoadingCircle::show(*(_QWORD *)(a1 + 488)); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 488) + 336LL))(*(_QWORD *)(a1 + 488), 0); memset(&v144, 100, 3); v119 = (void (__fastcall ***)(_QWORD, __int128 **))(*(_QWORD *)(*(_QWORD *)(a1 + 488) + 544LL) + 320LL); (**v119)(v119, &v144); v144 = &v140; v140 = 0; v141 = 0; *(_QWORD *)&v142 = 0; *(_QWORD *)&v140 = sub_14003D460(0x30u); v141 = 43; *(_QWORD *)&v142 = 47; strcpy((char *)v140, "Something went wrong\nplease try again later"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v138, 0.5, 1.0); v121 = TextArea::create((__int64)&v140, &qword_140704F78, 1.0, 600.0, v120, 1106247680, 0, 0); *(_QWORD *)(a1 + 480) = v121; v122 = *(_QWORD *)v121; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v145 * 0.5, (float)(v146 * 0.5) + 10.0); (*(void (__fastcall **)(char *, __int64))(v122 + 184))(v121, v123); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 160LL))(*(_QWORD *)(a1 + 480)); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 480), 10); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 480) + 336LL))(*(_QWORD *)(a1 + 480), 0); v124 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); LODWORD(v122) = (_DWORD)v124; (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v124 + 160LL))(v124); v125 = CCMenuItemSpriteExtra::create(v122, 0, a1, (__int64)GauntletSelectLayer::onRefresh); *(_QWORD *)(a1 + 464) = v125; (*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v98 + 464LL))(v98, v125); v126 = **(_QWORD **)(a1 + 464); v128 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v127); v129 = cocos2d::CCDirector::getScreenRight(v128) - 25.0; v130 = *(_QWORD *)(a1 + 464); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v144, v129, 25.0); cocos2d::CCNode::convertToNodeSpace(v98, v138, v131); (*(void (__fastcall **)(__int64, __int64))(v126 + 184))(v130, v132); v133 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v139 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v139); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v133 = *(_QWORD *)&qword_14090BFB0; } if ( cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(v133 + 1184)) ) { GauntletSelectLayer::setupGauntlets(a1); } else { LOBYTE(v134) = 1; (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 488) + 336LL))(*(_QWORD *)(a1 + 488), v134); v136 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v144 = (__int128 *)operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v144); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v136 = *(_QWORD *)&qword_14090BFB0; } *(_QWORD *)(v136 + 1352) = a1 + 416; GameLevelManager::getGauntlets(v136); } LOBYTE(v135) = *(_QWORD *)(a1 + 440) != 0; (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 448) + 336LL))(*(_QWORD *)(a1 + 448), v135); LOBYTE(v137) = *(_QWORD *)(a1 + 440) != 0; (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 456) + 336LL))(*(_QWORD *)(a1 + 456), v137); return 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source