//
// sub_7D2BD6 from 0x7d2bd6 to 0x7d2c12 (60 bytes)
//
// 2 xrefs:
// > cocos2d::CCLabelBMFont::setString @ 0x7d3a9c
// > cocos2d::CCLabelBMFont::setString @ 0x7d3aaa
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:00:36 +0000
//
int __fastcall sub_7D2BD6(cocos2d *a1, const unsigned __int16 *a2)
{
int v3; // r4
unsigned int v4; // r0
int result; // r0
int i; // r3
if ( a1 )
v3 = cocos2d::cc_wcslen(a1, a2);
else
v3 = 0;
if ( (unsigned int)(v3 + 1) > 0x3F800000 )
v4 = -1;
else
v4 = 2 * (v3 + 1);
result = operator new[](v4);
for ( i = 0; i < v3; ++i )
*(_WORD *)(result + 2 * i) = *((_WORD *)a1 + i);
*(_WORD *)(result + 2 * v3) = 0;
return result;
}