//
// CustomizeObjectLayer::textChanged from 0x984908 to 0x984ac0 (440 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CustomizeObjectLayer::textChanged @ 0x984ac4
// > ??> @ 0x69f40
// > ??> @ 0x14719f0
//
// This function is hookable on this platform (idp: arm, 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:57:52 +0000
//
__int64 __fastcall CustomizeObjectLayer::textChanged(CustomizeObjectLayer *this, CCTextInputNode *a2)
{
int v4; // w0
_BYTE *v5; // x22
char *v6; // x20
size_t v7; // x0
char *v8; // x21
cocos2d::CCString *v9; // x0
const char *CString; // x0
unsigned int v11; // w0
__int64 v13[2]; // [xsp+48h] [xbp+48h] BYREF
void *v14; // [xsp+58h] [xbp+58h]
__int64 v15[2]; // [xsp+60h] [xbp+60h] BYREF
char *v16; // [xsp+70h] [xbp+70h]
if ( !*((_BYTE *)this + 922) )
{
v4 = (*(__int64 (__fastcall **)(CCTextInputNode *))(*(_QWORD *)a2 + 64LL))(a2);
if ( v4 )
{
if ( v4 == 1 )
{
v5 = *((_BYTE **)this + 86);
v6 = (char *)v13 + 1;
CCTextInputNode::getString(a2, v13);
if ( (v13[0] & 1) != 0 )
v6 = (char *)v14;
v15[0] = 0;
v15[1] = 0;
v16 = nullptr;
v7 = strlen(v6);
std::string::__init(v15, v6, v7);
TextGameObject::updateTextObject(v5, (unsigned __int8 *)v15, 0);
if ( (v15[0] & 1) != 0 )
operator delete(v16);
if ( (v13[0] & 1) != 0 )
operator delete(v14);
}
}
else
{
CCTextInputNode::getString(a2, v15);
if ( (v15[0] & 1) != 0 )
{
v8 = v16;
*((_DWORD *)this + 187) = atoi(v16);
operator delete(v8);
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*((unsigned int *)this + 187));
}
else
{
v11 = atoi((const char *)v15 + 1);
*((_DWORD *)this + 187) = v11;
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v11);
}
CString = (const char *)cocos2d::CCString::getCString(v9);
ButtonSprite::setString(*((ButtonSprite **)this + 107), CString);
CustomizeObjectLayer::updateSelected(this, *((_DWORD *)this + 187));
CustomizeObjectLayer::updateColorSprite(this);
CustomizeObjectLayer::updateChannelLabel(this, (GJSpecialColorSelect *)*((unsigned int *)this + 187));
}
}
return _stack_chk_guard;
}