// // CCAnimatedSprite::loadType from 0x10033b7f0 to 0x10033bef2 (1794 bytes) // // 1 xrefs: // > CCAnimatedSprite::initWithType @ 0x10033b7a0 // // 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:41 +0000 // void __fastcall CCAnimatedSprite::loadType(__int64 a1, const char *a2, __int64 a3, int a4) { size_t v6; // rax std::string::size_type v7; // r12 char *data; // r14 size_t v9; // r15 std::string::pointer v10; // r14 unsigned int v11; // eax size_t v12; // rax const void *v13; // rdi size_t size; // rdx std::string::pointer v15; // rsi bool v16; // zf char v17; // r13 __int64 v18; // rdi __int64 v19; // rdi __int64 v20; // rdi __int64 v21; // rdi __int64 v22; // rax __int64 Definition; // r13 __int64 v24; // r14 std::string::pointer v25; // r15 const char *v26; // r14 size_t v27; // rax std::string::size_type v28; // r12 char *v29; // r13 const char *v30; // r15 size_t v31; // r14 __int64 v32; // rax __int64 v33; // r14 __int64 v34; // r15 char v35; // r12 char v36; // r15 __int64 v37; // rax const std::string::value_type *CString; // rax char *v39; // r14 __int64 v40; // rax void *v41; // rax __int64 v42; // r14 __int64 v43; // r14 __int64 v44; // rax size_t v45; // rax size_t v46; // r15 char *v47; // r14 size_t v48; // r12 __int64 v49; // rax __int64 v50; // rdi __int64 v51; // rdi const char *v52; // r14 __int64 v53; // rbx size_t v54; // rax size_t v55; // r15 char *v56; // r12 size_t v57; // r13 __int64 *v58; // [rsp+8h] [rbp-98h] _QWORD v60[2]; // [rsp+18h] [rbp-88h] BYREF void *v61; // [rsp+28h] [rbp-78h] _QWORD v62[2]; // [rsp+30h] [rbp-70h] BYREF void *v63; // [rsp+40h] [rbp-60h] int v64; // [rsp+4Ch] [rbp-54h] __int64 v65; // [rsp+50h] [rbp-50h] __int64 v66; // [rsp+58h] [rbp-48h] std::string __dst[2]; // [rsp+60h] [rbp-40h] BYREF v66 = a3; v6 = strlen(a2); if ( v6 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_92; v7 = v6; v64 = a4; if ( v6 >= 0x17 ) { v9 = 26; if ( (v6 | 7) != 0x17 ) v9 = (v6 | 7) + 1; data = (char *)operator new(v9); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst[0].__r_.__value_.__r.__words[0] = v9 + 1; __dst[0].__r_.__value_.__l.__size_ = v7; goto LABEL_8; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v6); data = __dst[0].__r_.__value_.__s.__data_; if ( v6 ) LABEL_8: memcpy(data, a2, v7); data[v7] = 0; v10 = __dst[0].__r_.__value_.__l.__data_; v11 = *(unsigned __int8 *)(a1 + 600); if ( (v11 & 1) != 0 ) { v12 = *(_QWORD *)(a1 + 608); v13 = *(const void **)(a1 + 616); } else { v12 = v11 >> 1; v13 = (const void *)(a1 + 601); } size = *(_BYTE *)&__dst[0].__r_.__value_.__l.0 >> 1; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) size = __dst[0].__r_.__value_.__l.__size_; v15 = __dst[0].__r_.__value_.__l.__data_; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 ) v15 = __dst[0].__r_.__value_.__s.__data_; v16 = size == v12; if ( size >= v12 ) size = v12; v17 = v16 & (memcmp(v13, v15, size) == 0); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(v10); if ( !v17 ) { v18 = *(_QWORD *)(a1 + 672); if ( v18 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v18 + 736LL))(v18); v19 = *(_QWORD *)(a1 + 664); if ( v19 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v19 + 736LL))(v19); if ( *(_QWORD *)(a1 + 648) ) SpriteAnimationManager::doCleanup(); v20 = *(_QWORD *)(a1 + 664); if ( v20 ) (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v20 + 528LL))(v20, 1); v21 = *(_QWORD *)(a1 + 672); if ( v21 ) (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 528LL))(v21, 1); *(_OWORD *)(a1 + 664) = 0; *(_OWORD *)(a1 + 648) = 0; v58 = (__int64 *)(a1 + 648); *(_DWORD *)(a1 + 680) = 0; v22 = ObjectManager::instance(); Definition = ObjectManager::getDefinition(v22, a2); if ( v66 ) { LABEL_46: __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)12; *(_DWORD *)((char *)&__dst[0].__r_.__value_.__l.0 + 1) = 1181053813; *(_WORD *)((char *)__dst[0].__r_.__value_.__r.__words + 5) = 17986; __dst[0].__r_.__value_.__s.__data_[6] = 0; v33 = cocos2d::CCDictionary::objectForKey(Definition, (char *)__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); strcpy((char *)__dst, "\nusePA"); v34 = cocos2d::CCDictionary::objectForKey(Definition, (char *)__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); if ( v33 ) { v35 = cocos2d::CCString::boolValue(v33); if ( v34 ) { LABEL_52: v36 = cocos2d::CCString::boolValue(v34); goto LABEL_55; } } else { v35 = 0; if ( v34 ) goto LABEL_52; } v36 = 0; LABEL_55: strcpy((char *)__dst, " defaultAnimation"); v37 = cocos2d::CCDictionary::objectForKey(Definition, (char *)__dst); CString = (const std::string::value_type *)cocos2d::CCString::getCString(v37); std::string::assign((std::string *)(a1 + 688), CString); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) { operator delete(__dst[0].__r_.__value_.__l.__data_); if ( !v35 ) { LABEL_57: if ( !v36 ) goto LABEL_64; goto LABEL_61; } } else if ( !v35 ) { goto LABEL_57; } sub_100278270((__int64)__dst, 0.0, 0.0, (__m128)0LL, (__m128)0LL); v39 = cocos2d::CCSprite::createWithTexture(v66, (__int64)__dst); *(_QWORD *)(a1 + 664) = v39; *(float *)&v65 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1) * 0.5; v40 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1); sub_100278250((float *)__dst, *(float *)&v65, 0.5 * *(float *)(v40 + 4)); (*(void (__fastcall **)(char *, std::string *))(*(_QWORD *)v39 + 184LL))(v39, __dst); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 664)); *(_QWORD *)(a1 + 656) = *(_QWORD *)(a1 + 664); if ( !v36 ) goto LABEL_64; LABEL_61: __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16; *(std::string::size_type *)((char *)__dst[0].__r_.__value_.__r.__words + 1) = 0x637365446D696E61LL; __dst[0].__r_.__value_.__s.__data_[8] = 0; v41 = cocos2d::CCDictionary::valueForKey(Definition, (__int64)__dst); v42 = cocos2d::CCString::getCString(v41); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); v43 = CCPartAnimSprite::createWithAnimDesc(v42, v66, (unsigned __int8)v64); *(_QWORD *)(a1 + 672) = v43; *(float *)&v66 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1) * 0.5; v44 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1); sub_100278250((float *)__dst, *(float *)&v66, 0.5 * *(float *)(v44 + 4)); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v43 + 184LL))(v43, __dst); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 672)); *(_QWORD *)(a1 + 656) = *(_QWORD *)(a1 + 672); LABEL_64: *(_DWORD *)(a1 + 680) = 0; v45 = strlen(a2); if ( v45 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_92; v46 = v45; if ( v45 >= 0x17 ) { v48 = 26; if ( (v45 | 7) != 0x17 ) v48 = (v45 | 7) + 1; v47 = (char *)operator new(v48); v61 = v47; v60[0] = v48 + 1; v60[1] = v46; } else { LOBYTE(v60[0]) = 2 * v45; v47 = (char *)v60 + 1; if ( !v45 ) { LABEL_72: v47[v46] = 0; v49 = SpriteAnimationManager::createWithOwner(a1, v60); *v58 = v49; if ( (v60[0] & 1) != 0 ) { operator delete(v61); v49 = *v58; } cocos2d::CCObject::retain(v49); v50 = *(_QWORD *)(a1 + 672); if ( v50 ) (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v50 + 344LL))(v50, 0); v51 = *(_QWORD *)(a1 + 664); if ( v51 ) (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v51 + 344LL))(v51, 0); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 344LL))(a1, 1); if ( (*(_BYTE *)(a1 + 688) & 1) != 0 ) v52 = *(const char **)(a1 + 704); else v52 = (const char *)(a1 + 689); v53 = *(_QWORD *)(a1 + 648); v54 = strlen(v52); if ( v54 < 0xFFFFFFFFFFFFFFF8LL ) { v55 = v54; if ( v54 >= 0x17 ) { v57 = 26; if ( (v54 | 7) != 0x17 ) v57 = (v54 | 7) + 1; v56 = (char *)operator new(v57); v63 = v56; v62[0] = v57 + 1; v62[1] = v55; } else { LOBYTE(v62[0]) = 2 * v54; v56 = (char *)v62 + 1; if ( !v54 ) { LABEL_89: v56[v55] = 0; SpriteAnimationManager::runAnimation(v53, v62); if ( (v62[0] & 1) != 0 ) operator delete(v63); return; } } memmove(v56, v52, v55); goto LABEL_89; } LABEL_92: sub_100003630(); } } memcpy(v47, a2, v46); goto LABEL_72; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)22; *(std::string::size_type *)((char *)__dst[0].__r_.__value_.__r.__words + 1) = 0x6853657469727073LL; LODWORD(__dst[0].__r_.__value_.__r.__words[1]) = 1952802152; __dst[0].__r_.__value_.__s.__data_[11] = 0; v24 = cocos2d::CCDictionary::objectForKey(Definition, (char *)__dst); v65 = Definition; v25 = __dst[0].__r_.__value_.__s.__data_; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); v26 = (const char *)cocos2d::CCString::getCString(v24); v27 = strlen(v26); if ( v27 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_92; v28 = v27; if ( v27 >= 0x17 ) { v30 = v26; v31 = 26; if ( (v27 | 7) != 0x17 ) v31 = (v27 | 7) + 1; v29 = (char *)operator new(v31); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v29; __dst[0].__r_.__value_.__r.__words[0] = v31 + 1; v26 = v30; v25 = __dst[0].__r_.__value_.__s.__data_; __dst[0].__r_.__value_.__l.__size_ = v28; } else { __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v27); v29 = __dst[0].__r_.__value_.__s.__data_; if ( !v27 ) goto LABEL_42; } memmove(v29, v26, v28); LABEL_42: v29[v28] = 0; std::string::append(__dst, ".png"); Definition = v65; v32 = cocos2d::CCTextureCache::sharedTextureCache(__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) v25 = __dst[0].__r_.__value_.__l.__data_; v66 = cocos2d::CCTextureCache::addImage(v32, v25, 0); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); goto LABEL_46; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source