//
// cocos2d::CCLabelBMFont::setString from 0x5cd3f4 to 0x5cd478 (132 bytes)
//
// 0 xrefs:
//
// 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)
{
int v2; // r2
int v4; // r7
unsigned __int16 *m_sInitialString; // r5
cocos2d::CCArray *m_pChildren; // r0
cocos2d::CCArray *v7; // r3
cocos2d::ccArray *data; // r2
cocos2d::CCObject **arr; // r6
cocos2d::CCObject **v10; // r5
int v11; // r0
int v12; // t1
v4 = v2;
if ( v2 )
{
m_sInitialString = a1->m_sInitialString;
a1->m_sInitialString = (unsigned __int16 *)sub_5CB84C((const unsigned __int16 *)a2);
}
else
{
m_sInitialString = a1->m_sString;
a1->m_sString = (unsigned __int16 *)sub_5CB84C((const unsigned __int16 *)a2);
}
if ( m_sInitialString )
operator delete[](m_sInitialString);
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
if ( cocos2d::CCArray::count(m_pChildren) )
{
v7 = a1->m_pChildren;
if ( v7 )
{
data = v7->data;
if ( data->num )
{
arr = data->arr;
v10 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v10 )
{
v12 = (int)*arr++;
v11 = v12;
if ( !v12 )
break;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v11 + 164))(v11, 0);
}
}
}
}
}
cocos2d::CCLabelBMFont::createFontChars(a1);
if ( v4 )
a1->updateLabel(a1);
}