//
// cocos2d::CCLabelTTF::setFontName from 0xd5b018 to 0xd5b114 (252 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCEditBoxImplAndroid::setFont @ 0xd1c2d4
// > cocos2d::extension::CCEditBoxImplAndroid::setFont @ 0xd1c2f0
// > cocos2d::extension::CCEditBoxImplAndroid::setPlaceholderFont @ 0xd1c33c
// > ??> @ 0x75940
//
// This function is hookable on this platform (idp: arm, 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 13:07:46 +0000
//
__int64 __fastcall cocos2d::CCLabelTTF::setFontName(cocos2d::CCLabelTTF *this, char *a2)
{
size_t v4; // x0
void *v5; // x20
size_t v6; // x23
int v7; // w24
size_t v8; // x19
__int64 result; // x0
size_t v10; // x2
__int64 *v11; // x19
size_t v12; // x0
__int64 v13; // x1
v4 = strlen(a2);
v5 = *((void **)this + 78);
v6 = v4;
v7 = *(_BYTE *)v5 & 1;
if ( (*(_BYTE *)v5 & 1) != 0 )
{
v8 = *((_QWORD *)v5 + 1);
result = *((_QWORD *)v5 + 2);
}
else
{
v8 = *(_BYTE *)v5 >> 1;
result = (__int64)v5 + 1;
}
if ( v8 > v6 )
v10 = v6;
else
v10 = v8;
if ( v10 )
{
result = memcmp((const void *)result, a2, v10);
if ( (_DWORD)result )
{
if ( !v7 )
goto LABEL_9;
LABEL_15:
operator delete(*((void **)v5 + 2));
goto LABEL_9;
}
}
if ( v6 == v8 )
return result;
if ( v7 )
goto LABEL_15;
LABEL_9:
operator delete(v5);
v11 = (__int64 *)operator new(0x18u);
*v11 = 0;
v11[1] = 0;
v11[2] = 0;
v12 = strlen(a2);
std::string::__init(v11, a2, v12);
*((_QWORD *)this + 78) = v11;
result = *((unsigned __int8 *)this + 640);
v13 = (unsigned __int8)result >> 1;
if ( (result & 1) != 0 )
v13 = *((_QWORD *)this + 81);
if ( v13 )
return cocos2d::CCLabelTTF::updateTexture(this);
return result;
}