//
// cocos2d::CCString::initWithFormatAndValist from 0x1800105e0 to 0x180010679 (153 bytes)
//
// 5 xrefs:
// > cocos2d::CCString::createWithFormat @ 0x18001051f
// > cocos2d::CCString::initWithFormat @ 0x1800105d6
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ae134
// > ??> @ 0x1801ae140
//
// 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
//
bool __fastcall cocos2d::CCString::initWithFormatAndValist(cocos2d::CCString *this, const char *a2, va_list a3)
{
char *v6; // rax
char *v7; // rbx
_QWORD *v8; // rax
size_t v9; // r8
v6 = (char *)malloc(0x19000u);
v7 = v6;
if ( v6 )
{
v8 = sub_180009520();
_stdio_common_vsprintf(*v8 | 2LL, v7, 0x19000u, a2, nullptr, a3);
v9 = -1;
do
++v9;
while ( v7[v9] );
sub_180010050((void **)&this->m_sString, v7, v9);
free(v7);
LOBYTE(v6) = 1;
}
return (char)v6;
}