//
// cocos2d::CCLabelAtlas::setString from 0x10087a3d0 to 0x10087a497 (199 bytes)
//
// 2 xrefs:
// > sub_10087A4A0 @ 0x10087a4ac
// > ??> @ 0x100ba2b80
//
// 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:36:54 +0000
//
__int64 __fastcall cocos2d::CCLabelAtlas::setString(_DWORD *a1, const char *a2)
{
__int64 v2; // rax
unsigned int v3; // r14d
__int64 result; // rax
float v5[8]; // [rsp+0h] [rbp-20h] BYREF
*(_QWORD *)v5 = v2;
v3 = strlen(a2);
if ( (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)a1 + 47) + 80LL))(*((_QWORD *)a1 + 47)) < v3 )
cocos2d::CCTextureAtlas::resizeCapacity(*((_QWORD *)a1 + 47), v3);
if ( (a1[104] & 1) != 0 )
{
**((_BYTE **)a1 + 54) = 0;
*((_QWORD *)a1 + 53) = 0;
}
else
{
*((_WORD *)a1 + 208) = 0;
}
std::string::assign((std::string *)(a1 + 104), a2);
(*(void (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 1056LL))(a1);
sub_100278260(v5, (float)(int)(v3 * a1[90]), (float)(int)a1[91]);
result = (*(__int64 (__fastcall **)(_DWORD *, float *))(*(_QWORD *)a1 + 320LL))(a1, v5);
a1[99] = v3;
return result;
}