//
// cocos2d::CCLabelBMFont::~CCLabelBMFont from 0x1800473f0 to 0x18004754e (350 bytes)
//
// 4 xrefs:
// > sub_180047670 @ 0x1800476ce
// > sub_180047670 @ 0x18004768c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b1854
//
// 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::CCLabelBMFont::~CCLabelBMFont(cocos2d::CCLabelBMFont *this)
{
cocos2d::CCSprite *m_pReusedChar; // rcx
unsigned __int16 *m_sString; // rcx
unsigned __int16 *m_sInitialString; // rcx
cocos2d::CCBMFontConfiguration *m_pConfiguration; // rcx
std::size_t m_capacity; // rdx
char *m_bigStorage; // rcx
std::size_t v8; // rdx
char *v9; // rcx
this->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCLabelBMFont_vtbl *)&cocos2d::CCLabelBMFont::`vftable'{for `cocos2d::CCNode'};
this->cocos2d::CCSpriteBatchNode::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&cocos2d::CCLabelBMFont::`vftable'{for `cocos2d::CCTextureProtocol'};
this->cocos2d::CCLabelProtocol::__vftable = (cocos2d::CCLabelProtocol_vtbl *)&cocos2d::CCLabelBMFont::`vftable'{for `cocos2d::CCLabelProtocol'};
this->cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&cocos2d::CCLabelBMFont::`vftable'{for `cocos2d::CCRGBAProtocol'};
m_pReusedChar = this->m_pReusedChar;
if ( m_pReusedChar )
cocos2d::CCObject::release(m_pReusedChar);
m_sString = this->m_sString;
if ( m_sString )
{
j_j_free_0(m_sString);
this->m_sString = nullptr;
}
m_sInitialString = this->m_sInitialString;
if ( m_sInitialString )
{
j_j_free_0(m_sInitialString);
this->m_sInitialString = nullptr;
}
m_pConfiguration = this->m_pConfiguration;
if ( m_pConfiguration )
cocos2d::CCObject::release(m_pConfiguration);
m_capacity = this->m_sInitialStringUTF8.m_data.m_capacity;
if ( m_capacity > 0xF )
{
m_bigStorage = this->m_sInitialStringUTF8.m_data.m_bigStorage;
if ( m_capacity + 1 >= 0x1000 )
{
if ( (unsigned __int64)&m_bigStorage[-*((_QWORD *)m_bigStorage - 1) - 8] > 0x1F )
goto LABEL_20;
m_bigStorage = *((char **)m_bigStorage - 1);
}
j_j_free_0(m_bigStorage);
}
this->m_sInitialStringUTF8.m_data.m_size = 0;
this->m_sInitialStringUTF8.m_data.m_capacity = 15;
this->m_sInitialStringUTF8.m_data.m_smallStorage._Elems[0] = 0;
v8 = this->m_sFntFile.m_data.m_capacity;
if ( v8 > 0xF )
{
v9 = this->m_sFntFile.m_data.m_bigStorage;
if ( v8 + 1 < 0x1000 )
{
LABEL_18:
j_j_free_0(v9);
goto LABEL_19;
}
if ( (unsigned __int64)&v9[-*((_QWORD *)v9 - 1) - 8] <= 0x1F )
{
v9 = *((char **)v9 - 1);
goto LABEL_18;
}
LABEL_20:
invalid_parameter_noinfo_noreturn();
}
LABEL_19:
this->m_sFntFile.m_data.m_size = 0;
this->m_sFntFile.m_data.m_capacity = 15;
this->m_sFntFile.m_data.m_smallStorage._Elems[0] = 0;
cocos2d::CCSpriteBatchNode::~CCSpriteBatchNode(this);
}