//
// sub_1006494B0 from 0x1006494b0 to 0x1006495f7 (327 bytes)
//
// 8 xrefs:
// > CustomSFXWidget::updateSFXInfo @ 0x1006b796c
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc4bb
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc4d6
// > CustomSongWidget::updateMultiAssetInfo @ 0x1006fc50b
// > sub_10097DE50 @ 0x10097e037
// > sub_10097E2F0 @ 0x10097ef6f
// > sub_100980BC0 @ 0x100980cb8
// > sub_100982F10 @ 0x100983017
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:34:46 +0000
//
_QWORD *__fastcall sub_1006494B0(_QWORD *a1)
{
char v1; // al
__int64 v2; // rax
const char *CString; // r15
size_t v4; // rax
size_t v5; // r14
void *v6; // r12
size_t v7; // r13
v2 = sub_10088E820("%0.1f %s", v1);
CString = (const char *)cocos2d::CCString::getCString(v2);
v4 = strlen(CString);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v5 = v4;
if ( v4 >= 0x17 )
{
v7 = 26;
if ( (v4 | 7) != 0x17 )
v7 = (v4 | 7) + 1;
v6 = operator new(v7);
a1[2] = v6;
*a1 = v7 + 1;
a1[1] = v5;
}
else
{
*(_BYTE *)a1 = 2 * v4;
v6 = (char *)a1 + 1;
if ( !v4 )
goto LABEL_9;
}
memmove(v6, CString, v5);
LABEL_9:
*((_BYTE *)v6 + v5) = 0;
return a1;
}