//
// TextGameObject::customObjectSetup from 0x65652c to 0x656734 (520 bytes)
//
// 2 xrefs:
// > ??> @ 0x9ace0
// > ??> @ 0x11549d8
//
// 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
//
void TextGameObject::customObjectSetup(TextGameObject *a1, std::vector *a2, std::vector *a3)
{
void (__fastcall *updateTextKerning)(TextGameObject *__hidden, int); // x23
unsigned int v7; // w0
char *v8; // x0
void *v9; // x0
unsigned int *v10; // x1
int v11; // w2
unsigned int *v12; // x1
int v13; // w2
__int64 v14; // [xsp+58h] [xbp+58h] BYREF
_DWORD *v15; // [xsp+60h] [xbp+60h] BYREF
updateTextKerning = a1->updateTextKerning;
if ( !*((_QWORD *)a3->m_start + 488) )
{
updateTextKerning(a1, 0);
if ( *((_QWORD *)a3->m_start + 31) )
goto LABEL_3;
LABEL_8:
sub_D153B8((int)&v14, &byte_F288A0);
goto LABEL_4;
}
v7 = atoi((const char *)a2->m_start[488].m_data.m_data);
updateTextKerning(a1, v7);
if ( !*((_QWORD *)a3->m_start + 31) )
goto LABEL_8;
LABEL_3:
sub_D18D28(&v14, &a2->m_start[31]);
LABEL_4:
LevelTools::base64DecodeString((cocos2d::ZipUtils *)&v14, &v15);
TextGameObject::updateTextObject((__int64 *)a1, (const void **)&v15, 0);
v8 = (char *)(v15 - 6);
if ( v15 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = v15 - 2;
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *(v15 - 2);
*(v15 - 2) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v8);
}
v9 = (void *)(v14 - 24);
if ( (__int64 *)(v14 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v10 = (unsigned int *)(v14 - 8);
do
v11 = __ldaxr(v10);
while ( __stlxr(v11 - 1, v10) );
}
else
{
v11 = *(_DWORD *)(v14 - 8);
*(_DWORD *)(v14 - 8) = v11 - 1;
}
if ( v11 <= 0 )
operator delete(v9);
}
}