//
// ShareCommentLayer::updateCharCountLabel from 0x14062fde0 to 0x14062ff19 (313 bytes)
//
// 2 xrefs:
// > ShareCommentLayer::updateDescText @ 0x14062fdb6
// > ??> @ 0x140930a58
//
// 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 11:35:28 +0000
//
__int64 __fastcall ShareCommentLayer::updateCharCountLabel(__int64 a1, __int64 a2, __int64 a3, double a4)
{
__int64 v5; // r8
unsigned __int64 v6; // rdx
int v7; // esi
unsigned __int64 v8; // r9
unsigned __int64 v9; // r8
__int64 v10; // rax
int v11; // ecx
int v12; // ebp
__int64 *v13; // rcx
__int64 v14; // rax
void *v15; // rdx
__int64 v16; // rdi
__int64 (__fastcall **v17)(__int64, const char *); // rbx
cocos2d::CCString *v18; // rax
const char *CString; // rax
if ( *(_BYTE *)(a1 + 700) )
{
ensureEmotesAreLoaded(a1, a2, a3, a4);
v7 = EmoteSprite::effectiveLength((_QWORD *)(a1 + 728), dword_1408FE3A4, v5, a4);
}
else
{
v8 = *(_QWORD *)(a1 + 744);
v7 = 0;
v6 = 0;
if ( v8 )
{
v9 = *(_QWORD *)(a1 + 752);
do
{
v10 = a1 + 728;
if ( v9 > 0xF )
v10 = *(_QWORD *)(a1 + 728);
v11 = v7 + 1;
if ( (*(_BYTE *)(v10 + v6) & 0xC0) == 0x80 )
v11 = v7;
++v6;
v7 = v11;
}
while ( v6 < v8 );
}
}
v12 = *(_DWORD *)(a1 + 688);
v13 = (__int64 *)(*(_QWORD *)(a1 + 792) + 368LL);
v14 = *v13;
if ( (float)((float)v12 * 0.69999999) <= (float)v7 )
{
LOBYTE(v6) = -1;
if ( (float)((float)v12 * 0.89999998) <= (float)v7 )
{
(*(void (__fastcall **)(__int64 *, unsigned __int64))(v14 + 40))(v13, v6);
v15 = &unk_1407046BC;
goto LABEL_15;
}
}
else
{
LOBYTE(v6) = 125;
}
(*(void (__fastcall **)(__int64 *, unsigned __int64))(v14 + 40))(v13, v6);
v15 = &unk_1407046B8;
LABEL_15:
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(a1 + 792) + 368LL))(*(_QWORD *)(a1 + 792) + 368LL, v15);
v16 = *(_QWORD *)(a1 + 792);
v17 = *(__int64 (__fastcall ***)(__int64, const char *))(v16 + 360);
v18 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)(v12 - v7));
CString = cocos2d::CCString::getCString(v18);
return (*v17)(v16 + 360, CString);
}