//
// SetupEndPopup::textChanged from 0x1405b2a10 to 0x1405b2bbb (427 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407f1bf8
// > ??> @ 0x1408df80c
// > ??> @ 0x1408df840
// > ??> @ 0x14092dbb4
//
// 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:34:42 +0000
//
void __fastcall SetupEndPopup::textChanged(__int64 a1, __int64 a2)
{
_BYTE *v3; // rax
size_t v4; // r8
const char *v5; // rcx
int v6; // eax
unsigned __int64 v7; // rdx
char *v8; // rcx
int v9; // ecx
__int64 v10; // rax
cocos2d::CCArray *v11; // rcx
unsigned int v12; // edi
struct cocos2d::CCObject *v13; // rax
int v14; // edx
char *String[2]; // [rsp+38h] [rbp-40h] BYREF
__int128 v16; // [rsp+48h] [rbp-30h]
if ( !*(_BYTE *)(a1 + 200) )
{
v3 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a2 + 592) + 600LL) + 8LL))(*(_QWORD *)(a2 + 592) + 600LL);
*(_OWORD *)String = 0;
v4 = -1;
v16 = 0;
do
++v4;
while ( v3[v4] );
sub_14003D230(String, v3, v4);
v5 = (const char *)String;
if ( *((_QWORD *)&v16 + 1) > 0xFu )
v5 = String[0];
v6 = atoi(v5);
v7 = *((_QWORD *)&v16 + 1);
*(_DWORD *)(a1 + 468) = v6;
if ( v7 > 0xF )
{
v8 = String[0];
if ( v7 + 1 >= 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);
}
v9 = 0;
if ( *(int *)(a1 + 468) >= 0 )
v9 = *(_DWORD *)(a1 + 468);
v10 = *(_QWORD *)(a1 + 136);
if ( v9 > 9999 )
v9 = 9999;
*(_DWORD *)(a1 + 468) = v9;
if ( v10 )
{
*(_DWORD *)(v10 + 1480) = v9;
}
else
{
v11 = *(cocos2d::CCArray **)(a1 + 144);
if ( v11 )
{
v12 = 0;
if ( cocos2d::CCArray::count(v11) )
{
do
{
v13 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 144), v12);
v14 = *(_DWORD *)(a1 + 468);
if ( v14 < 0 )
v14 = 0;
if ( v14 > 9999 )
v14 = 9999;
++v12;
*((_DWORD *)v13 + 370) = v14;
}
while ( v12 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 144)) );
}
}
}
SetupTriggerPopup::updateEditorLabel(a1 - 544);
}
}