//
// NewThreadPopup::updateCharCount from 0x1400f1000 to 0x1400f10c9 (201 bytes)
//
// 7 xrefs:
// > NewThreadPopup::init @ 0x1400efe5a
// > NewThreadPopup::init @ 0x1400f01cf
// > NewThreadPopup::textChanged @ 0x1400f1196
// > NewThreadPopup::textChanged @ 0x1400f128f
// > ??> @ 0x14089413c
// > ??> @ 0x14089414c
// > ??> @ 0x1409150c8
//
// 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:26:36 +0000
//
void __fastcall NewThreadPopup::updateCharCount(__int64 a1, __int64 a2, int a3, int a4)
{
void (__fastcall ***v6)(_QWORD, __int16 *); // rbx
__int64 v7; // rdi
__int64 v8; // rcx
__int64 v9; // rax
__int16 *v10; // rdx
__int64 v11; // rdx
void (__fastcall ***v12)(_QWORD, const char *); // rdi
void (__fastcall **v13)(_QWORD, const char *); // rbx
int v14; // esi
cocos2d::CCString *v15; // rax
const char *CString; // rax
if ( !a2 )
return;
v6 = (void (__fastcall ***)(_QWORD, __int16 *))(a2 + 368);
v7 = a2;
v8 = a2 + 368;
v9 = *(_QWORD *)(a2 + 368);
if ( (float)((float)a4 * 0.69999999) <= (float)a3 )
{
LOBYTE(a2) = -1;
if ( (float)((float)a4 * 0.89999998) <= (float)a3 )
{
(*(void (__fastcall **)(__int64, __int64))(v9 + 40))(v8, a2);
v10 = (__int16 *)&unk_140702E68;
goto LABEL_7;
}
}
else
{
LOBYTE(a2) = 100;
}
(*(void (__fastcall **)(__int64, __int64))(v9 + 40))(v8, a2);
v10 = &word_140702E70;
LABEL_7:
(**v6)(v6, v10);
v11 = 0;
v12 = (void (__fastcall ***)(_QWORD, const char *))(v7 + 360);
v13 = *v12;
v14 = a4 - a3;
if ( v14 >= 0 )
v11 = (unsigned int)v14;
v15 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v11);
CString = cocos2d::CCString::getCString(v15);
(*v13)(v12, CString);
}