// // SpriteDescription::initDescription from 0x572c10 to 0x5732b8 (1704 bytes) // // 2 xrefs: // > SpriteDescription::createDescription @ 0x573320 // > @ 0x9e9b8 // // 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 // bool SpriteDescription::initDescription(SpriteDescription *a1, DS_Dictionary *a2) { cocos2d::CCString *v4; // x0 const char *CString; // x0 char *v6; // x0 cocos2d::CCString *v7; // x0 const char *v8; // x0 char *v9; // x0 cocos2d::CCString *v10; // x0 const char *v11; // x0 char *v12; // x0 cocos2d::CCString *v13; // x0 float v14; // s0 stl::StringData::Internal *m_data; // x1 char *v16; // x0 cocos2d::CCString *v17; // x0 char *v18; // x0 cocos2d::CCString *v19; // x0 char *v20; // x0 cocos2d::CCString *v21; // x0 int m_usesCustomTag; // w0 char *v23; // x2 cocos2d::CCString *v25; // x0 char *v26; // x0 char *v27; // x0 cocos2d::CCSpriteFrameCache *v28; // x0 cocos2d::CCSpriteFrame *v29; // x0 cocos2d::CCSpriteFrame *m_texture; // x21 char *v31; // x0 char *v32; // x0 unsigned int *v33; // x1 int v34; // w2 unsigned int *v35; // x1 int v36; // w0 unsigned int *v37; // x1 int v38; // w2 unsigned int *v39; // x1 int v40; // w2 unsigned int *v41; // x1 int v42; // w2 unsigned int *v43; // x1 int v44; // w2 unsigned int *v45; // x1 int v46; // w2 unsigned int *v47; // x1 int v48; // w2 unsigned int *v49; // x1 int v50; // w2 unsigned int *v51; // x1 int v52; // w2 char *v53; // [xsp+68h] [xbp+68h] BYREF std::string v54; // [xsp+70h] [xbp+70h] BYREF cocos2d::CCPoint v55; // 0:kr00_8.8 cocos2d::CCPoint v56; // 0:kr08_8.8 cocos2d::CCPoint v57; // 0:kr10_8.8 sub_D153B8((int)&v53, "position"); v4 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, (const std::string *)&v53); CString = cocos2d::CCString::getCString(v4); v55 = cocos2d::CCPointFromString(CString); cocos2d::CCPoint::operator=(&a1->m_position, v55.x, v55.y); v6 = v53 - 24; if ( v53 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v45 = (unsigned int *)(v53 - 8); do v46 = __ldaxr(v45); while ( __stlxr(v46 - 1, v45) ); } else { v46 = *((_DWORD *)v53 - 2); *((_DWORD *)v53 - 2) = v46 - 1; } if ( v46 <= 0 ) operator delete(v6); } sub_D153B8((int)&v53, "flipped"); v7 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, (const std::string *)&v53); v8 = cocos2d::CCString::getCString(v7); v56 = cocos2d::CCPointFromString(v8); cocos2d::CCPoint::operator=(&a1->m_flipped, v56.x, v56.y); v9 = v53 - 24; if ( v53 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v41 = (unsigned int *)(v53 - 8); do v42 = __ldaxr(v41); while ( __stlxr(v42 - 1, v41) ); } else { v42 = *((_DWORD *)v53 - 2); *((_DWORD *)v53 - 2) = v42 - 1; } if ( v42 <= 0 ) operator delete(v9); } sub_D153B8((int)&v53, "scale"); v10 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, (const std::string *)&v53); v11 = cocos2d::CCString::getCString(v10); v57 = cocos2d::CCPointFromString(v11); cocos2d::CCPoint::operator=(&a1->m_scale, v57.x, v57.y); v12 = v53 - 24; if ( v53 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v43 = (unsigned int *)(v53 - 8); do v44 = __ldaxr(v43); while ( __stlxr(v44 - 1, v43) ); } else { v44 = *((_DWORD *)v53 - 2); *((_DWORD *)v53 - 2) = v44 - 1; } if ( v44 <= 0 ) operator delete(v12); } sub_D153B8((int)&v54, "rotation"); v13 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, &v54); v14 = cocos2d::CCString::floatValue(v13); m_data = v54.m_data.m_data; a1->m_rotation = v14; v16 = (char *)m_data - 24; if ( (__int64 *)((char *)m_data - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v47 = (unsigned int *)((char *)m_data - 8); do v48 = __ldaxr(v47); while ( __stlxr(v48 - 1, v47) ); } else { v48 = *((_DWORD *)m_data - 2); *((_DWORD *)m_data - 2) = v48 - 1; } if ( v48 <= 0 ) operator delete(v16); } sub_D153B8((int)&v54, "zValue"); v17 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, &v54); a1->m_zValue = cocos2d::CCString::intValue(v17); v18 = (char *)v54.m_data.m_data - 24; if ( (__int64 *)v54.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v37 = (unsigned int *)((char *)v54.m_data.m_data - 8); do v38 = __ldaxr(v37); while ( __stlxr(v38 - 1, v37) ); } else { v38 = *((_DWORD *)v54.m_data.m_data - 2); *((_DWORD *)v54.m_data.m_data - 2) = v38 - 1; } if ( v38 <= 0 ) operator delete(v18); } sub_D153B8((int)&v54, "tag"); v19 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, &v54); a1->m_tag = cocos2d::CCString::intValue(v19); v20 = (char *)v54.m_data.m_data - 24; if ( (__int64 *)v54.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v39 = (unsigned int *)((char *)v54.m_data.m_data - 8); do v40 = __ldaxr(v39); while ( __stlxr(v40 - 1, v39) ); } else { v40 = *((_DWORD *)v54.m_data.m_data - 2); *((_DWORD *)v54.m_data.m_data - 2) = v40 - 1; } if ( v40 <= 0 ) operator delete(v20); } sub_D153B8((int)&v54, "usesCustomTag"); v21 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, &v54); LOBYTE(m_usesCustomTag) = cocos2d::CCString::boolValue(v21); a1->m_usesCustomTag = m_usesCustomTag; m_usesCustomTag = (unsigned __int8)m_usesCustomTag; v23 = (char *)v54.m_data.m_data - 24; if ( (__int64 *)v54.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v35 = (unsigned int *)((char *)v54.m_data.m_data - 8); do v36 = __ldaxr(v35); while ( __stlxr(v36 - 1, v35) ); } else { v36 = *((_DWORD *)v54.m_data.m_data - 2); *((_DWORD *)v54.m_data.m_data - 2) = v36 - 1; } if ( v36 <= 0 ) operator delete(v23); m_usesCustomTag = a1->m_usesCustomTag; } if ( m_usesCustomTag ) { sub_D153B8((int)&v54, "texture"); v25 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((cocos2d::CCDictionary *)a2, &v54); v26 = (char *)cocos2d::CCString::getCString(v25); sub_D153B8((int)&v53, v26); v27 = (char *)v54.m_data.m_data - 24; if ( (__int64 *)v54.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v49 = (unsigned int *)((char *)v54.m_data.m_data - 8); do v50 = __ldaxr(v49); while ( __stlxr(v50 - 1, v49) ); } else { v50 = *((_DWORD *)v54.m_data.m_data - 2); *((_DWORD *)v54.m_data.m_data - 2) = v50 - 1; } if ( v50 <= 0 ) operator delete(v27); } v28 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v29 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v28, v53); a1->m_texture = v29; cocos2d::CCObject::retain(v29); m_texture = a1->m_texture; sub_D18D28(&v54, &v53); sub_D18EA8(&m_texture->m_strFrameName, &v54); v31 = (char *)v54.m_data.m_data - 24; if ( (__int64 *)v54.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v51 = (unsigned int *)((char *)v54.m_data.m_data - 8); do v52 = __ldaxr(v51); while ( __stlxr(v52 - 1, v51) ); } else { v52 = *((_DWORD *)v54.m_data.m_data - 2); *((_DWORD *)v54.m_data.m_data - 2) = v52 - 1; } if ( v52 <= 0 ) operator delete(v31); } v32 = v53 - 24; if ( v53 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v33 = (unsigned int *)(v53 - 8); do v34 = __ldaxr(v33); while ( __stlxr(v34 - 1, v33) ); } else { v34 = *((_DWORD *)v53 - 2); *((_DWORD *)v53 - 2) = v34 - 1; } if ( v34 <= 0 ) operator delete(v32); } } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source