// // GJSmartTemplate::savePrefab from 0x10040ed40 to 0x10040ef0c (460 bytes) // // 1 xrefs: // > EditorUI::addObjectsToSmartTemplate @ 0x100013957 // // 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:30:08 +0000 // void __fastcall GJSmartTemplate::savePrefab(std::string *a1, __int128 *a2, const std::string *a3) { __int64 size; // rdi __int64 v6; // r12 unsigned int i; // r13d __int64 v8; // rax unsigned int v9; // r14d size_t v10; // r14 const void *v11; // rax unsigned int v12; // ebx size_t v13; // rbx std::string::pointer data; // rsi size_t v15; // rdx char *v16; // r13 int v17; // eax __int128 v19; // [rsp+10h] [rbp-50h] BYREF void *__p; // [rsp+20h] [rbp-40h] std::string *v21; // [rsp+30h] [rbp-30h] std::string::assign(a1 + 7, ""); size = a1[2].__r_.__value_.__l.__size_; v6 = cocos2d::CCDictionary::objectForKey(size, (char *)a2); if ( !v6 ) { v6 = sub_1007FE900(size); cocos2d::CCDictionary::setObject(a1[2].__r_.__value_.__l.__size_, v6, (char *)a2); } v21 = a1; if ( (unsigned int)sub_1007FEF90(v6) ) { for ( i = 0; i < (unsigned int)sub_1007FEF90(v6); ++i ) { v8 = sub_1007FEFE0(v6, i); v9 = *(unsigned __int8 *)(v8 + 80); if ( (v9 & 1) != 0 ) { v10 = *(_QWORD *)(v8 + 88); v11 = *(const void **)(v8 + 96); v12 = (unsigned int)a3->__r_.__value_.__l.0; if ( (v12 & 1) == 0 ) goto LABEL_8; } else { v10 = v9 >> 1; v11 = (const void *)(v8 + 81); v12 = (unsigned int)a3->__r_.__value_.__l.0; if ( (v12 & 1) == 0 ) { LABEL_8: v13 = v12 >> 1; data = a3->__r_.__value_.__s.__data_; goto LABEL_11; } } v13 = a3->__r_.__value_.__l.__size_; data = a3->__r_.__value_.__l.__data_; LABEL_11: v15 = v10; if ( v13 < v10 ) v15 = v13; if ( !memcmp(v11, data, v15) && v13 == v10 ) return; } } v16 = (char *)operator new(0x70u); cocos2d::CCObject::CCObject(v16); *(_QWORD *)v16 = off_100B3E920; *(_OWORD *)(v16 + 56) = 0; *(_OWORD *)(v16 + 72) = 0; *(_OWORD *)(v16 + 88) = 0; *((_QWORD *)v16 + 13) = 0; v17 = dword_100BDEB00++; *((_DWORD *)v16 + 26) = v17; cocos2d::CCObject::autorelease(v16); std::string::operator=((std::string *)(v16 + 80), a3); std::string::operator=((std::string *)(v16 + 56), (const std::string *)a2); sub_1007FEBF0(v6, v16); if ( (*(_BYTE *)a2 & 1) != 0 ) { sub_10001AD30(&v19, *((const void **)a2 + 2), *((_QWORD *)a2 + 1)); } else { __p = *((void **)a2 + 2); v19 = *a2; } GJSmartTemplate::saveRemap(v21, &v19); if ( (v19 & 1) != 0 ) operator delete(__p); }
GD Web Decomp Icon

GD Web Decomp

Raw Source