//
// LevelSettingsLayer::textChanged from 0x14045a820 to 0x14045aa14 (500 bytes)
//
// 2 xrefs:
// > ??> @ 0x140798008
// > ??> @ 0x140927c44
//
// 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:32:31 +0000
//
void __fastcall LevelSettingsLayer::textChanged(__int64 a1, _QWORD *a2)
{
_BYTE *v4; // rax
size_t v5; // r8
const char *v6; // rcx
int v7; // ebx
char *v8; // r8
_BYTE *v9; // rax
size_t v10; // r8
const char *v11; // rcx
int v12; // ebx
char *v13; // r8
char *String[2]; // [rsp+38h] [rbp-30h] BYREF
__int128 v15; // [rsp+48h] [rbp-20h]
if ( !*(_BYTE *)(a1 + 352) )
{
if ( (*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2) == 1 )
{
v4 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v5 = -1;
v15 = 0;
do
++v5;
while ( v4[v5] );
sub_14003D230(String, v4, v5);
v6 = (const char *)String;
if ( *((_QWORD *)&v15 + 1) > 0xFu )
v6 = String[0];
v7 = atoi(v6);
if ( *((_QWORD *)&v15 + 1) > 0xFu )
{
v8 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v15 + 1) + 1LL) >= 0x1000 )
{
v8 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
*(_DWORD *)(*(_QWORD *)(a1 + 272) + 372LL) = v7;
}
else if ( (*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2) == 2 )
{
v9 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v10 = -1;
v15 = 0;
do
++v10;
while ( v9[v10] );
sub_14003D230(String, v9, v10);
v11 = (const char *)String;
if ( *((_QWORD *)&v15 + 1) > 0xFu )
v11 = String[0];
v12 = atoi(v11);
if ( *((_QWORD *)&v15 + 1) > 0xFu )
{
v13 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v15 + 1) + 1LL) >= 0x1000 )
{
v13 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
*(_DWORD *)(*(_QWORD *)(a1 + 272) + 376LL) = v12;
}
}
}