//
// SecretLayer4::updateSearchLabel from 0x100354c8c to 0x100354dcc (320 bytes)
//
// 3 xrefs:
// > SecretLayer4::init @ 0x100354490
// > SecretLayer4::textInputClosed @ 0x100355f44
// > SecretLayer4::textChanged @ 0x100355fc4
//
// 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 __fastcall SecretLayer4::updateSearchLabel(SecretLayer4 *a1, const char *a2)
{
cocos2d::CCLabelBMFont *m_textLabel; // x19
_BOOL4 v5; // w21
CCTextInputNode *m_searchInput; // x20
__int16 v7; // w8
std::string v8; // [xsp+8h] [xbp-98h] BYREF
void *__p[2]; // [xsp+20h] [xbp-80h] BYREF
char v10; // [xsp+37h] [xbp-69h]
void *v11[2]; // [xsp+38h] [xbp-68h] BYREF
char v12; // [xsp+4Fh] [xbp-51h]
void *v13[2]; // [xsp+50h] [xbp-50h] BYREF
char v14; // [xsp+67h] [xbp-39h]
void *v15[2]; // [xsp+68h] [xbp-38h] BYREF
char v16; // [xsp+7Fh] [xbp-21h]
m_textLabel = a1->m_searchInput->m_textLabel;
sub_100009900(v15, (char *)a2);
sub_100009900(v13, "");
if ( sub_1000045BC(v15, v13) )
{
v5 = 1;
}
else
{
sub_100009900(v11, (char *)a2);
sub_100009900(__p, "...");
v5 = sub_1000045BC(v11, __p);
if ( v10 < 0 )
operator delete(__p[0]);
if ( v12 < 0 )
operator delete(v11[0]);
}
if ( v14 < 0 )
operator delete(v13[0]);
if ( v16 < 0 )
{
operator delete(v15[0]);
if ( v5 )
goto LABEL_11;
LABEL_15:
BYTE2(v15[0]) = -1;
v7 = -1;
goto LABEL_16;
}
if ( !v5 )
goto LABEL_15;
LABEL_11:
m_searchInput = a1->m_searchInput;
sub_100009900(&v8, "...");
CCTextInputNode::updateLabel(m_searchInput, &v8);
if ( SHIBYTE(v8.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v8.__r_.__value_.__l.__data_);
BYTE2(v15[0]) = -40;
v7 = -26260;
LABEL_16:
LOWORD(v15[0]) = v7;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_textLabel->setColor)(m_textLabel, v15);
}