//
// SecretLayer2::textInputClosed from 0x1403e6ed0 to 0x1403e6f9d (205 bytes)
//
// 5 xrefs:
// > ??> @ 0x1405d32b8
// > ??> @ 0x1405d32c8
// > ??> @ 0x1405d4d58
// > ??> @ 0x1405d4d68
// > ??> @ 0x1406d7f88
//
// 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
//
// Merged with: SecretLayer2::textInputClosed, SecretLayer4::textInputClosed, SecretLayer4::textChanged
void __fastcall SecretLayer2::textInputClosed(__int64 a1, __int64 a2)
{
_BYTE *v3; // rax
size_t v4; // r8
void **v5; // rdx
void *v6; // rcx
void *Block[2]; // [rsp+28h] [rbp-30h] BYREF
__int128 v8; // [rsp+38h] [rbp-20h]
v3 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a2 + 552) + 600LL) + 8LL))(*(_QWORD *)(a2 + 552) + 600LL);
*(_OWORD *)Block = 0;
v8 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003A930(Block, v3, v4);
v5 = Block;
if ( *((_QWORD *)&v8 + 1) > 0xFu )
v5 = (void **)Block[0];
SecretLayer2::updateSearchLabel(a1 - 408, v5);
if ( *((_QWORD *)&v8 + 1) > 0xFu )
{
v6 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v6);
}
}