//
// cocos2d::CCLabelBMFont::setString from 0x1002fbe78 to 0x1002fbf54 (220 bytes)
//
// 2 xrefs:
// > ??> @ 0x10076ce70
// > ??> @ 0x1007e9f28
//
// 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::setString(cocos2d::CCLabelBMFont *a1, unsigned __int16 *a2, bool a3)
{
_BOOL4 v3; // w20
unsigned __int16 *m_sInitialString; // x21
cocos2d::CCArray *m_pChildren; // x0
cocos2d::CCArray *v7; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCObject **arr; // x21
unsigned __int64 v11; // x22
v3 = a3;
if ( a3 )
{
m_sInitialString = a1->m_sInitialString;
a1->m_sInitialString = (unsigned __int16 *)sub_1002FBF54(a2);
if ( !m_sInitialString )
goto LABEL_6;
goto LABEL_5;
}
m_sInitialString = a1->m_sString;
a1->m_sString = (unsigned __int16 *)sub_1002FBF54(a2);
if ( m_sInitialString )
LABEL_5:
operator delete[](m_sInitialString);
LABEL_6:
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
if ( (unsigned int)sub_10024A36C((__int64)m_pChildren) )
{
v7 = a1->m_pChildren;
if ( v7 )
{
data = v7->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v11 = (unsigned __int64)&arr[num - 1];
do
{
if ( !*arr )
break;
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))(*arr)->__vftable[4].~CCObject)(*arr, 0);
++arr;
}
while ( (unsigned __int64)arr <= v11 );
}
}
}
}
cocos2d::CCLabelBMFont::createFontChars(a1);
if ( v3 )
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->updateLabel)(a1);
}