//
// cocos2d::CCSpriteFrame::~CCSpriteFrame from 0x18008f6d0 to 0x18008f7c0 (240 bytes)
//
// 4 xrefs:
// > sub_18008F7C0 @ 0x18008f81e
// > sub_18008F7C0 @ 0x18008f7dc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b61e0
//
// 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 cocos2d::CCSpriteFrame::~CCSpriteFrame(cocos2d::CCSpriteFrame *this)
{
cocos2d::CCTexture2D *m_pobTexture; // rcx
std::size_t m_capacity; // rdx
char *m_bigStorage; // rcx
std::size_t v5; // rdx
char *v6; // rcx
this->__vftable = (cocos2d::CCSpriteFrame_vtbl *)&cocos2d::CCSpriteFrame::`vftable';
m_pobTexture = this->m_pobTexture;
if ( m_pobTexture )
cocos2d::CCObject::release(m_pobTexture);
m_capacity = this->m_strFrameName.m_data.m_capacity;
if ( m_capacity > 0xF )
{
m_bigStorage = this->m_strFrameName.m_data.m_bigStorage;
if ( m_capacity + 1 >= 0x1000 )
{
if ( (unsigned __int64)&m_bigStorage[-*((_QWORD *)m_bigStorage - 1) - 8] > 0x1F )
goto LABEL_14;
m_bigStorage = *((char **)m_bigStorage - 1);
}
j_j_free_0(m_bigStorage);
}
this->m_strFrameName.m_data.m_size = 0;
this->m_strFrameName.m_data.m_capacity = 15;
this->m_strFrameName.m_data.m_smallStorage._Elems[0] = 0;
v5 = this->m_strTextureFilename.m_data.m_capacity;
if ( v5 > 0xF )
{
v6 = this->m_strTextureFilename.m_data.m_bigStorage;
if ( v5 + 1 < 0x1000 )
{
LABEL_12:
j_j_free_0(v6);
goto LABEL_13;
}
if ( (unsigned __int64)&v6[-*((_QWORD *)v6 - 1) - 8] <= 0x1F )
{
v6 = *((char **)v6 - 1);
goto LABEL_12;
}
LABEL_14:
invalid_parameter_noinfo_noreturn();
}
LABEL_13:
this->m_strTextureFilename.m_data.m_size = 0;
this->m_strTextureFilename.m_data.m_capacity = 15;
this->m_strTextureFilename.m_data.m_smallStorage._Elems[0] = 0;
cocos2d::CCObject::~CCObject(this);
}