// // AccountRegisterLayer::init from 0x468380 to 0x468a78 (1784 bytes) // // 1 xrefs: // > AccountRegisterLayer::create @ 0x468164 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // bool AccountRegisterLayer::init(AccountRegisterLayer *a1) { int v2; // r11 cocos2d::CCDirector *v3; // r0 cocos2d::CCNode *v4; // r6 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7 cocos2d::CCLabelBMFont *v6; // r6 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCMenu *v8; // r0 cocos2d::CCArray *v9; // r0 cocos2d::CCArray *v10; // r8 const char *v11; // r1 ButtonSprite *v12; // r0 CCMenuItemSpriteExtra *v13; // r4 const char *v14; // r1 ButtonSprite *v15; // r0 CCMenuItemSpriteExtra *v16; // r4 cocos2d::CCMenu *m_buttonMenu; // r9 float x; // r4 float v19; // s17 float v20; // r0 cocos2d::CCPoint v21; // r1 CCTextInputNode *m_usernameField; // r7 cocos2d::CCPoint v23; // r1 CCTextInputNode *m_passwordField; // r9 CCTextInputNode *v25; // r0 cocos2d::CCPoint v26; // r1 CCTextInputNode *m_confirmPasswordField; // r9 CCTextInputNode *v28; // r0 cocos2d::CCPoint v29; // r1 CCTextInputNode *m_emailField; // r9 CCTextInputNode *v31; // r0 cocos2d::CCPoint v32; // r1 CCTextInputNode *m_verifyEmailField; // r7 CCTextInputNode *v34; // r0 LoadingCircle *v35; // r0 cocos2d::CCLayer *m_mainLayer; // r3 LoadingCircle *m_loadingCircle; // r0 cocos2d::CCSprite *m_sprite; // r5 void (__fastcall *v39)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6 float v41; // r2 float v42; // r3 const char *v43; // [sp+10h] [bp-74h] BYREF cocos2d::CCSize v44; // [sp+14h] [bp-70h] BYREF cocos2d::CCPoint v45; // [sp+1Ch] [bp-68h] BYREF cocos2d::CCSize v46; // [sp+24h] [bp-60h] BYREF cocos2d::CCPoint v47; // [sp+2Ch] [bp-58h] BYREF cocos2d::CCPoint v48; // [sp+34h] [bp-50h] BYREF cocos2d::CCPoint v49; // [sp+3Ch] [bp-48h] BYREF cocos2d::CCPoint v50; // [sp+44h] [bp-40h] BYREF cocos2d::CCPoint v51; // [sp+4Ch] [bp-38h] BYREF cocos2d::CCPoint v52; // [sp+54h] [bp-30h] BYREF cocos2d::CCPoint v53; // [sp+5Ch] [bp-28h] BYREF void (*v54)(AccountRegisterLayer *, cocos2d::CCObject *); // [sp+64h] [bp-20h] int v55; // [sp+68h] [bp-1Ch] cocos2d::CCRect v56; // [sp+6Ch] [bp-18h] BYREF cocos2d::CCSize v57; // 0:^0.8 cocos2d::CCRect v58; // 0:kr00_16.16 cocos2d::CCSize v59; // 0:r3.4,4:^0.4 cocos2d::CCSize v60; // 0:r3.4,4:^0.4 cocos2d::CCSize v61; // 0:r3.4,4:^0.4 cocos2d::CCSize v62; // 0:r3.4,4:^0.4 cocos2d::CCSize v63; // 0:r3.4,4:^0.4 v2 = FLAlertLayer::init(a1, (cocos2d::_ccColor4B)150); if ( v2 ) { a1->m_noElasticity = 1; v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v44, v3); cocos2d::CCRect::CCRect(&v56, 0.0, 0.0, 80.0, 80.0); v58.origin.x = v41; v58.origin.y = v42; v58.size = v57; v4 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v56, v58); ((void (__fastcall *)(cocos2d::CCNode *, int))v4->__vftable[1].~CCNode_0)(v4, 255); setContentSize = v4->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v56, 400.0, 300.0); setContentSize(v4, (const cocos2d::CCSize *)&v56); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v4, -1); cocos2d::CCPoint::CCPoint(&v45, v44.width * 0.5, v44.height * 0.5); v4->setPosition(v4, &v45); v6 = cocos2d::CCLabelBMFont::create(); setPosition = v6->setPosition; cocos2d::CCPoint::CCPoint(&v56.origin, v45.x, (float)(v45.y + 150.0) - 16.0); setPosition(v6, &v56.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v6); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v6->setScale)(v6, 1058642330); v8 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v8; v9 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, int))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v8, 10); v10 = (cocos2d::CCArray *)cocos2d::CCArray::create(v9); v12 = ButtonSprite::create((ButtonSprite *)"Cancel", v11); v54 = AccountRegisterLayer::onClose; v55 = 0; v13 = CCMenuItemSpriteExtra::create( v12, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(AccountRegisterLayer::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v13); cocos2d::CCArray::addObject(v10, v13); v15 = ButtonSprite::create((ButtonSprite *)"Submit", v14); LODWORD(v56.origin.x) = AccountRegisterLayer::onSubmit; v56.origin.y = 0.0; v16 = CCMenuItemSpriteExtra::create( v15, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(AccountRegisterLayer::onSubmit, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v16); cocos2d::CCArray::addObject(v10, v16); m_buttonMenu = a1->m_buttonMenu; x = v45.x; v19 = (float)(v45.y - 150.0) + 22.0; v20 = ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_mainLayer->getPosition)(a1->m_mainLayer); cocos2d::CCPoint::CCPoint(&v52, x, v19 + *(float *)(LODWORD(v20) + 4)); cocos2d::CCNode::convertToNodeSpace(&v53, m_buttonMenu, &v52); GameToolbox::alignItemsHorisontally(v10, 15.0, (cocos2d::CCPoint)(unsigned int)&v53, 0); cocos2d::CCSize::CCSize(&v46, 300.0, 30.0); cocos2d::CCPoint::CCPoint(&v47, v45.x, v45.y + 90.0); cocos2d::CCPoint::CCPoint(&v52, &v47); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); LODWORD(v21.y) = &v53; LODWORD(v21.x) = &v52; AccountRegisterLayer::createTextBackground(a1, v21, v59); cocos2d::CCPoint::CCPoint(&v52, &v47); sub_776584((int)&v51, "Username: (shown to other players)"); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); a1->m_usernameLabel = AccountRegisterLayer::createTextLabel((int)a1, (int)&v52, (int)&v51, &v53.x); sub_774008(&v51); cocos2d::CCPoint::CCPoint(&v52, &v47); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); sub_776584((int)&v51, "Username"); a1->m_usernameField = AccountRegisterLayer::createTextInput( (TextInputDelegate *)a1, &v52, &v53.x, (const char **)&v51, 1); sub_774008(&v51); m_usernameField = a1->m_usernameField; sub_776584((int)&v53, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); CCTextInputNode::setAllowedChars((int)m_usernameField, (int)&v53); sub_774008(&v53); a1->m_usernameField->m_maxLabelLength = 15; cocos2d::CCPoint::CCPoint(&v53, 0.0, -45.0); cocos2d::CCPoint::operator+(&v48, &v47, &v53); cocos2d::CCPoint::CCPoint(&v52, &v48); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); LODWORD(v23.y) = &v53; LODWORD(v23.x) = &v52; AccountRegisterLayer::createTextBackground(a1, v23, v60); cocos2d::CCPoint::CCPoint(&v52, &v48); sub_776584((int)&v51, "Password:"); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); a1->m_passwordLabel = AccountRegisterLayer::createTextLabel((int)a1, (int)&v52, (int)&v51, &v53.x); sub_774008(&v51); cocos2d::CCPoint::CCPoint(&v52, &v48); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); sub_776584((int)&v51, "Password"); a1->m_passwordField = AccountRegisterLayer::createTextInput( (TextInputDelegate *)a1, &v52, &v53.x, (const char **)&v51, 2); sub_774008(&v51); m_passwordField = a1->m_passwordField; sub_776584((int)&v53, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*'();:@+$,/?#[]&"); CCTextInputNode::setAllowedChars((int)m_passwordField, (int)&v53); sub_774008(&v53); v25 = a1->m_passwordField; v25->m_maxLabelLength = 20; v25->m_usePasswordChar = 1; CCTextInputNode::setMaxLabelScale(v25, 1.0); cocos2d::CCPoint::CCPoint(&v53, 0.0, -45.0); cocos2d::CCPoint::operator+(&v49, &v48, &v53); cocos2d::CCPoint::CCPoint(&v52, &v49); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); LODWORD(v26.y) = &v53; LODWORD(v26.x) = &v52; AccountRegisterLayer::createTextBackground(a1, v26, v61); cocos2d::CCPoint::CCPoint(&v52, &v49); sub_776584((int)&v51, "Confirm Password:"); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); a1->m_confirmPasswordLabel = AccountRegisterLayer::createTextLabel((int)a1, (int)&v52, (int)&v51, &v53.x); sub_774008(&v51); cocos2d::CCPoint::CCPoint(&v52, &v49); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); sub_776584((int)&v51, "Confirm Password"); a1->m_confirmPasswordField = AccountRegisterLayer::createTextInput( (TextInputDelegate *)a1, &v52, &v53.x, (const char **)&v51, 3); sub_774008(&v51); m_confirmPasswordField = a1->m_confirmPasswordField; sub_776584((int)&v53, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*'();:@+$,/?#[]&"); CCTextInputNode::setAllowedChars((int)m_confirmPasswordField, (int)&v53); sub_774008(&v53); v28 = a1->m_confirmPasswordField; v28->m_maxLabelLength = 20; v28->m_usePasswordChar = 1; CCTextInputNode::setMaxLabelScale(v28, 1.0); CCTextInputNode::forceOffset(a1->m_confirmPasswordField); cocos2d::CCPoint::CCPoint(&v53, 0.0, -45.0); cocos2d::CCPoint::operator+(&v50, &v49, &v53); cocos2d::CCPoint::CCPoint(&v52, &v50); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); LODWORD(v29.y) = &v53; LODWORD(v29.x) = &v52; AccountRegisterLayer::createTextBackground(a1, v29, v62); cocos2d::CCPoint::CCPoint(&v52, &v50); sub_776584((int)&v51, "Email:"); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); a1->m_emailLabel = AccountRegisterLayer::createTextLabel((int)a1, (int)&v52, (int)&v51, &v53.x); sub_774008(&v51); cocos2d::CCPoint::CCPoint(&v52, &v50); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); sub_776584((int)&v51, "Email"); a1->m_emailField = AccountRegisterLayer::createTextInput( (TextInputDelegate *)a1, &v52, &v53.x, (const char **)&v51, 4); sub_774008(&v51); m_emailField = a1->m_emailField; sub_776584((int)&v53, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@."); CCTextInputNode::setAllowedChars((int)m_emailField, (int)&v53); sub_774008(&v53); v31 = a1->m_emailField; v31->m_maxLabelLength = 50; CCTextInputNode::forceOffset(v31); cocos2d::CCPoint::CCPoint(&v53, 0.0, -45.0); cocos2d::CCPoint::operator+(&v51, &v50, &v53); cocos2d::CCPoint::CCPoint(&v52, &v51); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); LODWORD(v32.y) = &v53; LODWORD(v32.x) = &v52; AccountRegisterLayer::createTextBackground(a1, v32, v63); cocos2d::CCPoint::CCPoint(&v52, &v51); sub_776584((int)&v43, "Verify Email:"); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); a1->m_verifyEmailLabel = AccountRegisterLayer::createTextLabel((int)a1, (int)&v52, (int)&v43, &v53.x); sub_774008(&v43); cocos2d::CCPoint::CCPoint(&v52, &v51); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v53, &v46); sub_776584((int)&v43, "Verify Email"); a1->m_verifyEmailField = AccountRegisterLayer::createTextInput((TextInputDelegate *)a1, &v52, &v53.x, &v43, 4); sub_774008(&v43); m_verifyEmailField = a1->m_verifyEmailField; sub_776584((int)&v53, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@."); CCTextInputNode::setAllowedChars((int)m_verifyEmailField, (int)&v53); sub_774008(&v53); v34 = a1->m_verifyEmailField; v34->m_maxLabelLength = 50; CCTextInputNode::forceOffset(v34); v35 = LoadingCircle::create(); m_mainLayer = a1->m_mainLayer; a1->m_loadingCircle = v35; v35->m_parentLayer = m_mainLayer; m_loadingCircle = a1->m_loadingCircle; m_loadingCircle->m_fade = 1; cocos2d::CCObject::retain(m_loadingCircle); LoadingCircle::show(a1->m_loadingCircle); a1->m_loadingCircle->setVisible(a1->m_loadingCircle, 0); m_sprite = a1->m_loadingCircle->m_sprite; v39 = m_sprite->setPosition; cocos2d::CCPoint::CCPoint(&v53, v44.width * 0.5, v44.height * 0.5); v39(m_sprite, &v53); } return v2; }