//
// CustomizeObjectLayer::updateKerningLabel from 0x140141d80 to 0x140141f46 (454 bytes)
//
// 3 xrefs:
// > CustomizeObjectLayer::init @ 0x1401411b0
// > CustomizeObjectLayer::sliderChanged @ 0x140141f98
// > ??> @ 0x14091730c
//
// 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:27:10 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall CustomizeObjectLayer::updateKerningLabel(__int64 a1)
{
unsigned int v2; // eax
void **v3; // rax
void *v4; // rdx
void **v5; // rdx
__int64 v6; // rcx
__int64 v7; // rcx
_BYTE *v8; // rax
size_t v9; // r8
void *v10; // rcx
void *Block[2]; // [rsp+38h] [rbp-50h] BYREF
__m128i si128; // [rsp+48h] [rbp-40h]
__int128 v13; // [rsp+58h] [rbp-30h] BYREF
__int64 v14; // [rsp+68h] [rbp-20h]
__int64 v15; // [rsp+70h] [rbp-18h]
if ( *(_QWORD *)(a1 + 840) )
{
Block[1] = (void *)32;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365A0);
Block[0] = (void *)0x3A676E696E72654BLL;
v2 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 1608LL))(*(_QWORD *)(a1 + 688));
v3 = (void **)GameToolbox::intToString(&v13, v2);
v4 = v3;
if ( (unsigned __int64)v3[3] > 0xF )
v4 = *v3;
sub_140044D80(Block, v4, (size_t)v3[2]);
sub_14003D310((__int64)&v13);
*(_DWORD *)(*(_QWORD *)(a1 + 840) + 528LL) = *(_DWORD *)(a1 + 832);
v5 = Block;
if ( si128.m128i_i64[1] > 0xFuLL )
v5 = (void **)Block[0];
(**(void (__fastcall ***)(__int64, void **))(*(_QWORD *)(a1 + 840) + 360LL))(*(_QWORD *)(a1 + 840) + 360LL, v5);
v6 = *(_QWORD *)(a1 + 824);
if ( v6 )
{
*(_DWORD *)(v6 + 724) = *(_DWORD *)(a1 + 832);
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 824) + 592LL) + 600LL;
v8 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 8LL))(v7);
v13 = 0;
v14 = 0;
v15 = 0;
v9 = -1;
do
++v9;
while ( v8[v9] );
sub_14003D230(&v13, v8, v9);
CCTextInputNode::setString(*(_QWORD **)(a1 + 824), &v13);
}
if ( si128.m128i_i64[1] > 0xFuLL )
{
v10 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v10 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v10);
}
}
}