//
// AccountRegisterLayer::init from 0x14008cd00 to 0x14008da87 (3463 bytes)
//
// 5 xrefs:
// > AccountLayer::onRegister @ 0x14009367f
// > AccountLayer::onRegister @ 0x140093686
// > AccountLayer::onRegister @ 0x140093670
// > ??> @ 0x140716f60
// > ??> @ 0x140912950
//
// 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:59 +0000
//
// Hidden C++ exception states: #wind=2
bool __fastcall AccountRegisterLayer::init(__int64 a1)
{
bool result; // al
__int64 v3; // rcx
__int64 v4; // rax
__int64 v5; // rax
_QWORD *v6; // rdi
__int64 v7; // rdx
void (__fastcall *v8)(_QWORD *, __int64); // r8
__int64 v9; // rbx
__int64 v10; // rax
struct cocos2d::CCLabelBMFont *v11; // rdi
__int64 v12; // rbx
__int64 v13; // rax
__int64 v14; // rax
__int64 v15; // rcx
cocos2d::CCArray *v16; // rdi
int v17; // eax
struct cocos2d::CCObject *v18; // rbx
int v19; // eax
struct cocos2d::CCObject *v20; // rbx
__int64 v21; // rax
__int64 v22; // rbx
__int64 v23; // rax
__int64 v24; // rax
__int64 v25; // rax
__int64 v26; // rbx
__int64 v27; // rax
__int64 v28; // rax
__int64 v29; // rbx
__int64 v30; // rax
int v31; // eax
int v32; // eax
__int64 v33; // rax
__int64 v34; // rax
__int64 v35; // rbx
__int64 v36; // rax
__int64 v37; // rax
__int64 v38; // rbx
__int64 v39; // rax
struct cocos2d::CCLabelBMFont *v40; // rdi
__int64 v41; // rbx
__int64 v42; // rax
__int64 v43; // rbx
float v44; // xmm6_4
double v45; // xmm0_8
__int64 v46; // rax
__int64 v47; // rbx
__int64 v48; // rax
int v49; // eax
int v50; // eax
__int64 TextInput; // rax
__int64 v52; // rcx
__int64 v53; // rax
__int64 v54; // rax
__int64 v55; // rbx
__int64 v56; // rax
__int64 v57; // rax
__int64 v58; // rbx
__int64 v59; // rax
int v60; // eax
int v61; // eax
__int64 v62; // rax
__int64 v63; // rcx
__int64 v64; // rax
__int64 v65; // rax
__int64 v66; // rbx
__int64 v67; // rax
__int64 v68; // rax
__int64 v69; // rbx
__int64 v70; // rax
int v71; // eax
int v72; // eax
__int64 v73; // rax
__int64 v74; // rax
__int64 v75; // rbx
__int64 v76; // rax
__int64 v77; // rax
__int64 v78; // rbx
__int64 v79; // rax
int v80; // eax
int v81; // eax
cocos2d::CCLayerColor *v82; // rax
__int64 *v83; // rdi
__int64 v84; // rbx
__int64 v85; // rax
__int64 v86; // rax
__int128 v87; // [rsp+48h] [rbp-79h] BYREF
__int64 v88; // [rsp+58h] [rbp-69h]
__int64 v89; // [rsp+60h] [rbp-61h]
_BYTE v90[8]; // [rsp+70h] [rbp-51h] BYREF
__int128 *v91; // [rsp+78h] [rbp-49h] BYREF
_QWORD v92[2]; // [rsp+80h] [rbp-41h] BYREF
_BYTE v93[8]; // [rsp+90h] [rbp-31h] BYREF
_BYTE v94[8]; // [rsp+98h] [rbp-29h] BYREF
_BYTE v95[8]; // [rsp+A0h] [rbp-21h] BYREF
float v96; // [rsp+A8h] [rbp-19h] BYREF
float v97; // [rsp+ACh] [rbp-15h]
_BYTE v98[72]; // [rsp+B0h] [rbp-11h] BYREF
char v99; // [rsp+130h] [rbp+6Fh] BYREF
float v100; // [rsp+138h] [rbp+77h] BYREF
float v101; // [rsp+13Ch] [rbp+7Bh]
char v102; // [rsp+140h] [rbp+7Fh] BYREF
result = FLAlertLayer::init_1(a1, 150);
if ( result )
{
*(_BYTE *)(a1 + 596) = 1;
v4 = cocos2d::CCDirector::sharedDirector(v3);
cocos2d::CCDirector::getWinSize(v4, &v96);
v5 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v92, 0.0, 0.0, 80.0, 80.0);
v6 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v5);
v7 = v6[40];
v8 = *(void (__fastcall **)(_QWORD *, __int64))(v7 + 40);
LOBYTE(v7) = -1;
v8(v6 + 40, v7);
v9 = *v6;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v90, 400.0, 300.0);
(*(void (__fastcall **)(_QWORD *, __int64))(v9 + 312))(v6, v10);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v6,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v100, v96 * 0.5, v97 * 0.5);
(*(void (__fastcall **)(_QWORD *, float *))(*v6 + 184LL))(v6, &v100);
v11 = cocos2d::CCLabelBMFont::create("Register Account", (const char *)&qword_140704F78);
v12 = *(_QWORD *)v11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, v100, (float)(v101 + 150.0) - 16.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v12 + 184))(v11, v13);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v11);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v11 + 160LL))(v11);
v14 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v14;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v14, 10);
v16 = (cocos2d::CCArray *)cocos2d::CCArray::create(v15);
v17 = (unsigned int)ButtonSprite::create_1(
(int)"Cancel",
0,
0,
1.0,
0,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v18 = CCMenuItemSpriteExtra::create(v17, 0, a1, (__int64)AccountRegisterLayer::onClose);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v18);
cocos2d::CCArray::addObject(v16, v18);
v19 = (unsigned int)ButtonSprite::create_1(
(int)"Submit",
0,
0,
1.0,
0,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v20 = CCMenuItemSpriteExtra::create(v19, 0, a1, (__int64)AccountRegisterLayer::onSubmit);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v20);
cocos2d::CCArray::addObject(v16, v20);
v21 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 584) + 200LL))(*(_QWORD *)(a1 + 584));
v22 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v90,
v100,
(float)((float)(v101 - 150.0) + 22.0) + *(float *)(v21 + 4));
cocos2d::CCNode::convertToNodeSpace(v22, &v91, v23);
GameToolbox::alignItemsHorisontally((__int64)v16, 15.0, v24, 0);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v99, 300.0, 30.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v102, v100, v101 + 90.0);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
v26 = v25;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)&v102);
AccountRegisterLayer::createTextBackground(a1, v27, v26);
v91 = &v87;
v87 = 0;
v88 = 0;
v89 = 0;
*(_QWORD *)&v87 = sub_14003D460(0x30u);
v88 = 34;
v89 = 47;
strcpy((char *)v87, "Username: (shown to other players)");
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v90, (const struct cocos2d::CCSize *)&v99);
v29 = v28;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, (const struct cocos2d::CCPoint *)&v102);
*(_QWORD *)(a1 + 720) = AccountRegisterLayer::createTextLabel(a1, v30, &v87, v29);
v92[0] = &v87;
v88 = 8;
v89 = 15;
v87 = 0x656D616E72657355uLL;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
LODWORD(v29) = v31;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)&v102);
*(_QWORD *)(a1 + 680) = AccountRegisterLayer::createTextInput(a1, v32, v29, (unsigned int)&v87, 1);
v87 = 0;
v88 = 0;
v89 = 0;
*(_QWORD *)&v87 = sub_14003D460(0x40u);
v88 = 62;
v89 = 63;
strcpy((char *)v87, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 680), (void **)&v87);
*(_DWORD *)(*(_QWORD *)(a1 + 680) + 608LL) = 15;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v102, v93, v33);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v92, (const struct cocos2d::CCSize *)&v99);
v35 = v34;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v91, (const struct cocos2d::CCPoint *)v93);
AccountRegisterLayer::createTextBackground(a1, v36, v35);
v92[0] = &v87;
*((_QWORD *)&v87 + 1) = 58;
v88 = 9;
v89 = 15;
*(_QWORD *)&v87 = 0x64726F7773736150LL;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
v38 = v37;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v93);
*(_QWORD *)(a1 + 728) = AccountRegisterLayer::createTextLabel(a1, v39, &v87, v38);
v40 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 736) = v40;
v41 = *(_QWORD *)v40;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v41 + 288))(v40, v42);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 736) + 160LL))(*(_QWORD *)(a1 + 736));
v43 = *(_QWORD *)(a1 + 728);
v44 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v43 + 320LL))(v43);
v45 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v43 + 168LL))(v43);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, (float)(*(float *)&v45 * v44) + 8.0, 0.0);
v47 = v46;
v48 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 728) + 200LL))(*(_QWORD *)(a1 + 728));
cocos2d::CCPoint::operator+(v48, v90, v47);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 736) + 184LL))(*(_QWORD *)(a1 + 736), v90);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 736));
v92[0] = &v87;
v88 = 8;
v89 = 15;
v87 = 0x64726F7773736150uLL;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
LODWORD(v47) = v49;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v93);
TextInput = AccountRegisterLayer::createTextInput(a1, v50, v47, (unsigned int)&v87, 2);
*(_QWORD *)(a1 + 688) = TextInput;
v87 = 0;
v88 = 0;
v89 = 15;
LOBYTE(v87) = 0;
CCTextInputNode::setAllowedChars(TextInput, (void **)&v87);
*(_DWORD *)(*(_QWORD *)(a1 + 688) + 608LL) = 64;
*(_BYTE *)(*(_QWORD *)(a1 + 688) + 625LL) = 1;
v52 = *(_QWORD *)(a1 + 688);
*(_DWORD *)(v52 + 564) = 1065353216;
CCTextInputNode::refreshLabel(v52);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -45.0);
cocos2d::CCPoint::operator+(v93, v94, v53);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v92, (const struct cocos2d::CCSize *)&v99);
v55 = v54;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v91, (const struct cocos2d::CCPoint *)v94);
AccountRegisterLayer::createTextBackground(a1, v56, v55);
v92[0] = &v87;
v87 = 0;
v88 = 0;
v89 = 0;
*(_QWORD *)&v87 = sub_14003D460(0x20u);
v88 = 17;
v89 = 31;
strcpy((char *)v87, "Confirm Password:");
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
v58 = v57;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v94);
*(_QWORD *)(a1 + 744) = AccountRegisterLayer::createTextLabel(a1, v59, &v87, v58);
v92[0] = &v87;
v87 = 0;
v88 = 0;
v89 = 0;
*(_QWORD *)&v87 = sub_14003D460(0x20u);
v88 = 16;
v89 = 31;
strcpy((char *)v87, "Confirm Password");
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
LODWORD(v58) = v60;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v94);
v62 = AccountRegisterLayer::createTextInput(a1, v61, v58, (unsigned int)&v87, 3);
*(_QWORD *)(a1 + 696) = v62;
v87 = 0;
v88 = 0;
v89 = 15;
LOBYTE(v87) = 0;
CCTextInputNode::setAllowedChars(v62, (void **)&v87);
*(_DWORD *)(*(_QWORD *)(a1 + 696) + 608LL) = 64;
*(_BYTE *)(*(_QWORD *)(a1 + 696) + 625LL) = 1;
v63 = *(_QWORD *)(a1 + 696);
*(_DWORD *)(v63 + 564) = 1065353216;
CCTextInputNode::refreshLabel(v63);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -45.0);
cocos2d::CCPoint::operator+(v94, v95, v64);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v92, (const struct cocos2d::CCSize *)&v99);
v66 = v65;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v91, (const struct cocos2d::CCPoint *)v95);
AccountRegisterLayer::createTextBackground(a1, v67, v66);
v92[0] = &v87;
v87 = 0;
v88 = 6;
v89 = 15;
strcpy((char *)&v87, "Email:");
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
v69 = v68;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v95);
*(_QWORD *)(a1 + 752) = AccountRegisterLayer::createTextLabel(a1, v70, &v87, v69);
v92[0] = &v87;
v87 = 0;
v88 = 5;
v89 = 15;
strcpy((char *)&v87, "Email");
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
LODWORD(v69) = v71;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v95);
*(_QWORD *)(a1 + 704) = AccountRegisterLayer::createTextInput(a1, v72, v69, (unsigned int)&v87, 4);
v87 = 0;
v88 = 0;
v89 = 0;
*(_QWORD *)&v87 = sub_14003D460(0x50u);
v88 = 67;
v89 = 79;
strcpy((char *)v87, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@.");
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 704), (void **)&v87);
*(_DWORD *)(*(_QWORD *)(a1 + 704) + 608LL) = 50;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -45.0);
cocos2d::CCPoint::operator+(v95, v98, v73);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v92, (const struct cocos2d::CCSize *)&v99);
v75 = v74;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v91, (const struct cocos2d::CCPoint *)v98);
AccountRegisterLayer::createTextBackground(a1, v76, v75);
v92[0] = &v87;
v88 = 13;
v89 = 15;
strcpy((char *)&v87, "Verify Email:");
HIWORD(v87) = 0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
v78 = v77;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v98);
*(_QWORD *)(a1 + 760) = AccountRegisterLayer::createTextLabel(a1, v79, &v87, v78);
v92[0] = &v87;
v88 = 12;
v89 = 15;
strcpy((char *)&v87, "Verify Email");
BYTE13(v87) = 0;
HIWORD(v87) = 0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v91, (const struct cocos2d::CCSize *)&v99);
LODWORD(v78) = v80;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, (const struct cocos2d::CCPoint *)v98);
*(_QWORD *)(a1 + 712) = AccountRegisterLayer::createTextInput(a1, v81, v78, (unsigned int)&v87, 4);
v87 = 0;
v88 = 0;
v89 = 0;
*(_QWORD *)&v87 = sub_14003D460(0x50u);
v88 = 67;
v89 = 79;
strcpy((char *)v87, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@.");
CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 712), (void **)&v87);
*(_DWORD *)(*(_QWORD *)(a1 + 712) + 608LL) = 50;
v82 = LoadingCircle::create();
*(_QWORD *)(a1 + 768) = v82;
*((_QWORD *)v82 + 69) = *(_QWORD *)(a1 + 584);
*(_BYTE *)(*(_QWORD *)(a1 + 768) + 560LL) = 1;
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 768));
LoadingCircle::show(*(_QWORD *)(a1 + 768));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 768) + 336LL))(*(_QWORD *)(a1 + 768), 0);
v83 = *(__int64 **)(*(_QWORD *)(a1 + 768) + 544LL);
v84 = *v83;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, v96 * 0.5, v97 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v84 + 184))(v83, v85);
v86 = GJAccountManager::sharedState();
GJAccountManager::openRegister(v86);
return 1;
}
return result;
}