// // GauntletLayer::setupGauntlet from 0x1002ce9e0 to 0x1002cf734 (3412 bytes) // // 2 xrefs: // > GauntletLayer::init @ 0x1002ce868 // > GauntletLayer::loadLevelsFinished @ 0x1002cf900 // // This function is hookable on this platform (idp: arm, 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:02:37 +0000 // void __fastcall GauntletLayer::setupGauntlet(__int64 a1, __int64 a2) { __int64 v4; // x0 char *v5; // x1 std::string::size_type v6; // x20 std::string::size_type size; // x8 std::string *v8; // x28 std::string::size_type v9; // x27 unsigned __int64 v10; // x25 std::string::size_type v11; // x24 __int128 *p_dst; // x21 signed __int64 v13; // x22 signed __int64 v14; // x9 char *v15; // x26 char *v16; // x0 int v17; // w20 char *v18; // x0 char *v19; // x23 std::string::size_type v20; // x2 const std::string::value_type *v21; // x3 std::string::size_type v22; // x4 std::string::size_type v23; // x8 __int64 i; // x21 __int64 v25; // x20 __int64 v26; // x0 __int64 v27; // x22 __int64 v28; // x0 __int64 v29; // x25 char v30; // w21 float v31; // s1 __n128 v32; // q0 __int64 v33; // x20 _DWORD *v34; // x23 int v35; // w8 __n128 v36; // q0 __int64 v37; // x0 __int64 v38; // x26 float v39; // s14 __int64 v40; // x0 __int64 v41; // x24 float v42; // s14 void **v43; // x0 __int64 v44; // x20 __int64 v45; // x0 __int64 v46; // x24 unsigned int v47; // w8 __n128 v48; // q0 __int64 v49; // x0 const char *CString; // x0 __int64 v51; // x20 __int64 v52; // x28 __int64 v53; // x0 __int64 v54; // x0 __int64 hasCompletedLevel; // x0 __int64 v56; // x25 __int64 v57; // x25 __int64 v58; // x0 __int64 j; // x20 __int64 v60; // x0 float *v61; // x20 char v62; // w0 __int64 v63; // x1 __int64 v64; // x2 __int64 v65; // x3 __int64 v66; // x4 __int64 v67; // x5 __int64 v68; // x6 __int64 v69; // x7 __int64 v70; // x0 float32x2_t *v71; // x1 float v72; // s0 int v73; // w28 int v74; // w27 float *v75; // x8 float *v76; // x9 float *v77; // x9 float32x2_t *v78; // x10 double *v79; // x1 __int64 v80; // x20 int v81; // w8 float v82; // s14 float *v83; // x0 __int64 v84; // x23 char v85; // w24 __int16 v86; // w25 __int16 v87; // w26 __int64 v88; // x0 __int64 v89; // x1 __int64 v90; // x2 __int64 v91; // x3 __int64 v92; // x4 __int64 v93; // x5 __int64 v94; // x6 __int64 v95; // x7 char v96; // w23 unsigned int v97; // w8 float *v98; // x0 __int64 v99; // x1 __int64 v100; // x2 __int64 v101; // x3 __int64 v102; // x4 __int64 v103; // x5 __int64 v104; // x6 __int64 v105; // x7 __int64 v106; // x0 float v107; // [xsp+20h] [xbp-190h] __int64 v108; // [xsp+28h] [xbp-188h] unsigned int v109; // [xsp+30h] [xbp-180h] __int16 v110; // [xsp+34h] [xbp-17Ch] BYREF char v111; // [xsp+36h] [xbp-17Ah] float32x2_t v112; // [xsp+38h] [xbp-178h] BYREF float32x2_t v113; // [xsp+40h] [xbp-170h] BYREF float v114; // [xsp+48h] [xbp-168h] BYREF float v115; // [xsp+50h] [xbp-160h] BYREF float v116; // [xsp+58h] [xbp-158h] BYREF float v117; // [xsp+60h] [xbp-150h] BYREF float v118; // [xsp+68h] [xbp-148h] BYREF float v119; // [xsp+70h] [xbp-140h] BYREF float v120; // [xsp+78h] [xbp-138h] BYREF float32x2_t v121; // [xsp+80h] [xbp-130h] BYREF float32x2_t v122; // [xsp+88h] [xbp-128h] BYREF float32x2_t v123; // [xsp+90h] [xbp-120h] BYREF std::string v124; // [xsp+98h] [xbp-118h] BYREF void *__p[2]; // [xsp+B0h] [xbp-100h] BYREF char v126; // [xsp+C7h] [xbp-E9h] float32x2_t v127; // [xsp+C8h] [xbp-E8h] BYREF __int64 v128; // [xsp+D0h] [xbp-E0h] BYREF std::string::value_type *v129; // [xsp+D8h] [xbp-D8h] BYREF std::string::size_type v130; // [xsp+E0h] [xbp-D0h] unsigned __int8 v131; // [xsp+EFh] [xbp-C1h] __int128 __dst; // [xsp+F0h] [xbp-C0h] BYREF __int64 v133; // [xsp+100h] [xbp-B0h] if ( !a2 || (unsigned int)sub_1002E757C(a2) != 5 || *(_QWORD *)(a1 + 416) ) return; *(_QWORD *)(a1 + 416) = a2; cocos2d::CCObject::retain(a2); v4 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v4, &v128); v108 = cocos2d::CCMenu::create(); (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 464LL))(a1); sub_1000262BC((float *)&v127, *(float *)&v128 * 0.5, (float)(*((float *)&v128 + 1) * 0.5) + -12.0); GauntletNode::frameForType(*(_DWORD *)(a1 + 432), __p); if ( v126 >= 0 ) v5 = (char *)__p; else v5 = (char *)__p[0]; sub_100009900(&v124, v5); sub_100009900(&__dst, "_001"); sub_100009900(&v129, "_locked_001"); v6 = 0; size = HIBYTE(v124.__r_.__value_.__r.__words[2]); if ( (v124.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v8 = &v124; else v8 = (std::string *)v124.__r_.__value_.__r.__words[0]; if ( (v124.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) size = v124.__r_.__value_.__l.__size_; v9 = SHIBYTE(v133); v10 = (unsigned __int64)SHIBYTE(v133) >> 63; v11 = *((_QWORD *)&__dst + 1); if ( v133 >= 0 ) p_dst = &__dst; else p_dst = (__int128 *)__dst; if ( v133 >= 0 ) v13 = SHIBYTE(v133); else v13 = *((_QWORD *)&__dst + 1); while ( !v13 ) { LABEL_28: if ( v6 != -1 ) { if ( (v10 & 1) != 0 ) v20 = v11; else v20 = v9; if ( (v131 & 0x80u) == 0 ) v21 = (const std::string::value_type *)&v129; else v21 = v129; if ( (v131 & 0x80u) == 0 ) v22 = v131; else v22 = v130; std::string::replace(&v124, v6, v20, v21, v22); v23 = v131; if ( (v131 & 0x80u) != 0 ) v23 = v130; v6 += v23; size = HIBYTE(v124.__r_.__value_.__r.__words[2]); if ( (v124.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v8 = &v124; else v8 = (std::string *)v124.__r_.__value_.__r.__words[0]; if ( (v124.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) size = v124.__r_.__value_.__l.__size_; v9 = SHIBYTE(v133); v10 = (unsigned __int64)SHIBYTE(v133) >> 63; v11 = *((_QWORD *)&__dst + 1); p_dst = v133 >= 0 ? &__dst : (__int128 *)__dst; v13 = v133 >= 0 ? SHIBYTE(v133) : *((_QWORD *)&__dst + 1); if ( size >= v6 ) continue; } goto LABEL_52; } v14 = size - v6; if ( (__int64)(size - v6) >= v13 ) { v15 = (char *)v8 + size; v16 = (char *)v8 + v6; v17 = *(char *)p_dst; do { if ( v14 - v13 == -1 ) break; v18 = (char *)memchr(v16, v17, v14 - v13 + 1); if ( !v18 ) break; v19 = v18; if ( !memcmp(v18, p_dst, v13) ) { if ( v19 == v15 ) break; v6 = v19 - (char *)v8; goto LABEL_28; } v16 = v19 + 1; v14 = v15 - (v19 + 1); } while ( v14 >= v13 ); } LABEL_52: if ( (char)v131 < 0 ) { operator delete(v129); LOBYTE(v9) = HIBYTE(v133); } if ( (v9 & 0x80) != 0 ) operator delete((void *)__dst); for ( i = 0; (unsigned int)i < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 416)); i = (unsigned int)(i + 1) ) { v25 = sub_1002E75A0(*(_QWORD *)(a1 + 416), i); v26 = GameStatsManager::sharedState(v25); if ( (GameStatsManager::hasCompletedGauntletLevel( v26, (unsigned int)(*(_DWORD *)(v25 + 328) - *(_DWORD *)(v25 + 332))) & 1) == 0 ) break; } v109 = i; sub_1000262F4(&v129, &dbl_1009F5B30); v27 = 0; v107 = sub_1002CE978(*(_DWORD *)(a1 + 432)) + 40.0; do { v28 = sub_1002E75A0(*(_QWORD *)(a1 + 416), v27); v29 = v28; v30 = 0; if ( v109 == (_DWORD)v27 && (_DWORD)v27 ) v30 = *(_BYTE *)(v28 + 650) ^ 1; v31 = 50.0; if ( (v27 & 1) == 0 ) v31 = -50.0; sub_1000262BC((float *)&__dst, (float)(v27 - 2) * 90.0, v31); v32.n128_u64[0] = (unsigned __int64)sub_100026318(&v127, (float32x2_t *)&__dst, &v123); v33 = sub_1002CFA20(*(unsigned int *)(a1 + 432), ((unsigned int)v27 > v109) | (unsigned __int8)(v30 & 1), v32); v34 = CCMenuItemSpriteExtra::create(v33, 0, a1, (__int64)sub_1002CFAE0, 0); v34[100] = 1067030938; CCMenuItemSpriteExtra::setSizeMult((__int64)v34, 1.2); (*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)v34 + 72LL))(v34, v27); (*(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v108 + 456LL))(v108, v34); if ( (v27 & 1) != 0 ) v35 = 0; else v35 = -6; sub_1000262BC((float *)&v121, 0.0, (float)v35); v36.n128_u64[0] = (unsigned __int64)sub_100026318(&v123, &v121, &v122); cocos2d::CCNode::convertToNodeSpace(&__dst, v108, &v122, v36); v37 = (*(__int64 (__fastcall **)(_DWORD *, __int128 *))(*(_QWORD *)v34 + 184LL))(v34, &__dst); v38 = cocos2d::CCNode::create(v37); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v38 + 320LL))(v38, &unk_1009F5B38); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v33 + 464LL))(v33, v38, 1); (*(void (__fastcall **)(float32x2_t *__return_ptr, __int64))(*(_QWORD *)v33 + 336LL))(&v122, v33); v39 = v122.f32[0]; (*(void (__fastcall **)(float32x2_t *__return_ptr, __int64))(*(_QWORD *)v33 + 336LL))(&v121, v33); sub_1000262BC((float *)&__dst, v39 * 0.5, v121.f32[1] * 0.5); v40 = (*(__int64 (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v38 + 184LL))(v38, &__dst); v41 = cocos2d::CCNode::create(v40); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v41 + 320LL))(v41, &unk_1009F5B38); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v33 + 464LL))(v33, v41, 0xFFFFFFFFLL); (*(void (__fastcall **)(float32x2_t *__return_ptr, __int64))(*(_QWORD *)v33 + 336LL))(&v122, v33); v42 = v122.f32[0]; (*(void (__fastcall **)(float32x2_t *__return_ptr, __int64))(*(_QWORD *)v33 + 336LL))(&v121, v33); sub_1000262BC((float *)&__dst, v42 * 0.5, v121.f32[1] * 0.5); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v41 + 184LL))(v41, &__dst); if ( v126 >= 0 ) v43 = __p; else v43 = (void **)__p[0]; v44 = cocos2d::CCSprite::createWithSpriteFrameName(v43); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v41 + 464LL))(v41, v44, 0xFFFFFFFFLL); sub_1000262BC((float *)&__dst, 0.0, -10.0); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v44 + 184LL))(v44, &__dst); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v44 + 144LL))(v44, 1.2); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v44 + 960LL))(v44, &unk_100763724); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v44 + 912LL))(v44, 75); if ( (unsigned int)v27 > v109 ) { (*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v34 + 1056LL))(v34, 0); goto LABEL_130; } if ( *(char *)(v29 + 367) < 0 ) { sub_1000097D0(&__dst, *(void **)(v29 + 344), *(_QWORD *)(v29 + 352)); } else { __dst = *(_OWORD *)(v29 + 344); v133 = *(_QWORD *)(v29 + 360); } if ( v133 >= 0 ) v45 = cocos2d::CCLabelBMFont::create_1((const char *)&__dst, "bigFont.fnt"); else v45 = cocos2d::CCLabelBMFont::create_1((const char *)__dst, "bigFont.fnt"); v46 = v45; if ( SHIBYTE(v133) < 0 ) operator delete((void *)__dst); if ( (v27 & 1) != 0 ) v47 = 120; else v47 = 80; v48 = cocos2d::CCLabelBMFont::limitLabelWidth(v46, (float)v47, 0.5, 0.0); (*(void (__fastcall **)(__int64, __int64, __int64, __n128))(*(_QWORD *)v38 + 464LL))(v38, v46, 3, v48); sub_1000262BC((float *)&__dst, 0.0, v107); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v46 + 184LL))(v46, &__dst); v49 = sub_1003065B0("%i", *(_DWORD *)(v29 + 948) - *(_DWORD *)(v29 + 952)); CString = (const char *)cocos2d::CCString::getCString(v49); v51 = cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt"); sub_1000262BC((float *)&__dst, 1.0, 0.5); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v51 + 296LL))(v51, &__dst); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v51 + 160LL))(v51, 0.4); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v38 + 464LL))(v38, v51, 2); sub_1000262BC((float *)&__dst, -4.0, -38.0); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v51 + 184LL))(v51, &__dst); v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigStar_001.png"); sub_1000262BC((float *)&__dst, 0.0, 0.5); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v52 + 296LL))(v52, &__dst); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v52 + 160LL))(v52, 0.4); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v38 + 464LL))(v38, v52, 2); sub_1000262BC((float *)&__dst, -4.0, -38.0); v53 = (*(__int64 (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v52 + 184LL))(v52, &__dst); v54 = GameStatsManager::sharedState(v53); hasCompletedLevel = GameStatsManager::hasCompletedLevel(v54, v29); if ( (_DWORD)hasCompletedLevel ) { v56 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png"); sub_1000262BC((float *)&__dst, 0.0, 0.5); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v56 + 296LL))(v56, &__dst); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v38 + 464LL))(v38, v56, 5); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 160LL))(v56, 0.8); sub_1000262BC((float *)&__dst, 8.0, -5.0); hasCompletedLevel = (*(__int64 (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v56 + 184LL))(v56, &__dst); } if ( (_DWORD)v27 == 4 ) { v57 = cocos2d::CCSprite::createWithSpriteFrameName("miniSkull_001.png"); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v38 + 464LL))(v38, v57, 4); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v57 + 160LL))(v57, 1.2); sub_1000262BC((float *)&__dst, 0.0, 5.0); hasCompletedLevel = (*(__int64 (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v57 + 184LL))(v57, &__dst); if ( (v30 & 1) != 0 ) goto LABEL_91; } else { v57 = 0; if ( (v30 & 1) != 0 ) { LABEL_91: v58 = sub_1002E736C(hasCompletedLevel); *(_QWORD *)(a1 + 464) = v58; cocos2d::CCObject::retain(v58); sub_1002E74E0(*(_QWORD *)(a1 + 464), v46); sub_1002E74E0(*(_QWORD *)(a1 + 464), v51); sub_1002E74E0(*(_QWORD *)(a1 + 464), v52); if ( v57 ) sub_1002E74E0(*(_QWORD *)(a1 + 464), v57); for ( j = 0; (unsigned int)j < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 464)); j = (unsigned int)(j + 1) ) { v60 = sub_1002E75A0(*(_QWORD *)(a1 + 464), j); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v60 + 344LL))(v60, 0); } *(_QWORD *)(a1 + 456) = v34; (*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v34 + 1056LL))(v34, 0); v61 = cocos2d::CCDelayTime::create(2.0); v62 = (unsigned __int8)cocos2d::CCCallFunc::create(a1, (__int64)sub_1002CFB24, 0); v70 = sub_10021D420((__int64)v61, v63, v64, v65, v66, v67, v68, v69, v62); cocos2d::CCNode::runAction(a1, v70); } } if ( (_DWORD)v27 ) { if ( (v27 & 1) != 0 ) v71 = (float32x2_t *)&v129; else v71 = &v123; sub_1000262F4(&__dst, (double *)v71); v72 = 27.0; if ( (v27 & 1) == 0 ) v72 = -27.0; *(float32x2_t *)&__dst = vadd_f32((float32x2_t)(LODWORD(v72) | 0xC000000000000000LL), *(float32x2_t *)&__dst); sub_1000262BC((float *)&v122, -2.0, -1.0); sub_1000262BC((float *)&v121, 10.0, 2.5); sub_1000262BC(&v120, 21.0, 11.5); sub_1000262BC(&v119, 25.0, 26.0); sub_1000262BC(&v118, 20.5, 41.0); sub_1000262BC(&v117, 15.0, 56.0); sub_1000262BC(&v116, 10.5, 71.0); sub_1000262BC(&v115, 14.5, 85.5); sub_1000262BC(&v114, 25.0, 96.0); v73 = 1; v74 = 8; do { sub_1000262EC(&v113); v75 = &v115; if ( v73 != 7 ) v75 = &v114; v76 = &v117; if ( v73 != 5 ) v76 = &v116; if ( v73 <= 6 ) v75 = v76; v77 = &v119; if ( v73 != 3 ) v77 = &v118; v78 = &v121; if ( v73 != 1 ) v78 = (float32x2_t *)&v120; if ( v73 <= 2 ) v77 = (float *)v78; if ( v73 <= 4 ) v79 = (double *)v77; else v79 = (double *)v75; sub_10002630C(&v113, v79); if ( (v27 & 1) == 0 ) v113.f32[0] = -v113.f32[0]; sub_100026318((float32x2_t *)&__dst, &v113, &v112); v80 = cocos2d::CCSprite::createWithSpriteFrameName("uiDot_001.png"); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v80, 1); if ( (v73 & 1) != 0 ) v81 = -6710887; else v81 = -5066062; v110 = v81; v111 = BYTE2(v81); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v80 + 960LL))(v80, &v110); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v80 + 184LL))(v80, &v112); if ( (v30 & 1) != 0 ) { (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v80 + 912LL))(v80, 0); v82 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v80 + 168LL))(v80); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v80 + 160LL))(v80, v82 * 2.5); v83 = cocos2d::CCScaleTo::create_1(0.3, v82); v84 = cocos2d::CCEaseBounceOut::create(v83); v85 = (unsigned __int8)cocos2d::CCFadeIn::create(0.1); v86 = *(unsigned __int8 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v80 + 944LL))(v80); v87 = *(unsigned __int8 *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v80 + 944LL))(v80) + 1); v88 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v80 + 944LL))(v80); cocos2d::CCTintTo::create(v86, v87, *(_BYTE *)(v88 + 2), 0.5); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v80 + 960LL))(v80, &unk_100763727); v96 = sub_10021DB6C(v84, v89, v90, v91, v92, v93, v94, v95, v85); if ( (v27 & 1) != 0 ) v97 = v73; else v97 = v74; v98 = cocos2d::CCDelayTime::create((float)((float)v97 * 0.15) + 0.65); v106 = sub_10021D420((__int64)v98, v99, v100, v101, v102, v103, v104, v105, v96); cocos2d::CCNode::runAction(v80, v106); } ++v73; --v74; } while ( v73 != 9 ); } LABEL_130: sub_10002630C(&v129, (double *)&v123); v27 = (unsigned int)(v27 + 1); } while ( (_DWORD)v27 != 5 ); if ( SHIBYTE(v124.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v124.__r_.__value_.__l.__data_); if ( v126 < 0 ) operator delete(__p[0]); }
GD Web Decomp Icon

GD Web Decomp

Raw Source