//
// AccountLoginLayer::textInputClosed from 0x14007d0c0 to 0x14007d20a (330 bytes)
//
// 2 xrefs:
// > ??> @ 0x140539e90
// > ??> @ 0x1406c6864
//
// 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 AccountLoginLayer::textInputClosed(AccountLoginLayer *a1, CCTextInputNode *a2)
{
const char *v4; // rax
size_t v5; // r8
int v6; // eax
int v7; // eax
__int64 v8; // rcx
void *v9; // rcx
void *Block[2]; // [rsp+28h] [rbp-30h] BYREF
unsigned __int64 v11; // [rsp+38h] [rbp-20h]
unsigned __int64 v12; // [rsp+40h] [rbp-18h]
v4 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)Block = 0;
v11 = 0;
v12 = 0;
v5 = -1;
do
++v5;
while ( v4[v5] );
sub_14003A930(Block, v4, v5);
v6 = a2->getTag(a2);
AccountLoginLayer::resetLabel((AccountLoginLayer *)((char *)a1 - 632), v6);
v7 = ((__int64 (__fastcall *)(CCTextInputNode *))a2->getTag)(a2) - 1;
if ( !v7 )
{
if ( v11 >= 3 )
goto LABEL_10;
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)&a1->m_unknown2 + 360LL))(
*(_QWORD *)&a1->m_unknown2 + 360LL,
"Too short. Minimum 3 characters");
v8 = *(_QWORD *)&a1->m_unknown2;
goto LABEL_9;
}
if ( v7 == 1 && v11 < 6 )
{
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)&a1->m_uOrderOfArrival + 360LL))(
*(_QWORD *)&a1->m_uOrderOfArrival + 360LL,
"Too short. Minimum 6 characters");
v8 = *(_QWORD *)&a1->m_uOrderOfArrival;
LABEL_9:
(**(void (__fastcall ***)(__int64, cocos2d::ccColor3B *))(v8 + 368))(v8 + 368, &stru_1405299CC);
}
LABEL_10:
if ( v12 > 0xF )
{
v9 = Block[0];
if ( v12 + 1 >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v9);
}
}