//
// IDNameInput::commitTypedName from 0x1403ca930 to 0x1403cabd4 (676 bytes)
//
// 2 xrefs:
// > IDNameInput::textInputClosed @ 0x1403caed0
// > ??> @ 0x140924404
//
// 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:31:32 +0000
//
// Hidden C++ exception states: #wind=5
char __fastcall IDNameInput::commitTypedName(__int64 a1)
{
__int64 v2; // rax
_BYTE *v3; // rax
size_t v4; // r8
__int64 v5; // rcx
unsigned __int64 v6; // r9
char *v7; // r8
void **v8; // rax
char v9; // dl
char v10; // si
char *v11; // r8
char *v12; // rdi
unsigned int v13; // ebx
__int64 v14; // rax
__int64 v15; // r8
__int64 v16; // rcx
__int64 v17; // rbx
char *v18; // rax
char *v19; // rax
void *Block[2]; // [rsp+30h] [rbp-50h] BYREF
__int64 v22; // [rsp+40h] [rbp-40h]
void *v23; // [rsp+48h] [rbp-38h]
void *v24[2]; // [rsp+50h] [rbp-30h] BYREF
unsigned __int64 v25; // [rsp+60h] [rbp-20h]
unsigned __int64 v26; // [rsp+68h] [rbp-18h]
v2 = *(_QWORD *)(a1 + 384);
if ( !v2 || !*(_BYTE *)(v2 + 692) )
return 0;
v3 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(v2 + 592) + 600LL) + 8LL))(*(_QWORD *)(v2 + 592) + 600LL);
*(_OWORD *)v24 = 0;
v25 = 0;
v26 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003D230(v24, v3, v4);
if ( v25 )
{
v5 = 0;
v6 = v26;
v7 = (char *)v24[0];
while ( 1 )
{
v8 = v24;
if ( v26 > 0xF )
v8 = (void **)v24[0];
v9 = *((_BYTE *)v8 + v5);
if ( (v5 || v9 != 45) && (unsigned __int8)(v9 - 48) > 9u )
break;
if ( ++v5 >= v25 )
{
v10 = 0;
goto LABEL_32;
}
}
}
*(_OWORD *)Block = 0;
v22 = 0;
IDNameInput::collectMatches((unsigned int *)a1, v24, Block);
v11 = (char *)Block[0];
v12 = (char *)Block[1];
if ( Block[0] == Block[1] )
{
v10 = 0;
}
else
{
v13 = *(_DWORD *)Block[0];
v14 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v23 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v23);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v14 = qword_14090BFD0;
}
v15 = *(_QWORD *)(v14 + 568);
if ( v15 )
{
v16 = *(_QWORD *)(v15 + 3528);
if ( v16 )
LevelSettingsObject::touchIDUsage(v16, v13, *(unsigned int *)(a1 + 376));
}
IDNameInput::commitID(a1, v13);
v10 = 1;
v12 = (char *)Block[1];
v11 = (char *)Block[0];
}
if ( v11 )
{
if ( v11 != v12 )
{
v17 = (__int64)(v11 + 8);
do
{
sub_14003D310(v17 + 32);
sub_14003D310(v17);
v17 += 72;
}
while ( (char *)(v17 - 8) != v12 );
v11 = (char *)Block[0];
}
v18 = v11;
if ( (unsigned __int64)(72 * ((v22 - (__int64)v11) / 72)) >= 0x1000 )
{
v11 = *((char **)v11 - 1);
if ( (unsigned __int64)(v18 - v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
*(_OWORD *)Block = 0;
v22 = 0;
}
v7 = (char *)v24[0];
v6 = v26;
LABEL_32:
if ( v6 > 0xF )
{
v19 = v7;
if ( v6 + 1 >= 0x1000 )
{
v7 = *((char **)v7 - 1);
if ( (unsigned __int64)(v19 - v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v7);
}
return v10;
}