//
// CustomizeObjectLayer::textInputOpened from 0x1400a9680 to 0x1400a980f (399 bytes)
//
// 2 xrefs:
// > ??> @ 0x140545420
// > ??> @ 0x1406c7854
//
// 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 CustomizeObjectLayer::textInputOpened(CustomizeObjectLayer *a1, CCTextInputNode *a2)
{
const char *v4; // rax
size_t v5; // r8
void **v6; // rcx
char *v7; // rdi
unsigned __int64 v8; // r14
unsigned __int64 v9; // rbp
size_t v10; // r8
__int64 v11; // rbx
char *v12; // rax
void *Buf1[2]; // [rsp+28h] [rbp-70h] BYREF
__int128 v14; // [rsp+38h] [rbp-60h]
__int128 Buf2; // [rsp+48h] [rbp-50h] BYREF
__int64 v16; // [rsp+58h] [rbp-40h]
__int64 v17; // [rsp+60h] [rbp-38h]
if ( a2->getTag(a2) == 1 )
{
Buf2 = 0;
v16 = 1;
v17 = 15;
LOWORD(Buf2) = 65;
v4 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)Buf1 = 0;
v14 = 0;
v5 = -1;
do
++v5;
while ( v4[v5] );
sub_14003A930(Buf1, v4, v5);
v6 = Buf1;
v7 = (char *)Buf1[0];
v8 = *((_QWORD *)&v14 + 1);
if ( *((_QWORD *)&v14 + 1) > 0xFu )
v6 = (void **)Buf1[0];
v9 = v14;
v10 = v14;
if ( (unsigned __int64)v14 > 1 )
v10 = 1;
LODWORD(v11) = memcmp(v6, &Buf2, v10);
if ( !(_DWORD)v11 )
{
if ( v9 )
v11 = v9 > 1;
else
LODWORD(v11) = -1;
}
if ( v8 > 0xF )
{
v12 = v7;
if ( v8 + 1 >= 0x1000 )
{
v7 = *((char **)v7 - 1);
if ( (unsigned __int64)(v12 - v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v7);
}
if ( !(_DWORD)v11 )
{
CustomizeObjectLayer::onClear((CustomizeObjectLayer *)((char *)a1 - 632), nullptr);
*(_OWORD *)Buf1 = 0;
*(_QWORD *)&v14 = 1;
*((_QWORD *)&v14 + 1) = 15;
LOWORD(Buf1[0]) = 32;
CCTextInputNode::updateLabel(a2, (__int64)Buf1);
}
}
}