//
// SetupTouchTogglePopup::textChanged from 0x1405facb0 to 0x1405fae6b (443 bytes)
//
// 4 xrefs:
// > ??> @ 0x140809b00
// > ??> @ 0x1408e3f10
// > ??> @ 0x1408e3f20
// > ??> @ 0x14092f6fc
//
// 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:09 +0000
//
void __fastcall SetupTouchTogglePopup::textChanged(__int64 a1, _QWORD *a2)
{
_BYTE *v4; // rax
size_t v5; // r8
const char *v6; // rcx
int v7; // eax
unsigned __int64 v8; // rdx
char *v9; // rcx
int v10; // ecx
__int64 v11; // rax
cocos2d::CCArray *v12; // rcx
unsigned int v13; // edi
struct cocos2d::CCObject *v14; // rax
int v15; // edx
char *String[2]; // [rsp+38h] [rbp-40h] BYREF
__int128 v17; // [rsp+48h] [rbp-30h]
if ( !*(_BYTE *)(a1 + 200) && (*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2) == 3 )
{
v4 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v5 = -1;
v17 = 0;
do
++v5;
while ( v4[v5] );
sub_14003D230(String, v4, v5);
v6 = (const char *)String;
if ( *((_QWORD *)&v17 + 1) > 0xFu )
v6 = String[0];
v7 = atoi(v6);
v8 = *((_QWORD *)&v17 + 1);
*(_DWORD *)(a1 + 464) = v7;
if ( v8 > 0xF )
{
v9 = String[0];
if ( v8 + 1 >= 0x1000 )
{
v9 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
v10 = 0;
if ( *(int *)(a1 + 464) >= 0 )
v10 = *(_DWORD *)(a1 + 464);
v11 = *(_QWORD *)(a1 + 136);
if ( v10 > 9999 )
v10 = 9999;
*(_DWORD *)(a1 + 464) = v10;
if ( v11 )
{
*(_DWORD *)(v11 + 1480) = v10;
}
else
{
v12 = *(cocos2d::CCArray **)(a1 + 144);
if ( v12 )
{
v13 = 0;
if ( cocos2d::CCArray::count(v12) )
{
do
{
v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 144), v13);
v15 = *(_DWORD *)(a1 + 464);
if ( v15 < 0 )
v15 = 0;
if ( v15 > 9999 )
v15 = 9999;
++v13;
*((_DWORD *)v14 + 370) = v15;
}
while ( v13 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 144)) );
}
}
}
SetupTriggerPopup::updateEditorLabel(a1 - 544);
}
}