// // GJSmartTemplate::getTemplateState from 0x100007fc8 to 0x1000082c0 (760 bytes) // // 1 xrefs: // > BrowseSmartTemplateLayer::init @ 0x100071748 // // 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 GJSmartTemplate::getTemplateState(GJSmartTemplate *a1, std::vector *a2) { cocos2d::CCDictionary *v4; // x21 cocos2d::CCNode *v5; // x0 cocos2d::CCArray *v6; // x21 unsigned int v7; // w22 cocos2d::CCString *v8; // x0 char *CString; // x0 __int64 v10; // x23 int v11; // w0 std::string::size_type v12; // x8 std::string::size_type v13; // x9 std::string v14; // [xsp+0h] [xbp-180h] BYREF __int64 v15; // [xsp+18h] [xbp-168h] BYREF std::string v16; // [xsp+20h] [xbp-160h] __int128 v17; // [xsp+38h] [xbp-148h] std::string::size_type v18; // [xsp+48h] [xbp-138h] _QWORD v19[2]; // [xsp+50h] [xbp-130h] std::string __dst; // [xsp+60h] [xbp-120h] BYREF __int64 v21; // [xsp+78h] [xbp-108h] BYREF std::string v22; // [xsp+80h] [xbp-100h] BYREF std::string v23; // [xsp+98h] [xbp-E8h] BYREF _BYTE v24[15]; // [xsp+B0h] [xbp-D0h] void *__p[2]; // [xsp+C0h] [xbp-C0h] BYREF __int64 v26; // [xsp+D0h] [xbp-B0h] std::string __str; // [xsp+D8h] [xbp-A8h] BYREF __int128 v28; // [xsp+F0h] [xbp-90h] BYREF __int64 v29; // [xsp+100h] [xbp-80h] _BYTE v30[32]; // [xsp+108h] [xbp-78h] BYREF v4 = cocos2d::CCDictionary::create(); v5 = cocos2d::CCNode::create(); sub_100004114(8, (__int64)v30, 0, (__int64)v4, (__int64)v5); v6 = cocos2d::CCDictionary::allKeys(v4); if ( (unsigned int)sub_10024A36C(v6) ) { v7 = 0; do { v8 = cocos2d::CCArray::stringAtIndex(v6, v7); CString = (char *)cocos2d::CCString::getCString(v8); sub_100009900((int)&v28, CString); if ( SHIBYTE(v29) < 0 ) { sub_1000097D0(__p, (void *)v28); } else { *(_OWORD *)__p = v28; v26 = v29; } sub_1000041EC((__int64)__p, &__str); if ( SHIBYTE(v26) < 0 ) operator delete(__p[0]); v10 = cocos2d::CCDictionary::objectForKey_1(a1->m_prefabArrays, &__str); sub_100009754(&v21); std::string::operator=(&v22, &__str); std::string::operator=(&v23, &__str); if ( v10 ) v11 = sub_10024A36C(v10); else v11 = 0; *(_DWORD *)v24 = v11; if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) v11 = sub_1000097D0(&__dst, __str.__r_.__value_.__l.__data_); else __dst = __str; v24[4] = GJSmartTemplate::isUnrequired(v11, &__dst); if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__dst.__r_.__value_.__l.__data_); if ( *(int *)v24 <= 0 && (v24[4] & 1) == 0 ) { if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) sub_1000097D0(&v14, __str.__r_.__value_.__l.__data_); else v14 = __str; GJSmartTemplate::scanForPrefab(a1, (std::string::size_type)&v14, &v15); v21 = v15; if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v22.__r_.__value_.__l.__data_); v22 = v16; *((_BYTE *)&v16.__r_.__value_.__s + 23) = 0; v16.__r_.__value_.__s.__data_[0] = 0; if ( SHIBYTE(v23.__r_.__value_.__r.__words[2]) < 0 ) { operator delete(v23.__r_.__value_.__l.__data_); *(_OWORD *)&v23.__r_.__value_.__l.__data_ = v17; v13 = v18; HIBYTE(v18) = 0; LOBYTE(v17) = 0; v23.__r_.__value_.__r.__words[2] = v13; *(_QWORD *)v24 = v19[0]; *(_QWORD *)&v24[7] = *(_QWORD *)((char *)v19 + 7); if ( SHIBYTE(v16.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v16.__r_.__value_.__l.__data_); } else { *(_OWORD *)&v23.__r_.__value_.__l.__data_ = v17; v12 = v18; HIBYTE(v18) = 0; LOBYTE(v17) = 0; v23.__r_.__value_.__r.__words[2] = v12; *(_QWORD *)v24 = v19[0]; *(_QWORD *)&v24[7] = *(_QWORD *)((char *)v19 + 7); } if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v14.__r_.__value_.__l.__data_); } sub_100008354(a2, &v21); if ( SHIBYTE(v23.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v23.__r_.__value_.__l.__data_); if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v22.__r_.__value_.__l.__data_); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); if ( SHIBYTE(v29) < 0 ) operator delete((void *)v28); ++v7; } while ( v7 < (unsigned int)sub_10024A36C(v6) ); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source