//
// SetupInstantCountPopup::textChanged from 0x140423490 to 0x140423706 (630 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405e4c68
// > ??> @ 0x1406d9650
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void SetupInstantCountPopup::textChanged(SetupInstantCountPopup *a1, CCTextInputNode *a2)
{
const char *v4; // rax
size_t v5; // r8
const char *v6; // rcx
int v7; // eax
unsigned __int64 v8; // rdx
char *v9; // rcx
bool v10; // zf
cocos2d::CCLabelProtocol_vtbl *v11; // rax
_BYTE *v12; // rax
size_t v13; // r8
const char *v14; // rcx
int v15; // eax
unsigned __int64 v16; // rdx
char *v17; // rcx
_BYTE *v18; // rax
size_t v19; // r8
const char *v20; // rcx
int v21; // eax
unsigned __int64 v22; // rdx
char *v23; // rcx
char *String[2]; // [rsp+28h] [rbp-28h] BYREF
__int128 v25; // [rsp+38h] [rbp-18h]
if ( !LOBYTE(a1->m_fSkewX) )
{
if ( a2->getTag(a2) )
{
v10 = a2->getTag(a2) == 1;
v11 = a2->m_textField->__vftable;
if ( v10 )
{
v12 = (_BYTE *)((__int64 (*)(void))v11->getString)();
*(_OWORD *)String = 0;
v13 = -1;
v25 = 0;
do
++v13;
while ( v12[v13] );
sub_14003A930(String, v12, v13);
v14 = (const char *)String;
if ( *((_QWORD *)&v25 + 1) > 0xFu )
v14 = String[0];
v15 = atoi(v14);
v16 = *((_QWORD *)&v25 + 1);
LODWORD(a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable) = v15;
if ( v16 > 0xF )
{
v17 = String[0];
if ( v16 + 1 >= 0x1000 )
{
v17 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v17 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v17);
}
SetupCountTriggerPopup::updateTargetCount((__int64)&a1[-1].m_pScriptKeypadHandlerEntry);
}
else
{
v18 = (_BYTE *)((__int64 (*)(void))v11->getString)();
*(_OWORD *)String = 0;
v19 = -1;
v25 = 0;
do
++v19;
while ( v18[v19] );
sub_14003A930(String, v18, v19);
v20 = (const char *)String;
if ( *((_QWORD *)&v25 + 1) > 0xFu )
v20 = String[0];
v21 = atoi(v20);
v22 = *((_QWORD *)&v25 + 1);
HIDWORD(a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable) = v21;
if ( v22 > 0xF )
{
v23 = String[0];
if ( v22 + 1 >= 0x1000 )
{
v23 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v23 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v23);
}
SetupInstantCountPopup::updateTargetID((SetupInstantCountPopup *)((char *)a1 - 632));
}
}
else
{
v4 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v5 = -1;
v25 = 0;
do
++v5;
while ( v4[v5] );
sub_14003A930(String, v4, v5);
v6 = (const char *)String;
if ( *((_QWORD *)&v25 + 1) > 0xFu )
v6 = String[0];
v7 = atoi(v6);
v8 = *((_QWORD *)&v25 + 1);
LODWORD(a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable) = v7;
if ( v8 > 0xF )
{
v9 = String[0];
if ( v8 + 1 >= 0x1000 )
{
v9 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v9);
}
SetupCollisionTriggerPopup::updateItemID((__int64)&a1[-1].m_pScriptKeypadHandlerEntry);
SetupTriggerPopup::updateEditorLabel((SetupInstantCountPopup *)((char *)a1 - 632));
}
}
}