// // cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile from 0x1003bc8ac to 0x1003bcabc (528 bytes) // // 21 xrefs: // > SecretLayer5::init @ 0x100074018 // > SecretLayer5::init @ 0x10007403c // > GJShopLayer::init @ 0x10014a95c // > GauntletSelectLayer::init @ 0x1001be6c0 // > LoadingLayer::init @ 0x1001d608c // > LoadingLayer::loadAssets @ 0x1001d6838 // > LoadingLayer::loadAssets @ 0x1001d6920 // > LoadingLayer::loadAssets @ 0x1001d6944 // > LoadingLayer::loadAssets @ 0x1001d6990 // > LoadingLayer::loadAssets @ 0x1001d6ae0 // > LoadingLayer::loadAssets @ 0x1001d6bec // > LoadingLayer::loadAssets @ 0x1001d6c1c // > SecretRewardsLayer::init @ 0x1002e8024 // > SecretLayer2::init @ 0x1003097ac // > SecretLayer3::init @ 0x10030ddd4 // > GameManager::loadIcon @ 0x100317b94 // > GameManager::loadDeathEffect @ 0x100318370 // > LevelAreaLayer::init @ 0x100343c10 // > LevelAreaInnerLayer::init @ 0x1003457b4 // > SecretLayer4::init @ 0x100353e70 // > GJPathsLayer::init @ 0x1003b7ffc // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(cocos2d::CCSpriteFrameCache *a1, const char *a2) { __int64 v4; // x21 __int64 v5; // x21 __int64 v6; // x22 CCContentManager *v7; // x0 cocos2d::CCDictionary *v8; // x21 __int64 v9; // x0 __int64 v10; // x22 cocos2d::CCString *v11; // x0 const char *CString; // x0 std::string::size_type size; // x8 std::string *p_p; // x9 std::string::size_type v15; // x1 char *v16; // x8 int v17; // w9 std::string *v18; // x0 std::string *v19; // x0 cocos2d::CCTextureCache *v20; // x0 std::string *v21; // x1 cocos2d::CCTexture2D *v22; // x2 __int64 v23; // x20 void *v24[2]; // [xsp+0h] [xbp-50h] BYREF char v25; // [xsp+17h] [xbp-39h] std::string __p; // [xsp+18h] [xbp-38h] BYREF v4 = *(_QWORD *)&a1[1].m_nTag; sub_100009900(&__p, (char *)a2); v5 = sub_1000B3B98(v4, (const void **)&__p.__r_.__value_.__l.__data_); v6 = *(_QWORD *)&a1[1].m_nTag + 8LL; if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v6 != v5 ) return; v7 = CCContentManager::sharedManager(); v8 = CCContentManager::addDict(v7, a2, 0); sub_100009900(&__p, ""); sub_100009900(v24, "metadata"); v9 = cocos2d::CCDictionary::objectForKey_1(v8, v24); v10 = v9; if ( (v25 & 0x80000000) == 0 ) { if ( !v9 ) goto LABEL_10; LABEL_8: sub_100009900(v24, "textureFileName"); v11 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(v10, v24); CString = cocos2d::CCString::getCString(v11); std::string::assign(&__p, CString); if ( v25 < 0 ) operator delete(v24[0]); goto LABEL_10; } operator delete(v24[0]); if ( v10 ) goto LABEL_8; LABEL_10: size = HIBYTE(__p.__r_.__value_.__r.__words[2]); if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) size = __p.__r_.__value_.__l.__size_; if ( !size ) { std::string::assign(&__p, a2); p_p = (std::string *)__p.__r_.__value_.__r.__words[0]; if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) p_p = &__p; if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v15 = SHIBYTE(__p.__r_.__value_.__r.__words[2]); else v15 = __p.__r_.__value_.__l.__size_; v16 = (char *)&p_p[-1].__r_.__value_.__r.__words[2] + 7; while ( v15 ) { v17 = (unsigned __int8)v16[v15--]; if ( v17 == 46 ) goto LABEL_23; } v15 = -1; LABEL_23: v18 = std::string::erase(&__p, v15, 0xFFFFFFFFFFFFFFFFLL); std::string::operator=(&__p, v18); v19 = std::string::append(&__p, ".png"); std::string::operator=(&__p, v19); } v20 = cocos2d::CCTextureCache::sharedTextureCache(); if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v21 = &__p; else v21 = (std::string *)__p.__r_.__value_.__r.__words[0]; v22 = cocos2d::CCTextureCache::addImage(v20, (const char *)v21, 0); if ( v22 ) { cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary(a1, v8, v22); v23 = *(_QWORD *)&a1[1].m_nTag; sub_100009900(v24, (char *)a2); sub_1003BCE4C(v23, v24, v24); if ( v25 < 0 ) operator delete(v24[0]); } if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source