// // GJSmartTemplate::dataLoaded from 0x1004280c0 to 0x10042838c (716 bytes) // // 1 xrefs: // > GJSmartTemplate::createWithCoder @ 0x100428097 // // 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::dataLoaded(GJSmartTemplate *a1, DS_Dictionary *a2) { double v2; // xmm0_8 GJSmartTemplate *v3; // r13 __m128 v4; // xmm0 cocos2d::CCDictionary *DictForKey; // rax cocos2d::CCDictionary *m_prefabArrays; // rdi cocos2d::CCDictionary *v7; // rbx cocos2d::CCArray *v8; // r14 unsigned int v9; // r15d cocos2d::CCString *v10; // rax const char *CString; // rbx size_t v12; // rax std::string::size_type v13; // r12 char *data; // r14 size_t v15; // r13 __int64 v16; // rax unsigned int *v17; // rax unsigned __int64 v18; // rbx unsigned __int64 v19; // r14 cocos2d::CCArray *v20; // [rsp+0h] [rbp-70h] GJSmartTemplate *v21; // [rsp+8h] [rbp-68h] __int128 v22; // [rsp+10h] [rbp-60h] BYREF void *__p; // [rsp+20h] [rbp-50h] std::string __dst[2]; // [rsp+30h] [rbp-40h] BYREF v3 = a1; a1->m_nameIndex = DS_Dictionary::getIntegerForKey(a2, "1"); DS_Dictionary::getStringForKey(__dst, (__int64)a2, "2", v2); if ( (a1->m_templateName.m_data.m_short.sizex2 & 1) != 0 ) operator delete(a1->m_templateName.m_data.m_long.longStorage); a1->m_templateName.m_data.m_long.longStorage = __dst[0].__r_.__value_.__l.__data_; v4 = *(__m128 *)&__dst[0].__r_.__value_.__l.0; *(_OWORD *)&a1->m_templateName.m_data.m_short.sizex2 = *(_OWORD *)&__dst[0].__r_.__value_.__l.0; a1->m_allowRotation = DS_Dictionary::getIntegerForKey(a2, "4") != 0; a1->m_allowFlipX = DS_Dictionary::getIntegerForKey(a2, "5") != 0; a1->m_allowFlipY = DS_Dictionary::getIntegerForKey(a2, "6") != 0; a1->m_ignoreCorners = DS_Dictionary::getIntegerForKey(a2, "7") != 0; DictForKey = DS_Dictionary::getDictForKey(a2, "3", 0); m_prefabArrays = a1->m_prefabArrays; if ( m_prefabArrays == DictForKey ) { v7 = v3->m_prefabArrays; } else { v7 = DictForKey; if ( DictForKey ) { cocos2d::CCObject::retain(DictForKey); m_prefabArrays = v3->m_prefabArrays; } if ( m_prefabArrays ) cocos2d::CCObject::release(m_prefabArrays); v3->m_prefabArrays = v7; } v8 = cocos2d::CCDictionary::allKeys(v7); if ( (unsigned int)sub_100720070(v8) ) { v9 = 0; v21 = v3; v20 = v8; do { v10 = cocos2d::CCArray::stringAtIndex(v8, v9); CString = cocos2d::CCString::getCString(v10); v12 = strlen(CString); if ( v12 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)v4.i64); v13 = v12; if ( v12 >= 0x17 ) { v15 = (v12 | 7) + 1; if ( (v12 | 7) == 0x17 ) v15 = 26; data = (char *)operator new(v15); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst[0].__r_.__value_.__r.__words[0] = v15 + 1; v3 = v21; __dst[0].__r_.__value_.__l.__size_ = v13; } else { __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v12); data = __dst[0].__r_.__value_.__s.__data_; if ( !v12 ) { __dst[0].__r_.__value_.__s.__data_[0] = 0; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_22; goto LABEL_17; } } memmove(data, CString, v13); data[v13] = 0; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) { LABEL_22: sub_100006B70(&v22, __dst[0].__r_.__value_.__l.__data_, __dst[0].__r_.__value_.__l.__size_, *(double *)v4.i64); goto LABEL_23; } LABEL_17: __p = __dst[0].__r_.__value_.__l.__data_; v4 = *(__m128 *)&__dst[0].__r_.__value_.__l.0; v22 = *(_OWORD *)&__dst[0].__r_.__value_.__l.0; LABEL_23: GJSmartTemplate::saveRemap((__int64)v3, (__int64)&v22, v4); if ( (v22 & 1) != 0 ) operator delete(__p); v16 = cocos2d::CCDictionary::objectForKey_1((__int64)v3->m_prefabArrays, (char *)__dst); if ( v16 ) { v17 = *(unsigned int **)(v16 + 56); if ( *v17 ) { v18 = *((_QWORD *)v17 + 2); v19 = v18 + 8LL * *v17 - 8; do { if ( !*(_QWORD *)v18 ) break; std::string::operator=((std::string *)(*(_QWORD *)v18 + 56LL), __dst); v18 += 8LL; } while ( v18 <= v19 ); } } if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); ++v9; v8 = v20; } while ( v9 < (unsigned int)sub_100720070(v20) ); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source