//
// sub_100914C70 from 0x100914c70 to 0x100914d6f (255 bytes)
//
// 6 xrefs:
// > sub_100914340 @ 0x100914621
// > sub_100914B60 @ 0x100914c2a
// > IDNameInput::idNameBrowserClosed @ 0x100914da2
// > sub_100914E10 @ 0x100914e2a
// > sub_100915CF0 @ 0x100915d97
// > sub_100915DB0 @ 0x100915ee1
//
// 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 12:38:11 +0000
//
__int64 __fastcall sub_100914C70(__int64 a1, int a2)
{
_QWORD *v2; // rbx
size_t v3; // rax
size_t v4; // r14
char *v5; // r15
size_t v6; // r12
_QWORD __dst[2]; // [rsp+8h] [rbp-58h] BYREF
void *__p; // [rsp+18h] [rbp-48h]
char __str[24]; // [rsp+20h] [rbp-40h] BYREF
v2 = *(_QWORD **)(a1 + 384);
if ( !v2 )
return __stack_chk_guard;
snprintf(__str, 0x10u, "%d", a2);
v3 = strlen(__str);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v4 = v3;
if ( v3 >= 0x17 )
{
v6 = 26;
if ( (v3 | 7) != 0x17 )
v6 = (v3 | 7) + 1;
v5 = (char *)operator new(v6);
__p = v5;
__dst[0] = v6 + 1;
__dst[1] = v4;
goto LABEL_9;
}
LOBYTE(__dst[0]) = 2 * v3;
v5 = (char *)__dst + 1;
if ( v3 )
LABEL_9:
memcpy(v5, __str, v4);
v5[v4] = 0;
CCTextInputNode::setString(v2, (__int64)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
return __stack_chk_guard;
}