//
// sub_1007AAA60 from 0x1007aaa60 to 0x1007aaafe (158 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
//
unsigned __int64 __fastcall sub_1007AAA60(_QWORD *a1, const char *a2, double a3)
{
size_t v3; // rax
size_t v4; // r15
unsigned __int64 result; // rax
void *v6; // rbx
size_t v7; // r12
void *v8; // rax
cocos2d::CCObject::CCObject((__int64)a1);
*a1 = off_100991BE0;
v3 = strlen(a2);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a3);
v4 = v3;
if ( v3 >= 0x17 )
{
v7 = 26;
if ( (v3 | 7) != 0x17 )
v7 = (v3 | 7) + 1;
v8 = operator new(v7);
a1[9] = v8;
a1[7] = v7 | 1;
a1[8] = v4;
v6 = v8;
}
else
{
result = (unsigned int)(2 * v3);
*((_BYTE *)a1 + 56) = 2 * v4;
v6 = (char *)a1 + 57;
if ( !v4 )
goto LABEL_9;
}
result = (unsigned __int64)memmove(v6, a2, v4);
LABEL_9:
*((_BYTE *)v6 + v4) = 0;
return result;
}