//
// sub_5CB84C from 0x5cb84c to 0x5cb888 (60 bytes)
//
// 2 xrefs:
// > cocos2d::CCLabelBMFont::setString @ 0x5cd404
// > cocos2d::CCLabelBMFont::setString @ 0x5cd412
//
// 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
//
int __fastcall sub_5CB84C(const unsigned __int16 *a1)
{
int v2; // r4
unsigned int v3; // r0
int result; // r0
int i; // r3
if ( a1 )
v2 = cocos2d::cc_wcslen(a1);
else
v2 = 0;
if ( (unsigned int)(v2 + 1) > 0x3F800000 )
v3 = -1;
else
v3 = 2 * (v2 + 1);
result = operator new[](v3);
for ( i = 0; i < v2; ++i )
*(_WORD *)(result + 2 * i) = a1[i];
*(_WORD *)(result + 2 * v2) = 0;
return result;
}