//
// CCTextInputNode::init from 0x140054510 to 0x14005476e (606 bytes)
//
// 4 xrefs:
// > CCTextInputNode::create @ 0x1400544b8
// > ??> @ 0x140886ec4
// > ??> @ 0x140886ed4
// > ??> @ 0x140910250
//
// 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:25:39 +0000
//
bool __fastcall CCTextInputNode::init(__int64 *a1, float a2, float a3, _BYTE *a4, char a5, int a6, const char *a7)
{
bool result; // al
__int64 v10; // rdx
__int64 v11; // rdx
size_t v12; // rdi
size_t v13; // r8
struct cocos2d::CCTextFieldTTF *v14; // rax
__int64 v15; // rcx
__int64 *v16; // rcx
__int64 v17; // rbx
__int64 v18; // rax
const char *v19; // rbx
struct cocos2d::CCLabelBMFont *v20; // rax
__int64 v21; // rcx
struct cocos2d::CCLabelBMFont *v22; // rax
__int64 v23; // rcx
__int64 v24; // rdx
__int128 v25; // [rsp+20h] [rbp-48h] BYREF
__int64 v26; // [rsp+30h] [rbp-38h]
__int64 v27; // [rsp+38h] [rbp-30h]
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( result )
{
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 920))(a1, v10);
LOBYTE(v11) = 1;
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 1024))(a1, v11);
v12 = -1;
*((_BYTE *)a1 + 624) = 0;
v13 = -1;
do
++v13;
while ( a4[v13] );
sub_1400405A0((void **)a1 + 54, a4, v13);
v14 = cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder(a4, "Thonburi", (float)a6);
v15 = *a1;
a1[74] = (__int64)v14;
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCTextFieldTTF *))(v15 + 464))(a1, v14);
v16 = a1 + 52;
if ( !a1 )
v16 = nullptr;
*(_QWORD *)(a1[74] + 712) = v16;
v17 = *a1;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&a5, a2, a3);
(*(void (__fastcall **)(__int64 *, __int64))(v17 + 312))(a1, v18);
*((_WORD *)a1 + 286) = -1;
*(_WORD *)((char *)a1 + 575) = -1;
*((float *)a1 + 140) = a2;
*(__int64 *)((char *)a1 + 564) = 1065353216;
*((_BYTE *)a1 + 574) = -1;
*((_BYTE *)a1 + 577) = -1;
sub_1400405A0((void **)a1 + 60, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 0x3Fu);
v19 = a7;
if ( a7 )
{
v20 = cocos2d::CCLabelBMFont::create(a4, a7);
v21 = *a1;
a1[77] = (__int64)v20;
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCLabelBMFont *))(v21 + 464))(a1, v20);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1[74] + 336LL))(a1[74], 0);
v26 = 0;
v25 = 0;
v27 = 0;
do
++v12;
while ( v19[v12] );
sub_14003D230(&v25, v19, v12);
CCTextInputNode::updateDefaultFontValues(a1, &v25);
}
v22 = cocos2d::CCLabelBMFont::create((const char *)&word_14070D07C, "chatFont.fnt");
v23 = *a1;
a1[73] = (__int64)v22;
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCLabelBMFont *, __int64))(v23 + 456))(a1, v22, 10);
LOBYTE(v24) = -106;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(a1[73] + 368) + 40LL))(a1[73] + 368, v24);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1[73] + 336LL))(a1[73], 0);
return 1;
}
return result;
}