// // GJShopLayer::init from 0x10030e690 to 0x10030fb2c (5276 bytes) // // 2 xrefs: // > GJShopLayer::scene @ 0x10030e531 // > GJShopLayer::create @ 0x10030e656 // // 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 12:28:38 +0000 // __int64 __fastcall GJShopLayer::init(__int64 a1, __int64 a2) { __int64 result; // rax __int64 v4; // rax __int64 v5; // rax double v6; // xmm0_8 std::string *v7; // rdi const std::string::value_type *v8; // rsi __int64 v9; // rax unsigned int v10; // r13d size_t v11; // r14 unsigned __int64 v12; // rbx __int8 *v13; // r15 __int8 *v14; // r12 const void *v15; // rsi size_t v16; // r12 __int64 v17; // rbx __int64 v18; // rax unsigned int v19; // r13d size_t v20; // r14 unsigned __int64 v21; // rbx __int8 *v22; // r15 const char *v23; // r12 const void *v24; // rsi size_t v25; // r12 __int64 v26; // r13 __int64 v27; // rax const char *data; // rbx size_t v29; // rax size_t v30; // r14 __int8 *v31; // r15 float *v32; // r15 size_t v33; // r12 std::string::pointer v34; // rdi char *v35; // rbx __int64 v36; // rax __int64 v37; // rbx __int64 v38; // rbx int v39; // r14d int v40; // eax int v41; // ecx int v42; // r8d int v43; // r9d __int64 v44; // rax const char *v45; // rbx size_t v46; // rax size_t v47; // r14 __int8 *v48; // r12 char *v49; // rbx size_t v50; // r13 __int64 v51; // xmm0_8 char *v52; // r14 _WORD *v53; // rax __int64 v54; // r14 unsigned __int64 *v55; // rbx __int64 v56; // rbx double v57; // xmm0_8 char *v58; // rax void *v59; // r14 char *v60; // rax void *v61; // rbx int v62; // edx int v63; // ecx int v64; // r8d int v65; // r9d __int64 v66; // rsi __int64 v67; // rdi __int64 v68; // rax double v69; // xmm0_8 double v70; // xmm0_8 __int64 v71; // rbx __int64 v72; // rax const char *v73; // rsi unsigned int Stat; // eax __int64 v75; // rax __int64 v76; // rbx __int64 v77; // rbx int v78; // r14d size_t v79; // rbx size_t v80; // rdi _BYTE *v81; // rax const char *v82; // rsi _BYTE *v83; // r14 char *v84; // rbx unsigned __int64 *v85; // r14 __int64 v86; // r14 __int64 v87; // rax __int64 v88; // rax __int64 v89; // rbx __int64 v90; // rdx double v91; // xmm0_8 __int64 v92; // rax unsigned int v93; // r14d __int64 v94; // rax _DWORD *v95; // rax int v96; // ecx _QWORD *v97; // rax char *v98; // rcx size_t v99; // rax unsigned int v100; // eax _DWORD *v101; // rax unsigned int v102; // r14d unsigned int v103; // r15d __int64 v104; // rbx __int64 v105; // rax __int64 v106; // rsi bool isStoreItemUnlocked; // r12 unsigned int v108; // eax __int64 StoreItem; // r13 void *v110; // rbx int v111; // eax __int8 *v112; // rdi __int64 v113; // r12 float *v114; // rax _BYTE *v115; // rax size_t v116; // r15 _BYTE *v117; // r14 char *v118; // r15 unsigned __int64 *v119; // r13 float v120; // xmm0_4 __int64 v121; // rbx _DWORD *v122; // rdi __int64 v123; // rbx size_t __sz; // [rsp+0h] [rbp-150h] __int64 v125; // [rsp+8h] [rbp-148h] __int128 v126; // [rsp+10h] [rbp-140h] BYREF void *v127; // [rsp+20h] [rbp-130h] __int64 v128; // [rsp+30h] [rbp-120h] void *v129; // [rsp+38h] [rbp-118h] size_t __n; // [rsp+40h] [rbp-110h] float v131; // [rsp+4Ch] [rbp-104h] __int64 v132; // [rsp+50h] [rbp-100h] void *v133; // [rsp+58h] [rbp-F8h] std::string v134; // [rsp+60h] [rbp-F0h] BYREF std::string v135; // [rsp+78h] [rbp-D8h] BYREF std::string v136; // [rsp+90h] [rbp-C0h] BYREF unsigned __int64 v137; // [rsp+A8h] [rbp-A8h] BYREF std::string __src; // [rsp+B0h] [rbp-A0h] BYREF __int64 v139; // [rsp+C8h] [rbp-88h] float v140; // [rsp+D4h] [rbp-7Ch] __int64 v141; // [rsp+D8h] [rbp-78h] float v142; // [rsp+E4h] [rbp-6Ch] BYREF float v143; // [rsp+E8h] [rbp-68h] unsigned __int64 v144; // [rsp+ECh] [rbp-64h] BYREF unsigned int v145; // [rsp+F4h] [rbp-5Ch] __int64 v146; // [rsp+F8h] [rbp-58h] unsigned __int8 v147; // [rsp+107h] [rbp-49h] void *v148; // [rsp+108h] [rbp-48h] __m128 __dst; // [rsp+110h] [rbp-40h] BYREF void *__p; // [rsp+120h] [rbp-30h] result = cocos2d::CCLayer::init(a1); if ( (_BYTE)result ) { v147 = result; v4 = cocos2d::CCDirector::sharedDirector(a1, a2); v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 160LL))(v4); cocos2d::CCTouchDispatcher::registerForcePrio(v5, a1, 2, 0); v145 = a2; *(_DWORD *)(a1 + 456) = a2; __src.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)28; strcpy(__src.__r_.__value_.__s.__data_, "shopBG_001.png"); strcpy((char *)&v135, "\"storeDesk_001.png"); strcpy((char *)&v136, " shopSign_001.png"); v6 = *(double *)"shopSign_001.png"; v7 = (std::string *)(a1 + 464); std::string::assign((std::string *)(a1 + 464), "GJ_ShopSheet01"); v134.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16; strcpy(v134.__r_.__value_.__s.__data_, "shop.mp3"); switch ( *(_DWORD *)(a1 + 456) ) { case 1: std::string::assign(&v136, "shopSign2_001.png"); v8 = "secretShop.mp3"; goto LABEL_7; case 2: std::string::assign(&v136, "shopSign3_001.png"); v8 = "shop3.ogg"; goto LABEL_7; case 3: std::string::assign((std::string *)(a1 + 464), "GJ_ShopSheet02"); std::string::assign(&__src, "shopBG_02_001.png"); std::string::assign(&v135, "storeDesk_02_001.png"); std::string::assign(&v136, "shopSign4_001.png"); v8 = "shop4.mp3"; goto LABEL_7; case 4: std::string::assign((std::string *)(a1 + 464), "GJ_ShopSheet03"); std::string::assign(&__src, "shopBG_03_001.png"); std::string::assign(&v135, "storeDesk_03_001.png"); std::string::assign(&v136, "shopSign5_001.png"); v8 = "shop5.ogg"; LABEL_7: v7 = &v134; std::string::assign(&v134, v8); break; default: break; } v9 = cocos2d::CCTextureCache::sharedTextureCache(v7); v10 = *(unsigned __int8 *)(a1 + 464); v146 = a1; if ( (v10 & 1) != 0 ) v11 = *(_QWORD *)(a1 + 472); else v11 = v10 >> 1; v12 = v11 + 4; if ( v11 + 4 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v141 = v9; if ( v12 >= 0x17 ) { v16 = 26; if ( (v12 | 7) != 0x17 ) v16 = (v12 | 7) + 1; v13 = (__int8 *)operator new(v16); __dst.i64[0] = v16 | 1; __p = v13; __dst.i64[1] = v11 + 4; v14 = &__dst.i8[1]; if ( (v10 & 1) != 0 ) { LABEL_15: v15 = *(const void **)(v146 + 480); LABEL_20: memmove(v13, v15, v11); LABEL_21: strcpy(&v13[v11], ".png"); if ( (__dst.i8[0] & 1) != 0 ) v14 = (__int8 *)__p; cocos2d::CCTextureCache::addImage(v141, v14, 0); v17 = v146; if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); v18 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v19 = *(unsigned __int8 *)(v17 + 464); if ( (v19 & 1) != 0 ) v20 = *(_QWORD *)(v17 + 472); else v20 = v19 >> 1; v21 = v20 + 6; if ( v20 + 6 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v141 = v18; if ( v21 >= 0x17 ) { v25 = 26; if ( (v21 | 7) != 0x17 ) v25 = (v21 | 7) + 1; v22 = (__int8 *)operator new(v25); __dst.i64[0] = v25 | 1; __p = v22; __dst.i64[1] = v20 + 6; v23 = &__dst.i8[1]; if ( (v19 & 1) != 0 ) { LABEL_32: v24 = *(const void **)(v146 + 480); LABEL_37: memmove(v22, v24, v20); LABEL_38: strcpy(&v22[v20], ".plist"); if ( (__dst.i8[0] & 1) != 0 ) v23 = (const char *)__p; cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v141, v23, v6); v26 = v146; if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 1072LL))(v26, 1); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 1088LL))(v26, 1); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 1000LL))(v26, 1); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 1104LL))(v26, 1); v27 = cocos2d::CCDirector::sharedDirector(v26, 1); cocos2d::CCDirector::getWinSize(&v142, v27); data = __src.__r_.__value_.__s.__data_; if ( *(_DWORD *)(v26 + 456) != 2 ) { if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) data = __src.__r_.__value_.__l.__data_; v32 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)data, v6); LABEL_59: sub_100278250(__dst.f32, 0.0, 0.0); (*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v32 + 296LL))(v32, &__dst); (*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)v26 + 464LL))(v26, v32, 4294967294LL); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v32 + 128LL))(v32, (float)(v142 + 5.0) / v32[108]); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v32 + 144LL))(v32, (float)(v143 + 5.0) / v32[109]); sub_100278250(__dst.f32, -2.5, -2.5); (*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v32 + 184LL))(v32, &__dst); if ( (*(_BYTE *)&v136.__r_.__value_.__s.0 & 1) != 0 ) v34 = v136.__r_.__value_.__l.__data_; else v34 = v136.__r_.__value_.__s.__data_; v35 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v34, COERCE_DOUBLE(3223322624LL)); sub_100278250(__dst.f32, (float)(v142 * 0.5) + -70.0, v143 + -38.0); (*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v35 + 184LL))(v35, &__dst); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v26 + 456LL))(v26, v35); v36 = AnimatedShopKeeper::create(v145); *(_QWORD *)(v26 + 512) = v36; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v26 + 464LL))(v26, v36, 3); v37 = *(_QWORD *)(v26 + 512); sub_100278250(__dst.f32, (float)(v142 * 0.5) + 100.0, 230.0); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v37 + 184LL))(v37, &__dst); v38 = *(_QWORD *)(v26 + 512); v39 = cocos2d::CCDelayTime::create(0.1); v40 = cocos2d::CCCallFunc::create(*(_QWORD *)(v26 + 512), AnimatedShopKeeper::startAnimating, 0); v44 = sub_10039EB60(v39, v40, 0, v41, v42, v43); cocos2d::CCNode::runAction(v38, v44); v45 = v135.__r_.__value_.__s.__data_; if ( *(_DWORD *)(v26 + 456) != 2 ) { if ( (*(_BYTE *)&v135.__r_.__value_.__s.0 & 1) != 0 ) v45 = v135.__r_.__value_.__l.__data_; v49 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v45, COERCE_DOUBLE(1036831949)); LABEL_79: (*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v26 + 464LL))(v26, v49, 1); sub_100278250(__dst.f32, v142 * 0.5, 95.0); (*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v49 + 184LL))(v49, &__dst); v51 = 1064682127; (*(void (__fastcall **)(char *, float))(*(_QWORD *)v49 + 128LL))(v49, 0.95999998); switch ( v145 ) { case 0u: v52 = cocos2d::CCSprite::createWithSpriteFrameName( (__int64)"plushies_001.png", COERCE_DOUBLE(1064682127)); (*(void (__fastcall **)(char *, float))(*(_QWORD *)v52 + 160LL))(v52, 1.1); v53 = CCMenuItemSpriteExtra::create((__int64)v52, 0, v26, (__int64)GJShopLayer::onPlushies, 0); v53[204] = 256; v54 = cocos2d::CCMenu::createWithItem(v53); (*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v26 + 464LL))(v26, v54, 0); v55 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v49 + 192LL))(v49); v51 = 3271688192LL; sub_100278250((float *)&v144, -130.0, 120.0); sub_100278350((double *)__dst.i64, v55, &v144); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v54 + 184LL))(v54, &__dst); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v54 + 1272LL))(v54, 0); break; case 1u: __dst.i8[2] = -1; __dst.i16[0] = -256; (*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v32 + 960LL))(v32, &__dst); __dst.i8[2] = -1; __dst.i16[0] = -256; *(double *)&v51 = (*(double (__fastcall **)(char *, __m128 *))(*(_QWORD *)v49 + 960LL))(v49, &__dst); break; case 2u: v56 = cocos2d::CCMenu::create(); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v26 + 464LL))(v26, v56, 0xFFFFFFFFLL); sub_100278250(__dst.f32, v142 + -40.0, v143 + -60.0); v57 = (*(double (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v56 + 184LL))(v56, &__dst); v58 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"communityCreditsBtn_001.png", v57); v59 = CCMenuItemSpriteExtra::create( (__int64)v58, 0, v26, (__int64)GJShopLayer::onCommunityCredits, 0); v51 = 1067030938; CCMenuItemSpriteExtra::setSizeMult((__int64)v59, 1.2); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v56 + 456LL))(v56, v59); break; case 3u: __dst.i8[2] = -81; __dst.i16[0] = -20561; (*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v32 + 960LL))(v32, &__dst); break; default: break; } v60 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png", *(double *)&v51); v61 = CCMenuItemSpriteExtra::create((__int64)v60, 0, v26, (__int64)GJShopLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v61, 1.6); v66 = sub_1008735E0((_DWORD)v61, 0, v62, v63, v64, v65); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v26 + 464LL))(v26, v66, 1); v67 = cocos2d::CCDirector::sharedDirector(v26, v66); LODWORD(v141) = sub_100479760(v67); v68 = cocos2d::CCDirector::sharedDirector(v67, v66); v69 = sub_100479740(v68); sub_100278250(__dst.f32, *(float *)&v141 + 24.0, *(float *)&v69 + -23.0); v70 = (*(double (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v66 + 184LL))(v66, &__dst); if ( (unsigned __int8)PlatformToolbox::isControllerConnected(v70) ) GameToolbox::addBackButton(v26, v61); v71 = FMODAudioEngine::sharedEngine(v70); if ( (*(_BYTE *)&v134.__r_.__value_.__s.0 & 1) != 0 ) { sub_10001AD30(&v126, v134.__r_.__value_.__l.__data_, v134.__r_.__value_.__l.__size_); } else { v127 = v134.__r_.__value_.__l.__data_; v126 = *(_OWORD *)&v134.__r_.__value_.__l.0; } FMODAudioEngine::playMusic(v71, &v126, 1, 0, 0.0); if ( (v126 & 1) != 0 ) operator delete(v127); if ( *(_DWORD *)(v26 + 456) == 4 ) { v72 = GameStatsManager::sharedState(); v73 = "29"; } else { v72 = GameStatsManager::sharedState(); v73 = "14"; } Stat = GameStatsManager::getStat(v72, v73, (__m128)0LL); v75 = CCCounterLabel::create(Stat, "bigFont.fnt", 0); *(_QWORD *)(v26 + 440) = v75; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v26 + 464LL))(v26, v75, 3); v76 = *(_QWORD *)(v26 + 440); sub_100278250(__dst.f32, v142 + -34.0, v143 + -15.0); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v76 + 184LL))(v76, &__dst); v77 = *(_QWORD *)(v26 + 440); sub_100278250(__dst.f32, 1.0, 0.5); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v77 + 296LL))(v77, &__dst); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(v26 + 440) + 160LL))( *(_QWORD *)(v26 + 440), 0.60000002); v78 = *(_DWORD *)(v26 + 456); v79 = 4LL * (v78 == 4) + 23; v80 = 26; if ( (v79 | 7) != 0x17 ) v80 = (v79 | 7) + 1; v81 = operator new(v80); v82 = "currencyOrbIcon_001.png"; v133 = (void *)"currencyOrbIcon_001.png"; if ( v78 == 4 ) v82 = "currencyDiamondIcon_001.png"; v83 = v81; memcpy(v81, v82, v79); v83[v79] = 0; v148 = v83; v84 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v83, COERCE_DOUBLE(1058642330)); (*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v26 + 464LL))(v26, v84, 3); v85 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v26 + 440) + 192LL))(*(_QWORD *)(v26 + 440)); sub_100278250((float *)&v144, 13.0, -0.5); sub_100278350((double *)__dst.i64, v85, &v144); (*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v84 + 184LL))(v84, &__dst); v86 = cocos2d::CCParticleSystemQuad::create("keyEffect.plist", 0); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v86 + 1504LL))(v86, 8); __dst = (__m128)xmmword_100A05DD0; (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v86 + 1360LL))(v86, &__dst); __dst = _mm_loadh_ps((const double *)&qword_100A07F60); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v86 + 1392LL))(v86, &__dst); __dst = 0; (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v86 + 1376LL))(v86, &__dst); __dst = 0; (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v86 + 1408LL))(v86, &__dst); v87 = *(_QWORD *)v86; v140 = 1.0; (*(void (__fastcall **)(__int64))(v87 + 976))(v86); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v86 + 992LL))(v86, 0.2); sub_100278250(__dst.f32, 12.0, 10.0); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v86 + 960LL))(v86, &__dst); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v26 + 464LL))(v26, v86, 100); v88 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v84 + 192LL))(v84); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v86 + 184LL))(v86, v88); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v86 + 1568LL))(v86, 2); cocos2d::CCParticleSystem::resetSystem(v86); v128 = sub_1007FE900(v86); v89 = *(_QWORD *)(GameStatsManager::sharedState() + 464); v139 = sub_1007FE900(v86); *(_QWORD *)&v91 = GameManager::sharedState(v86, 2, v90).u64[0]; v93 = 0; if ( (unsigned __int8)GameManager::getUGV(v92, "7", v91) ) { while ( v93 < (unsigned int)sub_1007FEF90(v89) ) { v94 = sub_1007FEFE0(v89, v93); if ( *(_DWORD *)(v26 + 456) == *(_DWORD *)(v94 + 364) ) sub_1007FEBF0(v139, v94); ++v93; } } else { while ( v93 < (unsigned int)sub_1007FEF90(v89) ) { v95 = (_DWORD *)sub_1007FEFE0(v89, v93); v96 = *(_DWORD *)(v26 + 456); if ( v96 == v95[91] && (v96 != 1 || v95[79] - v95[80] != 20) ) sub_1007FEBF0(v139, v95); ++v93; } } v97 = cocos2d::CCDictionary::create(); *(_QWORD *)(v26 + 448) = v97; cocos2d::CCObject::retain(v97); cocos2d::CCSprite::createWithSpriteFrameName((__int64)"playerSquare_001.png", v91); v125 = sub_1007FE900("playerSquare_001.png"); v98 = (char *)v133; if ( v145 == 4 ) v98 = "currencyDiamondIcon_001.png"; v133 = v98; __n = 4LL * (v145 == 4) + 23; if ( v145 != 4 ) v140 = 0.0; v99 = 26; if ( (__n | 7) != 0x17 ) v99 = (__n | 7) + 1; __sz = v99; v132 = 0; while ( 1 ) { v100 = sub_1007FEF90(v139); if ( (unsigned int)v132 >= v100 ) break; v101 = (_DWORD *)sub_1007FEFE0(v139, v132); v102 = v101[82] - v101[83]; v103 = v101[85] - v101[86]; v104 = (__int64)v101; v105 = GameStatsManager::sharedState(); v106 = (unsigned int)(*(_DWORD *)(v104 + 316) - *(_DWORD *)(v104 + 320)); isStoreItemUnlocked = GameStatsManager::isStoreItemUnlocked(v105); v141 = v104; v108 = GJItemIcon::unlockedColorForType(v145, v106); StoreItem = GJItemIcon::createStoreItem(v103, v102, isStoreItemUnlocked, v108); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)StoreItem + 160LL))(StoreItem, 1.1); v110 = CCMenuItemSpriteExtra::create(StoreItem, 0, v146, (__int64)GJShopLayer::onSelectItem, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v110, 2.0); sub_1007FEBF0(v128, v110); (*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v110 + 72LL))( v110, (unsigned int)(*(_DWORD *)(v141 + 316) - *(_DWORD *)(v141 + 320))); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)StoreItem + 72LL))(StoreItem, v103); if ( v103 > 9 || (v111 = 770, !_bittest(&v111, v103)) ) sub_1007FEBF0(v125, v110); if ( isStoreItemUnlocked ) { (*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v110 + 1056LL))(v110, 0); GJItemIcon::darkenStoreItem_1(StoreItem, *(unsigned int *)(v146 + 456)); } else { GameToolbox::pointsToString(&__dst); v112 = &__dst.i8[1]; if ( (__dst.i8[0] & 1) != 0 ) v112 = (__int8 *)__p; v113 = cocos2d::CCLabelBMFont::create_3(v112, "bigFont.fnt"); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)StoreItem + 456LL))(StoreItem, v113); v114 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)StoreItem + 328LL))(StoreItem); sub_100278250((float *)&v144, (float)(*v114 * 0.5) + -4.0, -6.5); (*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v113 + 184LL))(v113, &v144); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v113 + 160LL))(v113, 0.34999999); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v113 + 72LL))(v113, 1234); v115 = operator new(__sz); v116 = __n; v117 = v115; memcpy(v115, v133, __n); v117[v116] = 0; v129 = v117; v118 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v117, COERCE_DOUBLE(1051931443)); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)StoreItem + 456LL))(StoreItem, v118); v119 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v113 + 192LL))(v113); v131 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v113 + 328LL))(v113); v120 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v113 + 168LL))(v113); sub_100278250((float *)&v137, (float)((float)((float)(v131 * 0.5) * v120) + 6.0) + v140, -0.5); sub_100278350((double *)&v144, v119, &v137); (*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v118 + 184LL))(v118, &v144); (*(void (__fastcall **)(char *, float))(*(_QWORD *)v118 + 160LL))(v118, 0.5); (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v118 + 72LL))(v118, 1234); operator delete(v129); if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); } cocos2d::CCDictionary::setObject_1( *(_QWORD *)(v146 + 448), (__int64)v110, *(int *)(v141 + 316) - (__int64)*(int *)(v141 + 320)); v132 = (unsigned int)(v132 + 1); v26 = v146; } sub_100278250((float *)&v144, v142 * 0.5, 93.0); sub_1002782D0(&__dst, &v144); v121 = ListButtonBar::create(v128, &__dst, 4, 2, 1, 25.0, 15.0, 60.0, 221.0); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v26 + 464LL))(v26, v121, 100); *(_BYTE *)(v121 + 344) = 1; v122 = *(_DWORD **)(v121 + 320); v122[135] = 1058642330; (*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)v122 + 1000LL))(v122, 1); ListButtonBar::goToPage(v121, 0); *(_BYTE *)(*(_QWORD *)(v121 + 320) + 608LL) = 1; sub_100278260((float *)&v137, 406.0, 200.0); v123 = *(_QWORD *)(v121 + 320); sub_100278270( (__int64)&__dst, *(float *)&v144 - (float)(*(float *)&v137 * 0.5), *((float *)&v144 + 1) - (float)(0.5 * *((float *)&v137 + 1)), (__m128)(unsigned int)v137, (__m128)HIDWORD(v137)); sub_100278810((__m128 *)(v123 + 612), (unsigned __int64 *)&__dst); operator delete(v148); if ( (*(_BYTE *)&v134.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(v134.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v136.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_131: if ( (*(_BYTE *)&v135.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_132; goto LABEL_138; } } else if ( (*(_BYTE *)&v136.__r_.__value_.__s.0 & 1) == 0 ) { goto LABEL_131; } operator delete(v136.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v135.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_132: if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 ) return v147; LABEL_133: operator delete(__src.__r_.__value_.__l.__data_); return v147; } LABEL_138: operator delete(v135.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 ) return v147; goto LABEL_133; } if ( (*(_BYTE *)&v135.__r_.__value_.__s.0 & 1) != 0 ) v45 = v135.__r_.__value_.__l.__data_; v46 = strlen(v45); if ( v46 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v47 = v46; if ( v46 >= 0x17 ) { v50 = 26; if ( (v46 | 7) != 0x17 ) v50 = (v46 | 7) + 1; v48 = (__int8 *)operator new(v50); __p = v48; __dst.i64[0] = v50 | 1; __dst.i64[1] = v47; v26 = v146; } else { __dst.i8[0] = 2 * v46; v48 = &__dst.i8[1]; if ( !v46 ) goto LABEL_76; } memmove(v48, v45, v47); LABEL_76: v48[v47] = 0; v49 = (char *)CCSpriteWithHue::createWithSpriteFrameName(&__dst); if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); CCSpriteWithHue::setHueDegrees(v49, -120.0); goto LABEL_79; } if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 ) data = __src.__r_.__value_.__l.__data_; v29 = strlen(data); if ( v29 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v30 = v29; if ( v29 >= 0x17 ) { v33 = 26; if ( (v29 | 7) != 0x17 ) v33 = (v29 | 7) + 1; v31 = (__int8 *)operator new(v33); __p = v31; __dst.i64[0] = v33 | 1; __dst.i64[1] = v30; } else { __dst.i8[0] = 2 * v29; v31 = &__dst.i8[1]; if ( !v29 ) goto LABEL_56; } memmove(v31, data, v30); LABEL_56: v31[v30] = 0; v32 = (float *)CCSpriteWithHue::createWithSpriteFrameName(&__dst); if ( (__dst.i8[0] & 1) != 0 ) operator delete(__p); CCSpriteWithHue::setHueDegrees(v32, -110.0); __dst.i8[2] = -16; __dst.i16[0] = 240; (*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v32 + 960LL))(v32, &__dst); goto LABEL_59; } } else { v6 = 0.0; __dst = 0; __p = nullptr; __dst.i8[0] = 2 * v21; v22 = &__dst.i8[1]; v23 = &__dst.i8[1]; if ( !v20 ) goto LABEL_38; if ( (v19 & 1) != 0 ) goto LABEL_32; } v24 = (const void *)(v146 + 465); goto LABEL_37; } } else { v6 = 0.0; __dst = 0; __p = nullptr; __dst.i8[0] = 2 * v12; v13 = &__dst.i8[1]; v14 = &__dst.i8[1]; if ( !v11 ) goto LABEL_21; if ( (v10 & 1) != 0 ) goto LABEL_15; } v15 = (const void *)(v146 + 465); goto LABEL_20; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source