//
// SpriteDescription::initDescription from 0x3c4718 to 0x3c495e (582 bytes)
//
// 1 xrefs:
// > SpriteDescription::createDescription @ 0x3c4998
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:46:33 +0000
//
int __fastcall SpriteDescription::initDescription(SpriteDescription *this, cocos2d::CCDictionary *a2)
{
char *v4; // r9
cocos2d::CCString *v5; // r0
const char *CString; // r0
cocos2d::CCString *v7; // r0
const char *v8; // r0
cocos2d::CCString *v9; // r0
const char *v10; // r0
cocos2d::CCString *v11; // r0
cocos2d::CCString *v12; // r0
cocos2d::CCString *v13; // r0
cocos2d::CCString *v14; // r0
cocos2d::CCString *v15; // r0
const char *v16; // r7
size_t v17; // r0
cocos2d::CCSpriteFrameCache *v18; // r0
cocos2d::CCSpriteFrameCache *v19; // r0
char *v20; // r1
cocos2d::CCObject *v21; // r0
int v22; // r5
_BYTE v24[8]; // [sp+4h] [bp-28h] BYREF
int v25; // [sp+Ch] [bp-20h] BYREF
size_t v26; // [sp+10h] [bp-1Ch]
char *v27; // [sp+14h] [bp-18h]
int v28; // [sp+18h] [bp-14h] BYREF
size_t v29; // [sp+1Ch] [bp-10h]
char *v30; // [sp+20h] [bp-Ch]
v4 = (char *)this + 52;
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "position", 8u);
v5 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
CString = (const char *)cocos2d::CCString::getCString(v5);
cocos2d::CCPointFromString((cocos2d *)v24, CString);
cocos2d::CCPoint::operator=(v4, v24);
std::string::~string((int)&v28);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "flipped", 7u);
v7 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
v8 = (const char *)cocos2d::CCString::getCString(v7);
cocos2d::CCPointFromString((cocos2d *)v24, v8);
cocos2d::CCPoint::operator=((char *)this + 68, v24);
std::string::~string((int)&v28);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "scale", 5u);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
v10 = (const char *)cocos2d::CCString::getCString(v9);
cocos2d::CCPointFromString((cocos2d *)v24, v10);
cocos2d::CCPoint::operator=((char *)this + 60, v24);
std::string::~string((int)&v28);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "rotation", 8u);
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
*((_DWORD *)this + 19) = cocos2d::CCString::floatValue(v11);
std::string::~string((int)&v28);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "zValue", 6u);
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
*((_DWORD *)this + 20) = cocos2d::CCString::intValue(v12);
std::string::~string((int)&v28);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "tag", 3u);
v13 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
*((_DWORD *)this + 21) = cocos2d::CCString::intValue(v13);
std::string::~string((int)&v28);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "usesCustomTag", 0xDu);
v14 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
*((_BYTE *)this + 88) = cocos2d::CCString::boolValue(v14);
std::string::~string((int)&v28);
if ( *((_BYTE *)this + 88) )
{
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "texture", 7u);
v15 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(a2, &v28);
v16 = (const char *)cocos2d::CCString::getCString(v15);
v25 = 0;
v26 = 0;
v27 = nullptr;
v17 = strlen(v16);
std::string::__init(&v25, v16, v17);
v18 = (cocos2d::CCSpriteFrameCache *)std::string::~string((int)&v28);
v19 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v18);
if ( (v25 & 1) != 0 )
v20 = v27;
else
v20 = (char *)&v25 + 1;
v21 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v20);
*((_DWORD *)this + 23) = v21;
cocos2d::CCObject::retain(v21);
v28 = 0;
v29 = 0;
v30 = nullptr;
v22 = *((_DWORD *)this + 23);
if ( (v25 & 1) != 0 )
{
std::string::__init(&v28, v27, v26);
}
else
{
v28 = v25;
v29 = v26;
v30 = v27;
}
std::string::operator=((unsigned __int8 *)(v22 + 136), (unsigned __int8 *)&v28);
std::string::~string((int)&v28);
std::string::~string((int)&v25);
}
return 1;
}