//
// CustomizeObjectLayer::textChanged from 0x1001db850 to 0x1001dba41 (497 bytes)
//
// 2 xrefs:
// > sub_1001DBA90 @ 0x1001dba9c
// > ??> @ 0x100add9d8
//
// 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:26:26 +0000
//
void __fastcall CustomizeObjectLayer::textChanged(__int64 a1, __int64 a2, double a3)
{
int v3; // eax
__int64 v4; // rbx
char *v5; // r14
char *v6; // r14
__int64 v7; // rax
const std::string::value_type *CString; // rax
int v9; // esi
__int64 v10; // rax
__int64 v11; // rax
const std::string::value_type *v12; // rsi
size_t v13; // rax
size_t v14; // r15
char *v15; // r12
size_t v16; // r13
char v17; // [rsp+0h] [rbp-60h]
char v18; // [rsp+0h] [rbp-60h]
_QWORD __dst[2]; // [rsp+8h] [rbp-58h] BYREF
void *__p; // [rsp+18h] [rbp-48h]
char *v21[2]; // [rsp+20h] [rbp-40h] BYREF
char *__s; // [rsp+30h] [rbp-30h]
if ( *(_BYTE *)(a1 + 922) )
return;
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( v3 == 1 )
{
v4 = *(_QWORD *)(a1 + 688);
CCTextInputNode::getString(v21, a2);
if ( ((__int64)v21[0] & 1) != 0 )
v5 = __s;
else
v5 = (char *)v21 + 1;
v13 = strlen(v5);
if ( v13 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v14 = v13;
if ( v13 >= 0x17 )
{
v16 = 26;
if ( (v13 | 7) != 0x17 )
v16 = (v13 | 7) + 1;
v15 = (char *)operator new(v16);
__p = v15;
__dst[0] = v16 | 1;
__dst[1] = v14;
}
else
{
LOBYTE(__dst[0]) = 2 * v13;
v15 = (char *)__dst + 1;
if ( !v13 )
goto LABEL_24;
}
memmove(v15, v5, v14);
LABEL_24:
v15[v14] = 0;
TextGameObject::updateTextObject(v4, __dst, 0);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( ((__int64)v21[0] & 1) != 0 )
operator delete(__s);
return;
}
if ( !v3 )
{
CCTextInputNode::getString(v21, a2);
if ( ((__int64)v21[0] & 1) != 0 )
{
v6 = __s;
*(_DWORD *)(a1 + 748) = atoi(__s);
operator delete(v6);
}
else
{
*(_DWORD *)(a1 + 748) = atoi((const char *)v21 + 1);
}
v7 = sub_10088E820("%i", v17);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v7);
ButtonSprite::setString(*(_QWORD *)(a1 + 856), CString);
CustomizeObjectLayer::updateSelected(a1, *(_DWORD *)(a1 + 748));
CustomizeObjectLayer::updateColorSprite(a1, a3);
v9 = *(_DWORD *)(a1 + 748);
if ( v9 < 1000 )
{
if ( v9 <= 0 )
{
v12 = " ";
goto LABEL_14;
}
v11 = sub_10088E820("%i", v18);
v10 = cocos2d::CCString::getCString(v11);
}
else
{
v10 = GJSpecialColorSelect::textForColorIdx((unsigned int)v9);
}
v12 = (const std::string::value_type *)v10;
LABEL_14:
(*(void (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(
*(_QWORD *)(a1 + 808),
v12);
}
}