//
// cocos2d::CCLabelBMFont::setString from 0xae759c to 0xae7678 (220 bytes)
//
// 4 xrefs:
// > cocos2d::CCLabelBMFont::createFontChars @ 0xae659c
// > ??> @ 0xb97d8
// > ??> @ 0x1137c10
// > ??> @ 0x1202e40
//
// 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 cocos2d::CCLabelBMFont::setString(cocos2d::CCLabelBMFont *a1, const char *a2)
{
unsigned __int8 v2; // w2
int v3; // w22
unsigned __int16 *m_sInitialString; // x19
cocos2d::CCArray *m_pChildren; // x0
cocos2d::CCArray *v7; // x0
cocos2d::ccArray *data; // x1
cocos2d::CCObject **arr; // x19
cocos2d::CCObject **v10; // x21
cocos2d::CCObject *v11; // x0
v3 = v2;
if ( v2 )
{
m_sInitialString = a1->m_sInitialString;
a1->m_sInitialString = (unsigned __int16 *)sub_AE27CC((const unsigned __int16 *)a2);
if ( !m_sInitialString )
goto LABEL_4;
goto LABEL_3;
}
m_sInitialString = a1->m_sString;
a1->m_sString = (unsigned __int16 *)sub_AE27CC((const unsigned __int16 *)a2);
if ( m_sInitialString )
LABEL_3:
operator delete[](m_sInitialString);
LABEL_4:
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
if ( (unsigned int)cocos2d::CCArray::count(m_pChildren) )
{
v7 = a1->m_pChildren;
if ( v7 )
{
data = v7->data;
if ( data->num )
{
arr = data->arr;
v10 = &arr[data->num - 1];
while ( v10 >= arr )
{
v11 = *arr;
if ( !*arr )
break;
++arr;
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v11->__vftable[4].~CCObject)(v11, 0);
}
}
}
}
}
cocos2d::CCLabelBMFont::createFontChars(a1);
if ( v3 )
a1->updateLabel(a1);
}