//
// LevelListLayer::textInputOpened from 0x140308c10 to 0x140308d6f (351 bytes)
//
// 2 xrefs:
// > ??> @ 0x140589668
// > ??> @ 0x1406d45c8
//
// 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
//
// Hidden C++ exception states: #wind=1
void LevelListLayer::textInputOpened(LevelListLayer *a1, CCTextInputNode *a2)
{
const char *v3; // rax
size_t v4; // r8
int v5; // eax
unsigned __int64 v6; // rdi
char *v7; // rbx
void **v8; // rcx
size_t v9; // r8
char *v10; // rax
__int128 Buf2; // [rsp+28h] [rbp-50h] BYREF
__int64 v12; // [rsp+38h] [rbp-40h]
__int64 v13; // [rsp+40h] [rbp-38h]
void *Buf1[2]; // [rsp+48h] [rbp-30h] BYREF
size_t v15; // [rsp+58h] [rbp-20h]
unsigned __int64 v16; // [rsp+60h] [rbp-18h]
v3 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)Buf1 = 0;
v15 = 0;
v16 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003A930(Buf1, v3, v4);
v5 = a2->getTag(a2);
v6 = v16;
v7 = (char *)Buf1[0];
if ( v5 == 1002 )
{
Buf2 = 0;
v12 = 0;
v13 = 15;
LOBYTE(Buf2) = 0;
v8 = Buf1;
if ( v16 > 0xF )
v8 = (void **)Buf1[0];
v9 = v15;
if ( v15 )
v9 = 0;
if ( !memcmp(v8, &Buf2, v9) && !v15 )
{
Buf2 = 0;
v12 = 1;
v13 = 15;
LOWORD(Buf2) = 32;
CCTextInputNode::updateLabel(a2, (__int64)&Buf2);
}
}
if ( v6 > 0xF )
{
v10 = v7;
if ( v6 + 1 >= 0x1000 )
{
v7 = *((char **)v7 - 1);
if ( (unsigned __int64)(v10 - v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v7);
}
}