//
// AccountRegisterLayer::init from 0x586ad8 to 0x587300 (2088 bytes)
//
// 1 xrefs:
// > AccountRegisterLayer::create @ 0x585b50
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:59 +0000
//
GameManager *__fastcall AccountRegisterLayer::init(AccountRegisterLayer *this)
{
GameManager *v2; // r0
GameManager *v3; // r10
int v4; // r6
void (__fastcall *v5)(int, _DWORD *); // r7
const char *v6; // r2
int v7; // r6
void (__fastcall *v8)(int, _DWORD *); // r7
cocos2d::CCMenu *v9; // r0
int v10; // r0
cocos2d::CCArray *v11; // r0
cocos2d::CCArray *v12; // r8
const char *v13; // r1
ButtonSprite *v14; // r0
cocos2d::CCObject *v15; // r6
const char *v16; // r1
ButtonSprite *v17; // r0
cocos2d::CCObject *v18; // r6
const cocos2d::CCPoint *v19; // r11
float v20; // r6
float v21; // s17
float v22; // r0
int v23; // r11
const char *v24; // r2
int v25; // r0
int v26; // r8
void (__fastcall *v27)(int, float *); // r11
int v28; // r8
int v29; // r11
float v30; // s17
float v31; // r0
int v32; // r11
int v33; // r11
int v34; // r11
int v35; // r7
LoadingCircle *v36; // r0
cocos2d::CCLayerColor *v37; // r0
int v38; // r3
int v39; // r4
int (__fastcall *v40)(int, float *); // r5
GJAccountManager *v41; // r0
GJAccountManager *v42; // r0
void (__fastcall *v44)(int, float *); // [sp+Ch] [bp-80h]
float v45; // [sp+10h] [bp-7Ch] BYREF
float v46; // [sp+14h] [bp-78h]
float v47; // [sp+18h] [bp-74h] BYREF
float v48; // [sp+1Ch] [bp-70h]
_BYTE v49[8]; // [sp+20h] [bp-6Ch] BYREF
_BYTE v50[8]; // [sp+28h] [bp-64h] BYREF
_BYTE v51[8]; // [sp+30h] [bp-5Ch] BYREF
_BYTE v52[8]; // [sp+38h] [bp-54h] BYREF
_BYTE v53[8]; // [sp+40h] [bp-4Ch] BYREF
_BYTE v54[8]; // [sp+48h] [bp-44h] BYREF
_BYTE v55[8]; // [sp+50h] [bp-3Ch] BYREF
float v56[4]; // [sp+58h] [bp-34h] BYREF
int v57; // [sp+68h] [bp-24h] BYREF
int v58; // [sp+6Ch] [bp-20h]
int v59; // [sp+70h] [bp-1Ch]
_DWORD v60[4]; // [sp+74h] [bp-18h] BYREF
v2 = FLAlertLayer::init(this, 150);
v3 = v2;
if ( v2 )
{
*((_BYTE *)this + 468) = 1;
cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v45);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v60, 0.0, 0.0, 80.0, 80.0);
v4 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v60);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v4 + 456))(v4, 255);
v5 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v60, 400.0, 300.0);
v5(v4, v60);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v4, -1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v47, v45 * 0.5, v46 * 0.5);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v4 + 92))(v4, &v47);
v7 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Register Account", "bigFont.fnt", v6);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v60, v47, (float)(v48 + 150.0) - 16.0);
v8(v7, v60);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v7);
v9 = (cocos2d::CCMenu *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v7 + 80))(v7, 1058642330);
v10 = cocos2d::CCMenu::create(v9);
*((_DWORD *)this + 111) = v10;
v11 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
v10,
10);
v12 = (cocos2d::CCArray *)cocos2d::CCArray::create(v11);
v14 = ButtonSprite::create((ButtonSprite *)"Cancel", v13);
LODWORD(v56[2]) = AccountRegisterLayer::onClose;
v56[3] = 0.0;
v15 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v14,
0,
(int)this,
(int)AccountRegisterLayer::onClose,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v15);
cocos2d::CCArray::addObject(v12, v15);
v17 = ButtonSprite::create((ButtonSprite *)"Submit", v16);
v60[0] = AccountRegisterLayer::onSubmit;
v60[1] = 0;
v18 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v17,
0,
(int)this,
(int)AccountRegisterLayer::onSubmit,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v18);
cocos2d::CCArray::addObject(v12, v18);
v19 = *((const cocos2d::CCPoint **)this + 111);
v20 = v47;
v21 = (float)(v48 - 150.0) + 22.0;
v22 = (*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 115) + 96))(*((_DWORD *)this + 115));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, v20, v21 + *(float *)(LODWORD(v22) + 4));
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v56, v19);
GameToolbox::alignItemsHorisontally(*(float *)&v12, 15.0, (int)v56, 0);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v49, 300.0, 30.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v50, v47, v48 + 90.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v50);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
AccountRegisterLayer::createTextBackground((int)this, (int)v55, (int)v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v50);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Username: (shown to other players)", 0x22u);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
*((_DWORD *)this + 137) = AccountRegisterLayer::createTextLabel((int)this, (int)v55, (int)&v57, v56);
std::string::~string((int)&v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v50);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Username", 8u);
*((_DWORD *)this + 132) = AccountRegisterLayer::createTextInput((int)this, (int)v55, (int)v56, (int)&v57, 1);
std::string::~string((int)&v57);
v23 = *((_DWORD *)this + 132);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 0x3Eu);
CCTextInputNode::setAllowedChars(v23, (unsigned __int8 *)&v57);
std::string::~string((int)&v57);
*(_DWORD *)(*((_DWORD *)this + 132) + 424) = 15;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, -45.0);
cocos2d::CCPoint::operator+(v51, v50, v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v51);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
AccountRegisterLayer::createTextBackground((int)this, (int)v55, (int)v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v51);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Password:", 9u);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
*((_DWORD *)this + 138) = AccountRegisterLayer::createTextLabel((int)this, (int)v55, (int)&v57, v56);
std::string::~string((int)&v57);
v25 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v24);
*((_DWORD *)this + 139) = v25;
v26 = v25;
v27 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v25 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, 0.0);
v27(v26, v56);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 139) + 80))(*((_DWORD *)this + 139), 1053609165);
v28 = *((_DWORD *)this + 139);
v44 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v28 + 92);
v29 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 138) + 96))(*((_DWORD *)this + 138));
v30 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 138) + 164))(*((_DWORD *)this + 138));
v31 = (*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 138) + 84))(*((_DWORD *)this + 138));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (float)(v30 * v31) + 8.0, 0.0);
cocos2d::CCPoint::operator+(v56, v29, v55);
v44(v28, v56);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 139));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v51);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Password", 8u);
*((_DWORD *)this + 133) = AccountRegisterLayer::createTextInput((int)this, (int)v55, (int)v56, (int)&v57, 2);
std::string::~string((int)&v57);
v32 = *((_DWORD *)this + 133);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, &unk_B6B226, 0);
CCTextInputNode::setAllowedChars(v32, (unsigned __int8 *)&v57);
std::string::~string((int)&v57);
*(_DWORD *)(*((_DWORD *)this + 133) + 424) = 64;
*(_BYTE *)(*((_DWORD *)this + 133) + 433) = 1;
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 133), 1.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, -45.0);
cocos2d::CCPoint::operator+(v52, v51, v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v52);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
AccountRegisterLayer::createTextBackground((int)this, (int)v55, (int)v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v52);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Confirm Password:", 0x11u);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
*((_DWORD *)this + 140) = AccountRegisterLayer::createTextLabel((int)this, (int)v55, (int)&v57, v56);
std::string::~string((int)&v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v52);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Confirm Password", 0x10u);
*((_DWORD *)this + 134) = AccountRegisterLayer::createTextInput((int)this, (int)v55, (int)v56, (int)&v57, 3);
std::string::~string((int)&v57);
v33 = *((_DWORD *)this + 134);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, &unk_B6B226, 0);
CCTextInputNode::setAllowedChars(v33, (unsigned __int8 *)&v57);
std::string::~string((int)&v57);
*(_DWORD *)(*((_DWORD *)this + 134) + 424) = 64;
*(_BYTE *)(*((_DWORD *)this + 134) + 433) = 1;
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 134), 1.0);
CCTextInputNode::forceOffset(*((_DWORD *)this + 134));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, -45.0);
cocos2d::CCPoint::operator+(v53, v52, v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v53);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
AccountRegisterLayer::createTextBackground((int)this, (int)v55, (int)v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v53);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Email:", 6u);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
*((_DWORD *)this + 141) = AccountRegisterLayer::createTextLabel((int)this, (int)v55, (int)&v57, v56);
std::string::~string((int)&v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v53);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Email", 5u);
*((_DWORD *)this + 135) = AccountRegisterLayer::createTextInput((int)this, (int)v55, (int)v56, (int)&v57, 4);
std::string::~string((int)&v57);
v34 = *((_DWORD *)this + 135);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@.", 0x43u);
CCTextInputNode::setAllowedChars(v34, (unsigned __int8 *)&v57);
std::string::~string((int)&v57);
*(_DWORD *)(*((_DWORD *)this + 135) + 424) = 50;
CCTextInputNode::forceOffset(*((_DWORD *)this + 135));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 0.0, -45.0);
cocos2d::CCPoint::operator+(v54, v53, v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v54);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
AccountRegisterLayer::createTextBackground((int)this, (int)v55, (int)v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v54);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Verify Email:", 0xDu);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
*((_DWORD *)this + 142) = AccountRegisterLayer::createTextLabel((int)this, (int)v55, (int)&v57, v56);
std::string::~string((int)&v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, (const cocos2d::CCPoint *)v54);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v56, (const cocos2d::CCSize *)v49);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, "Verify Email", 0xCu);
*((_DWORD *)this + 136) = AccountRegisterLayer::createTextInput((int)this, (int)v55, (int)v56, (int)&v57, 4);
std::string::~string((int)&v57);
v35 = *((_DWORD *)this + 136);
v57 = 0;
v58 = 0;
v59 = 0;
std::string::__init(&v57, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@.", 0x43u);
CCTextInputNode::setAllowedChars(v35, (unsigned __int8 *)&v57);
std::string::~string((int)&v57);
*(_DWORD *)(*((_DWORD *)this + 136) + 424) = 50;
v36 = (LoadingCircle *)CCTextInputNode::forceOffset(*((_DWORD *)this + 136));
v37 = LoadingCircle::create(v36);
v38 = *((_DWORD *)this + 115);
*((_DWORD *)this + 143) = v37;
*((_DWORD *)v37 + 111) = v38;
*(_BYTE *)(*((_DWORD *)this + 143) + 448) = 1;
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 143));
LoadingCircle::show(*((cocos2d::CCNode ***)this + 143));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 143) + 172))(*((_DWORD *)this + 143), 0);
v39 = *(_DWORD *)(*((_DWORD *)this + 143) + 440);
v40 = *(int (__fastcall **)(int, float *))(*(_DWORD *)v39 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v45 * 0.5, v46 * 0.5);
v41 = (GJAccountManager *)v40(v39, v56);
v42 = (GJAccountManager *)GJAccountManager::sharedState(v41);
GJAccountManager::openRegister(v42);
}
return v3;
}