//
// IDNameBrowserPopup::init from 0x1403c1650 to 0x1403c2ae9 (5273 bytes)
//
// 2 xrefs:
// > IDNameInput::onBrowser @ 0x1403c8d10
// > ??> @ 0x1409240b0
//
// 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:29 +0000
//
// Hidden C++ exception states: #wind=5
bool __fastcall IDNameBrowserPopup::init(__int64 a1, int a2, int a3, __int64 a4)
{
bool result; // al
__int64 v9; // rdx
__int64 v10; // rax
unsigned int v11; // eax
__int64 v12; // rdx
__int64 v13; // rdx
__int64 v14; // rcx
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // rdi
__int64 v19; // rbx
__int64 v20; // rax
const char *v21; // rdx
size_t v22; // r8
const char *v23; // rcx
struct cocos2d::CCLabelBMFont *v24; // rdi
__int64 v25; // rbx
__int64 v26; // rax
__int64 v27; // rcx
__int64 v28; // rax
struct cocos2d::CCSprite *v29; // rax
cocos2d::CCObject *v30; // rdi
__int64 v31; // rbx
__int64 v32; // rax
float v33; // xmm10_4
struct cocos2d::CCLabelBMFont *v34; // rdi
__int64 v35; // rbx
__int64 v36; // rax
__int64 v37; // rbx
__int64 v38; // rax
__int64 v39; // rax
__int64 *v40; // rdi
__int64 v41; // rdx
__int64 v42; // rbx
__int64 v43; // rax
__int64 v44; // rbx
__int64 v45; // rax
__int64 v46; // rdx
__int64 v47; // rcx
char *v48; // rdi
__int64 v49; // rbx
__int64 v50; // rax
__int64 v51; // rcx
__int64 v52; // rcx
__int64 v53; // rcx
__int64 v54; // rcx
__int64 v55; // r15
cocos2d::CCLabelBMFont **v56; // rbx
cocos2d::CCObject *v57; // rdi
__int64 v58; // rbx
__int64 v59; // rax
__int64 *v60; // rcx
int v61; // eax
char *v62; // rdx
float v63; // xmm9_4
float v64; // xmm10_4
float v65; // xmm7_4
__int64 v66; // rax
_QWORD *v67; // rdi
__int64 v68; // rdx
__int64 v69; // rbx
__int64 v70; // rax
const struct cocos2d::CCSize *v71; // rax
cocos2d::CCObject *v72; // rdi
__int64 v73; // rbx
__int64 v74; // rax
__int64 v75; // rbx
__int64 v76; // rax
__int64 v77; // rdx
__int64 v78; // rbx
__int64 v79; // rax
struct cocos2d::CCLabelBMFont *v80; // rax
__int64 v81; // rdi
__int64 v82; // rbx
__int64 v83; // rax
__int64 v84; // rax
_QWORD *v85; // rsi
__int64 v86; // rdx
__int64 v87; // rbx
__int64 v88; // rax
__int64 v89; // rbx
__int64 v90; // rax
__int64 v91; // rdx
__int64 v92; // rcx
char *v93; // rdi
__int64 v94; // rbx
__int64 v95; // rax
__int64 v96; // rcx
__int64 v97; // rcx
__int64 v98; // rcx
__int64 v99; // rcx
struct cocos2d::CCSprite *v100; // rax
cocos2d::CCObject *v101; // rdi
__int64 v102; // rax
__int64 v103; // rbx
__int64 v104; // rax
__int64 v105; // rbx
__int64 v106; // rax
cocos2d::CCSprite *v107; // rbx
cocos2d::CCObject *v108; // rdi
__int64 v109; // rax
__int64 v110; // rbx
__int64 v111; // rax
__int64 v112; // rbx
__int64 v113; // rax
struct cocos2d::CCSprite *v114; // rbx
cocos2d::CCObject *v115; // rdi
__int64 v116; // rbx
__int64 v117; // rax
__int64 v118; // rax
_QWORD *v119; // rsi
__int64 v120; // rdx
__int64 v121; // rbx
__int64 v122; // rax
__int64 v123; // rbx
__int64 v124; // rax
__int64 v125; // rdx
__int64 v126; // rcx
char *v127; // rdi
__int64 v128; // rbx
__int64 v129; // rax
__int64 v130; // rcx
__int64 v131; // rcx
__int64 v132; // rcx
__int64 v133; // rcx
cocos2d::CCObject *v134; // rbx
cocos2d::CCObject *v135; // rdi
__int64 v136; // rbx
__int64 v137; // rax
struct cocos2d::CCLabelBMFont *v138; // rax
__int64 v139; // rdi
__int64 v140; // rbx
__int64 v141; // rax
__int64 v142; // rdi
__int64 v143; // rbx
__int64 v144; // rax
int v145; // [rsp+50h] [rbp-B0h] BYREF
void *v146; // [rsp+58h] [rbp-A8h] BYREF
float v147; // [rsp+60h] [rbp-A0h] BYREF
float v148; // [rsp+64h] [rbp-9Ch]
void *v149; // [rsp+68h] [rbp-98h] BYREF
__int128 v150; // [rsp+70h] [rbp-90h] BYREF
__int64 v151; // [rsp+80h] [rbp-80h]
__int64 v152; // [rsp+88h] [rbp-78h]
float v153[2]; // [rsp+90h] [rbp-70h] BYREF
float v154[2]; // [rsp+98h] [rbp-68h] BYREF
__int128 v155; // [rsp+A0h] [rbp-60h] BYREF
__int64 v156; // [rsp+B0h] [rbp-50h]
unsigned __int64 v157; // [rsp+B8h] [rbp-48h]
v145 = -1778384896;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v145);
if ( result )
{
*(_DWORD *)(a1 + 672) = a2;
*(_DWORD *)(a1 + 676) = a3;
*(_QWORD *)(a1 + 680) = a4;
*(_DWORD *)(a1 + 752) = -1;
v10 = qword_14090BFD0;
if ( qword_14090BFD0
|| (v146 = operator new(0x6E8u),
qword_14090BFD0 = GameManager::GameManager((__int64)v146),
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0),
(v10 = qword_14090BFD0) != 0) )
{
v11 = *(_DWORD *)(v10 + 1172);
if ( v11 > 2 )
v11 = 0;
*(_DWORD *)(a1 + 736) = v11;
}
LOBYTE(v9) = -106;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(a1 + 408) + 40LL))(a1 + 408, v9);
FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1);
*(_BYTE *)(a1 + 596) = 1;
LOBYTE(v12) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v12);
LOBYTE(v13) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v13);
v15 = cocos2d::CCDirector::sharedDirector(v14);
cocos2d::CCDirector::getWinSize(v15, v154);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v154[0] * 0.5, v154[1] * 0.5);
v16 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v16;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v16);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v150, 0.0, 0.0, 80.0, 80.0);
v18 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v17);
v19 = *(_QWORD *)v18;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v146, 360.0, 280.0);
(*(void (__fastcall **)(__int64, __int64))(v19 + 312))(v18, v20);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v18,
4294967294LL);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v18 + 184LL))(v18, &v147);
switch ( a3 )
{
case 2:
v21 = "Item ID Names";
break;
case 3:
v21 = "Block ID Names";
break;
case 4:
v21 = "Timer ID Names";
break;
case 5:
v21 = "Area Effect ID Names";
break;
case 6:
v21 = "Control ID Names";
break;
case 7:
v21 = "Gradient ID Names";
break;
default:
v21 = "Group ID Names";
if ( a3 == 8 )
v21 = "Enter Channel ID Names";
break;
}
v155 = 0;
v156 = 0;
v157 = 0;
v22 = -1;
do
++v22;
while ( v21[v22] );
sub_14003D230(&v155, v21, v22);
v23 = (const char *)&v155;
if ( v157 > 0xF )
v23 = (const char *)v155;
v24 = cocos2d::CCLabelBMFont::create(v23, "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v24 + 160LL))(v24);
v25 = *(_QWORD *)v24;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v147, (float)(v148 + 140.0) - 18.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v25 + 184))(v24, v26);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v24);
v28 = cocos2d::CCMenu::create(v27);
*(_QWORD *)(a1 + 552) = v28;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v28, 10);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 184LL))(*(_QWORD *)(a1 + 552), &unk_14090ADB0);
*(_DWORD *)(a1 + 640) = -1;
v29 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
LODWORD(v25) = (_DWORD)v29;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v29 + 160LL))(v29);
v30 = CCMenuItemSpriteExtra::create(v25, 0, a1, (__int64)IDNameBrowserPopup::onClose);
*((_DWORD *)v30 + 93) = 1070386381;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v30);
v31 = *(_QWORD *)v30;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, (float)(v147 - 180.0) + 10.0, (float)(v148 + 140.0) - 10.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v31 + 184))(v30, v32);
v33 = (float)(v148 + 140.0) - 50.0;
v34 = cocos2d::CCLabelBMFont::create("Search:", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v34 + 160LL))(v34);
v35 = *(_QWORD *)v34;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v35 + 288))(v34, v36);
v37 = *(_QWORD *)v34;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v147 - 90.0, v33);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v37 + 184))(v34, v38);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v34);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v150, 0.0, 0.0, 40.0, 40.0);
v40 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v39);
LOBYTE(v41) = 100;
(*(void (__fastcall **)(__int64 *, __int64))(v40[40] + 40))(v40 + 40, v41);
v42 = *v40;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v146, 180.0, 28.0);
(*(void (__fastcall **)(__int64 *, __int64))(v42 + 312))(v40, v43);
v44 = *v40;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v147 + 10.0, v33);
(*(void (__fastcall **)(__int64 *, __int64))(v44 + 184))(v40, v45);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v40,
0xFFFFFFFFLL);
v48 = CCTextInputNode::create(v47, v46, (__int64)"Filter by name or ID");
*(_QWORD *)(a1 + 688) = v48;
v49 = *(_QWORD *)v48;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v147 + 10.0, v33);
(*(void (__fastcall **)(char *, __int64))(v49 + 184))(v48, v50);
v51 = *(_QWORD *)(a1 + 688);
*(_DWORD *)(v51 + 564) = 1058642330;
CCTextInputNode::refreshLabel(v51);
v52 = *(_QWORD *)(a1 + 688);
*(_DWORD *)(v52 + 560) = 1126170624;
CCTextInputNode::refreshLabel(v52);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 688) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 688) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 688) + 608LL) = 24;
v150 = 0;
v151 = 0;
v152 = 0;
*(_QWORD *)&v150 = sub_14003D460(0x50u);
v151 = 65;
v152 = 79;
strcpy((char *)v150, "0123456789 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.");
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 688), (void **)&v150);
LOWORD(v145) = -21896;
v53 = *(_QWORD *)(a1 + 688);
*(_WORD *)(v53 + 572) = -21896;
*(_BYTE *)(v53 + 574) = -16;
CCTextInputNode::refreshLabel(v53);
v54 = *(_QWORD *)(a1 + 688);
*(_DWORD *)(v54 + 568) = 1053609165;
CCTextInputNode::refreshLabel(v54);
v55 = a1 + 544;
*(_QWORD *)(*(_QWORD *)(a1 + 688) + 600LL) = a1 + 544;
*(_BYTE *)(*(_QWORD *)(a1 + 688) + 424LL) = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 688) + 64LL))(*(_QWORD *)(a1 + 688), 900003);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 688),
20);
v146 = operator new(0x2C8u);
v56 = (cocos2d::CCLabelBMFont **)ButtonSprite::ButtonSprite((__int64)v146);
if ( v56 )
{
if ( ButtonSprite::init_1(
(__int64)v56,
(__int64)"Sort: Use",
38,
0,
1060320051,
1,
"goldFont.fnt",
(__int64)"GJ_button_04.png",
1104150528) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v56);
}
else
{
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*v56 + 1))(v56, 1);
v56 = nullptr;
}
}
*(_QWORD *)(a1 + 744) = v56;
cocos2d::CCLabelBMFont::limitLabelWidth(v56[79], 44.0, 0.5, 0.0);
v57 = CCMenuItemSpriteExtra::create(*(_QWORD *)(a1 + 744), 0, a1, (__int64)IDNameBrowserPopup::onToggleSort);
*((_DWORD *)v57 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v57);
v58 = *(_QWORD *)v57;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v147 + 138.0, v33);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v58 + 184))(v57, v59);
v60 = *(__int64 **)(a1 + 744);
if ( v60 )
{
v61 = *(_DWORD *)(a1 + 736);
if ( v61 == 1 )
{
v62 = "Sort: ID";
}
else
{
v62 = "Sort: Name";
if ( v61 != 2 )
v62 = "Sort: Use";
}
ButtonSprite::setString(v60, v62);
cocos2d::CCLabelBMFont::limitLabelWidth(
*(cocos2d::CCLabelBMFont **)(*(_QWORD *)(a1 + 744) + 632LL),
44.0,
0.5,
0.0);
}
v63 = (float)(v148 - 140.0) + 30.0;
v64 = v33 - 22.0;
v65 = v64 - (float)(v63 + 22.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v153, v147, (float)((float)(v63 + 22.0) + v64) * 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v150, 0.0, 0.0, 40.0, 40.0);
v67 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v66);
LOBYTE(v68) = 80;
(*(void (__fastcall **)(_QWORD *, __int64))(v67[40] + 40LL))(v67 + 40, v68);
LOWORD(v145) = 0;
BYTE2(v145) = 0;
(*(void (__fastcall **)(_QWORD *, int *))v67[40])(v67 + 40, &v145);
v69 = *v67;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v146, 330.0, v65);
(*(void (__fastcall **)(_QWORD *, __int64))(v69 + 312))(v67, v70);
(*(void (__fastcall **)(_QWORD *, float *))(*v67 + 184LL))(v67, v153);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v67,
0xFFFFFFFFLL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v146, 330.0, v65);
v72 = ScrollableContentLayer::create(v71);
*(_QWORD *)(a1 + 696) = v72;
v73 = *(_QWORD *)v72;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v153[0] - 165.0, v153[1] - (float)(v65 * 0.5));
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v73 + 184))(v72, v74);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, 2.0, 0.0);
v75 = *(_QWORD *)(a1 + 696);
cocos2d::CCPoint::operator=(v75 + 500, v76);
ScrollableContentLayer::updateScrollThumb(v75, v77);
*(_BYTE *)(*(_QWORD *)(a1 + 696) + 524LL) = 1;
v78 = *(_QWORD *)(a1 + 696);
ScrollableContentLayer::ensureOwnedContentNode((_QWORD *)v78);
ScrollableContentLayer::unmountAllRows(v78);
*(_QWORD *)(v78 + 576) = a1 + 664;
*(_DWORD *)(v78 + 584) = 1111490560;
*(_DWORD *)(v78 + 588) = 1082130432;
*(_DWORD *)(v78 + 592) = 1082130432;
v79 = *(_QWORD *)(v78 + 600);
if ( v79 != *(_QWORD *)(v78 + 608) )
*(_QWORD *)(v78 + 608) = v79;
if ( a1 != -664 )
ScrollableContentLayer::reloadVirtualRows(v78, -1.0);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 696),
1);
v80 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, "chatFont.fnt");
*(_QWORD *)(a1 + 704) = v80;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v80 + 160LL))(v80);
LOWORD(v145) = -19276;
BYTE2(v145) = -76;
(**(void (__fastcall ***)(__int64, int *))(*(_QWORD *)(a1 + 704) + 368LL))(*(_QWORD *)(a1 + 704) + 368LL, &v145);
v81 = **(_QWORD **)(a1 + 704);
v82 = *(_QWORD *)(a1 + 704);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, 0.5, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v81 + 288))(v82, v83);
(*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 704) + 184LL))(*(_QWORD *)(a1 + 704), v153);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 704),
2);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v150, 0.0, 0.0, 40.0, 40.0);
v85 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v84);
LOBYTE(v86) = 100;
(*(void (__fastcall **)(_QWORD *, __int64))(v85[40] + 40LL))(v85 + 40, v86);
v87 = *v85;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v146, 40.0, 28.0);
(*(void (__fastcall **)(_QWORD *, __int64))(v87 + 312))(v85, v88);
v89 = *v85;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, v147 - 120.0, v63);
(*(void (__fastcall **)(_QWORD *, __int64))(v89 + 184))(v85, v90);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v85,
0xFFFFFFFFLL);
v93 = CCTextInputNode::create(v92, v91, (__int64)"ID");
*(_QWORD *)(a1 + 712) = v93;
v94 = *(_QWORD *)v93;
v95 = (*(__int64 (__fastcall **)(_QWORD *))(*v85 + 200LL))(v85);
(*(void (__fastcall **)(char *, __int64))(v94 + 184))(v93, v95);
v96 = *(_QWORD *)(a1 + 712);
*(_DWORD *)(v96 + 564) = 1057803469;
CCTextInputNode::refreshLabel(v96);
v97 = *(_QWORD *)(a1 + 712);
*(_DWORD *)(v97 + 560) = 1107820544;
CCTextInputNode::refreshLabel(v97);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 712) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 712) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 712) + 608LL) = 6;
v151 = 10;
v152 = 15;
*(_QWORD *)&v150 = *(_QWORD *)"0123456789";
*((_QWORD *)&v150 + 1) = *(unsigned __int16 *)"89";
BYTE10(v150) = 0;
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 712), (void **)&v150);
LOWORD(v145) = -21896;
v98 = *(_QWORD *)(a1 + 712);
*(_WORD *)(v98 + 572) = -21896;
*(_BYTE *)(v98 + 574) = -16;
CCTextInputNode::refreshLabel(v98);
v99 = *(_QWORD *)(a1 + 712);
*(_DWORD *)(v99 + 568) = 1053609165;
CCTextInputNode::refreshLabel(v99);
*(_QWORD *)(*(_QWORD *)(a1 + 712) + 600LL) = v55;
*(_BYTE *)(*(_QWORD *)(a1 + 712) + 424LL) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 712) + 64LL))(*(_QWORD *)(a1 + 712), 900001);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 712),
20);
v100 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
LODWORD(v94) = (_DWORD)v100;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v100 + 160LL))(v100);
v101 = CCMenuItemSpriteExtra::create(v94, 0, a1, (__int64)IDNameBrowserPopup::onFormArrowLeft);
*((_DWORD *)v101 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v101);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, -38.0, 0.0);
v103 = v102;
v104 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 200LL))(*(_QWORD *)(a1 + 712));
cocos2d::CCPoint::operator+(v104, &v145, v103);
v105 = *(_QWORD *)v101;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v149, &v145);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v105 + 184))(v101, v106);
v107 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
cocos2d::CCSprite::setFlipX(v107, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v107 + 160LL))(v107);
v108 = CCMenuItemSpriteExtra::create((int)v107, 0, a1, (__int64)IDNameBrowserPopup::onFormArrowRight);
*((_DWORD *)v108 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v108);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v149, 38.0, 0.0);
v110 = v109;
v111 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 200LL))(*(_QWORD *)(a1 + 712));
cocos2d::CCPoint::operator+(v111, &v145, v110);
v112 = *(_QWORD *)v108;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v146, &v145);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v112 + 184))(v108, v113);
v114 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
if ( !v114 )
v114 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plusBtn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v114 + 160LL))(v114);
v115 = CCMenuItemSpriteExtra::create((int)v114, 0, a1, (__int64)IDNameBrowserPopup::onFormNextFree);
*((_DWORD *)v115 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v115);
v116 = *(_QWORD *)v115;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v149, v147 - 55.0, v63);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v116 + 184))(v115, v117);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v150, 0.0, 0.0, 40.0, 40.0);
v119 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v118);
LOBYTE(v120) = 100;
(*(void (__fastcall **)(_QWORD *, __int64))(v119[40] + 40LL))(v119 + 40, v120);
v121 = *v119;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v149, 120.0, 28.0);
(*(void (__fastcall **)(_QWORD *, __int64))(v121 + 312))(v119, v122);
v123 = *v119;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v149, v147 + 26.0, v63);
(*(void (__fastcall **)(_QWORD *, __int64))(v123 + 184))(v119, v124);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v119,
0xFFFFFFFFLL);
v127 = CCTextInputNode::create(v126, v125, (__int64)"Name");
*(_QWORD *)(a1 + 720) = v127;
v128 = *(_QWORD *)v127;
v129 = (*(__int64 (__fastcall **)(_QWORD *))(*v119 + 200LL))(v119);
(*(void (__fastcall **)(char *, __int64))(v128 + 184))(v127, v129);
v130 = *(_QWORD *)(a1 + 720);
*(_DWORD *)(v130 + 564) = 1057803469;
CCTextInputNode::refreshLabel(v130);
v131 = *(_QWORD *)(a1 + 720);
*(_DWORD *)(v131 + 560) = 1122238464;
CCTextInputNode::refreshLabel(v131);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 720) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 720) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 720) + 608LL) = 24;
v150 = 0;
v151 = 0;
v152 = 0;
*(_QWORD *)&v150 = sub_14003D460(0x50u);
v151 = 65;
v152 = 79;
strcpy((char *)v150, "0123456789 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.");
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 720), (void **)&v150);
LOWORD(v145) = -21896;
v132 = *(_QWORD *)(a1 + 720);
*(_WORD *)(v132 + 572) = -21896;
*(_BYTE *)(v132 + 574) = -16;
CCTextInputNode::refreshLabel(v132);
v133 = *(_QWORD *)(a1 + 720);
*(_DWORD *)(v133 + 568) = 1053609165;
CCTextInputNode::refreshLabel(v133);
*(_QWORD *)(*(_QWORD *)(a1 + 720) + 600LL) = v55;
*(_BYTE *)(*(_QWORD *)(a1 + 720) + 424LL) = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 720) + 64LL))(*(_QWORD *)(a1 + 720), 900002);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 720),
20);
v149 = operator new(0x2C8u);
v134 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v149);
if ( v134 )
{
if ( ButtonSprite::init_1(
(__int64)v134,
(__int64)"Add",
50,
0,
1061997773,
1,
"goldFont.fnt",
(__int64)"GJ_button_01.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v134);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v134 + 8LL))(v134, 1);
LODWORD(v134) = 0;
}
}
v135 = CCMenuItemSpriteExtra::create((int)v134, 0, a1, (__int64)IDNameBrowserPopup::onFormAdd);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v135);
v136 = *(_QWORD *)v135;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v149, v147 + 132.0, v63);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v136 + 184))(v135, v137);
v138 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, "chatFont.fnt");
*(_QWORD *)(a1 + 728) = v138;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v138 + 160LL))(v138);
v139 = **(_QWORD **)(a1 + 728);
v140 = *(_QWORD *)(a1 + 728);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v146, 0.5, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v139 + 288))(v140, v141);
LOWORD(v145) = -14081;
BYTE2(v145) = 120;
(**(void (__fastcall ***)(__int64, int *))(*(_QWORD *)(a1 + 728) + 368LL))(*(_QWORD *)(a1 + 728) + 368LL, &v145);
v142 = **(_QWORD **)(a1 + 728);
v143 = *(_QWORD *)(a1 + 728);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, v147, v63 - 20.0);
(*(void (__fastcall **)(__int64, __int64))(v142 + 184))(v143, v144);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 728));
IDNameBrowserPopup::setFormID(a1, 0);
IDNameBrowserPopup::rebuildList(a1);
sub_14003D310((__int64)&v155);
return 1;
}
return result;
}