//
// SecretLayer2::textInputClosed from 0x14057cbb0 to 0x14057cc90 (224 bytes)
//
// 5 xrefs:
// > ??> @ 0x1407df480
// > ??> @ 0x1407df490
// > ??> @ 0x1407e2b10
// > ??> @ 0x1407e2b20
// > ??> @ 0x14092c894
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:34:24 +0000
//
// 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+38h] [rbp-30h] BYREF
__int128 v8; // [rsp+48h] [rbp-20h]
v3 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a2 + 592) + 600LL) + 8LL))(*(_QWORD *)(a2 + 592) + 600LL);
*(_OWORD *)Block = 0;
v8 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003D230(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 )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
}