//
// SetupRandTriggerPopup::textChanged from 0x1405d5c20 to 0x1405d6054 (1076 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407fbac8
// > ??> @ 0x1408e14e0
// > ??> @ 0x1408e1514
// > ??> @ 0x14092ea0c
//
// 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:57 +0000
//
void __fastcall SetupRandTriggerPopup::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; // esi
struct cocos2d::CCObject *v14; // rax
int v15; // ecx
_BYTE *v16; // rax
size_t v17; // r8
const char *v18; // rcx
int v19; // eax
unsigned __int64 v20; // rdx
char *v21; // rcx
int v22; // ecx
__int64 v23; // rax
cocos2d::CCArray *v24; // rcx
unsigned int v25; // esi
struct cocos2d::CCObject *v26; // rax
int v27; // edx
_BYTE *v28; // rax
size_t v29; // r8
const char *v30; // rcx
float v31; // xmm6_4
char *v32; // rcx
cocos2d::CCString *v33; // rax
char *String[2]; // [rsp+38h] [rbp-38h] BYREF
__int128 v35; // [rsp+48h] [rbp-28h]
if ( !*(_BYTE *)(a1 + 200) )
{
if ( (*(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;
v35 = 0;
do
++v5;
while ( v4[v5] );
sub_14003D230(String, v4, v5);
v6 = (const char *)String;
if ( *((_QWORD *)&v35 + 1) > 0xFu )
v6 = String[0];
v7 = atoi(v6);
v8 = *((_QWORD *)&v35 + 1);
*(_DWORD *)(a1 + 496) = 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 + 496) >= 0 )
v10 = *(_DWORD *)(a1 + 496);
v11 = *(_QWORD *)(a1 + 136);
if ( v10 > 9999 )
v10 = 9999;
*(_DWORD *)(a1 + 496) = v10;
if ( v11 )
{
*(_DWORD *)(v11 + 1480) = v10;
SetupTriggerPopup::updateEditorLabel(a1 - 544);
return;
}
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 + 496);
if ( v15 < 0 )
v15 = 0;
if ( v15 > 9999 )
v15 = 9999;
++v13;
*((_DWORD *)v14 + 370) = v15;
}
while ( v13 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 144)) );
}
}
goto LABEL_25;
}
if ( (*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2) == 5 )
{
v16 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v17 = -1;
v35 = 0;
do
++v17;
while ( v16[v17] );
sub_14003D230(String, v16, v17);
v18 = (const char *)String;
if ( *((_QWORD *)&v35 + 1) > 0xFu )
v18 = String[0];
v19 = atoi(v18);
v20 = *((_QWORD *)&v35 + 1);
*(_DWORD *)(a1 + 500) = v19;
if ( v20 > 0xF )
{
v21 = String[0];
if ( v20 + 1 >= 0x1000 )
{
v21 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v21 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v21);
}
v22 = 0;
if ( *(int *)(a1 + 500) >= 0 )
v22 = *(_DWORD *)(a1 + 500);
v23 = *(_QWORD *)(a1 + 136);
if ( v22 > 9999 )
v22 = 9999;
*(_DWORD *)(a1 + 500) = v22;
if ( !v23 )
{
v24 = *(cocos2d::CCArray **)(a1 + 144);
if ( v24 )
{
v25 = 0;
if ( cocos2d::CCArray::count(v24) )
{
do
{
v26 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 144), v25);
v27 = *(_DWORD *)(a1 + 500);
if ( v27 < 0 )
v27 = 0;
if ( v27 > 9999 )
v27 = 9999;
++v25;
*((_DWORD *)v26 + 371) = v27;
}
while ( v25 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 144)) );
}
}
LABEL_25:
SetupTriggerPopup::updateEditorLabel(a1 - 544);
return;
}
*(_DWORD *)(v23 + 1484) = v22;
SetupTriggerPopup::updateEditorLabel(a1 - 544);
}
else if ( (*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2) == 4 )
{
v28 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v29 = -1;
v35 = 0;
do
++v29;
while ( v28[v29] );
sub_14003D230(String, v28, v29);
v30 = (const char *)String;
if ( *((_QWORD *)&v35 + 1) > 0xFu )
v30 = String[0];
v31 = atof(v30);
if ( *((_QWORD *)&v35 + 1) > 0xFu )
{
v32 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v35 + 1) + 1LL) >= 0x1000 )
{
v32 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v32 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v32);
}
v33 = cocos2d::CCString::createWithFormat("%.04f", v31);
*(float *)(a1 + 472) = cocos2d::CCString::floatValue(v33);
SetupCameraOffsetTrigger::updateDuration(a1 - 544);
}
}
}