// // AccountRegisterLayer::init from 0x100495550 to 0x10049648e (3902 bytes) // // 2 xrefs: // > AccountRegisterLayer::create @ 0x100495516 // > @ 0x100943f60 // // 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 __fastcall AccountRegisterLayer::init(AccountRegisterLayer *a1) { bool result; // al cocos2d::extension::CCScale9Sprite *v3; // r14 cocos2d::CCLabelBMFont *v4; // r14 cocos2d::CCMenu *v5; // rax cocos2d::CCLayer *m_mainLayer; // rdi cocos2d::CCMenu *v7; // rsi cocos2d::CCArray *v8; // r14 ButtonSprite *v9; // rax CCMenuItemSpriteExtra *v10; // r15 ButtonSprite *v11; // rax CCMenuItemSpriteExtra *v12; // r15 cocos2d::CCMenu *m_buttonMenu; // r15 cocos2d::extension::CCScale9Sprite *v14; // r14 double v15; // xmm0_8 CCTextInputNode *m_usernameField; // r14 cocos2d::extension::CCScale9Sprite *v17; // r15 double v18; // xmm0_8 CCTextInputNode *m_passwordField; // r14 CCTextInputNode *v20; // rdi cocos2d::extension::CCScale9Sprite *v21; // r15 CCTextInputNode *m_confirmPasswordField; // r14 CCTextInputNode *v23; // rdi cocos2d::extension::CCScale9Sprite *v24; // r15 double v25; // xmm0_8 CCTextInputNode *m_emailField; // r14 CCTextInputNode *v27; // rdi cocos2d::extension::CCScale9Sprite *v28; // r15 double v29; // xmm0_8 CCTextInputNode *m_verifyEmailField; // r14 CCTextInputNode *v31; // rdi LoadingCircle *v32; // rax cocos2d::CCSprite *m_sprite; // rbx __int64 v34; // [rsp+0h] [rbp-210h] BYREF _QWORD v35[2]; // [rsp+8h] [rbp-208h] BYREF void *__p; // [rsp+18h] [rbp-1F8h] char v37; // [rsp+20h] [rbp-1F0h] BYREF _BYTE v38[23]; // [rsp+21h] [rbp-1EFh] BYREF std::string v39; // [rsp+38h] [rbp-1D8h] BYREF char v40; // [rsp+50h] [rbp-1C0h] BYREF _BYTE v41[23]; // [rsp+51h] [rbp-1BFh] BYREF char v42; // [rsp+68h] [rbp-1A8h] BYREF _BYTE v43[23]; // [rsp+69h] [rbp-1A7h] BYREF std::string v44; // [rsp+80h] [rbp-190h] BYREF void *v45[3]; // [rsp+98h] [rbp-178h] BYREF void *v46[3]; // [rsp+B0h] [rbp-160h] BYREF std::string v47; // [rsp+C8h] [rbp-148h] BYREF char v48[16]; // [rsp+E0h] [rbp-130h] BYREF void *v49; // [rsp+F0h] [rbp-120h] std::string v50; // [rsp+F8h] [rbp-118h] BYREF std::string v51; // [rsp+110h] [rbp-100h] BYREF unsigned __int64 v52; // [rsp+128h] [rbp-E8h] BYREF __int64 v53; // [rsp+130h] [rbp-E0h] BYREF char v54; // [rsp+138h] [rbp-D8h] BYREF char v55[15]; // [rsp+139h] [rbp-D7h] BYREF void *v56; // [rsp+148h] [rbp-C8h] char v57; // [rsp+150h] [rbp-C0h] BYREF _BYTE v58[23]; // [rsp+151h] [rbp-BFh] BYREF char v59; // [rsp+168h] [rbp-A8h] BYREF void *v60[3]; // [rsp+169h] [rbp-A7h] BYREF float v61; // [rsp+184h] [rbp-8Ch] float v62; // [rsp+188h] [rbp-88h] float v63; // [rsp+18Ch] [rbp-84h] BYREF float v64; // [rsp+190h] [rbp-80h] unsigned __int64 v65; // [rsp+194h] [rbp-7Ch] BYREF __int64 v66; // [rsp+19Ch] [rbp-74h] BYREF unsigned __int64 v67; // [rsp+1A4h] [rbp-6Ch] BYREF unsigned __int64 v68; // [rsp+1ACh] [rbp-64h] BYREF float v69; // [rsp+1B4h] [rbp-5Ch] BYREF float v70; // [rsp+1B8h] [rbp-58h] __m128 v71; // [rsp+1BCh] [rbp-54h] BYREF unsigned __int64 v72[2]; // [rsp+1CCh] [rbp-44h] BYREF float v73[2]; // [rsp+1DCh] [rbp-34h] BYREF bool v74; // [rsp+1E7h] [rbp-29h] cocos2d::CCRect v75; // 0:xmm0_8.8,8:xmm1_8.8 cocos2d::CCRect v76; // 0:xmm0_8.8,8:xmm1_8.8 cocos2d::CCRect v77; // 0:xmm0_8.8,8:xmm1_8.8 cocos2d::CCRect v78; // 0:xmm0_8.8,8:xmm1_8.8 cocos2d::CCRect v79; // 0:xmm0_8.8,8:xmm1_8.8 result = FLAlertLayer::init_1(a1, 150); if ( result ) { v74 = result; a1->m_noElasticity = 1; cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v63); v75.origin = 0; v75.size = 0; sub_10028CC00((__int64)v72, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u); v3 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", v75); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v3->setOpacity)(v3, 255); sub_10028CBF0((float *)v72, 400.0, 300.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v3->setContentSize)(v3, v72); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v3, 0xFFFFFFFFLL); sub_10028CBE0(&v69, v63 * 0.5, v64 * 0.5); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v3->setPosition)(v3, &v69); v4 = cocos2d::CCLabelBMFont::create_3("Register Account", "bigFont.fnt"); sub_10028CBE0((float *)v72, v69, (float)(v70 + 150.0) + -16.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v4->setPosition)(v4, v72); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v4); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v4->setScale)(v4, 0.60000002); v5 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v5; m_mainLayer = a1->m_mainLayer; v7 = v5; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))m_mainLayer->addChild_0)(m_mainLayer, v5, 10); v8 = (cocos2d::CCArray *)sub_10071F9E0(m_mainLayer, v7); v9 = sub_100092A30("Cancel"); v10 = CCMenuItemSpriteExtra::create( v9, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)AccountRegisterLayer::onClose); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v10); sub_10071FCD0(v8, v10); v11 = sub_100092A30("Submit"); v12 = CCMenuItemSpriteExtra::create( v11, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)AccountRegisterLayer::onSubmit); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v12); sub_10071FCD0(v8, v12); m_buttonMenu = a1->m_buttonMenu; v61 = v69; v62 = (float)(v70 + -150.0) + 22.0; v75.size = (cocos2d::CCSize)LODWORD(v62); v75.size.width = v62 + *(float *)(((__int64 (__fastcall *)(cocos2d::CCLayer *))a1->m_mainLayer->getPosition)(a1->m_mainLayer) + 4); sub_10028CBE0(v71.f32, v61, v75.size.width); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v72, (const cocos2d::CCPoint *)m_buttonMenu); GameToolbox::alignItemsHorisontally(v8, 15.0, (cocos2d::CCPoint)v75.size, (bool)v72); sub_10028CBF0(v73, 300.0, 30.0); sub_10028CBE0((float *)&v52, v69, v70 + 90.0); sub_10028CC60(&v65, (double *)&v52); sub_10028CFC0(&v67, v73); v75.size = 0; sub_10028CC00((__int64)v72, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v75.origin = sub_10028D180(&v71, v72); v14 = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", v75); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v14->setContentSize)(v14, &v67); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v14, 1); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v14->setOpacity)(v14, 100); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v14->setPosition)(v14, &v65); sub_10028CC60(v72, (double *)&v52); __p = operator new(0x28u); v35[0] = 41; v35[1] = 34; strcpy((char *)__p, "Username: (shown to other players)"); sub_10028CFC0(&v71, v73); a1->m_usernameLabel = (cocos2d::CCLabelBMFont *)AccountRegisterLayer::createTextLabel(a1, v72, v35, &v71); if ( (v35[0] & 1) != 0 ) operator delete(__p); v15 = sub_10028CC60(v72, (double *)&v52); sub_10028CFC0(&v71, v73); v37 = 16; strcpy(v38, "Username"); m_usernameField = (CCTextInputNode *)AccountRegisterLayer::createTextInput(a1, v72, &v71, &v37, 1, v15); a1->m_usernameField = m_usernameField; if ( (v37 & 1) != 0 ) { operator delete(*(void **)&v38[15]); m_usernameField = a1->m_usernameField; } v39.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u); v39.__r_.__value_.__r.__words[0] = 65; v39.__r_.__value_.__l.__size_ = 62; strcpy(v39.__r_.__value_.__l.__data_, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); CCTextInputNode::setAllowedChars((std::string *)m_usernameField, &v39); if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v39.__r_.__value_.__l.__data_); a1->m_usernameField->m_maxLabelLength = 15; sub_10028CBE0((float *)v72, 0.0, -45.0); sub_10028CCE0((double *)&v65, &v52, v72); sub_10028CC60(&v67, (double *)&v65); sub_10028CFC0(&v68, v73); v76.size = 0; sub_10028CC00((__int64)v72, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v76.origin = sub_10028D180(&v71, v72); v17 = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", v76); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v17->setContentSize)(v17, &v68); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v17, 1); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v17->setOpacity)(v17, 100); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v17->setPosition)(v17, &v67); sub_10028CC60(v72, (double *)&v65); v40 = 18; strcpy(v41, "Password:"); sub_10028CFC0(&v71, v73); a1->m_passwordLabel = (cocos2d::CCLabelBMFont *)AccountRegisterLayer::createTextLabel(a1, v72, &v40, &v71); if ( (v40 & 1) != 0 ) operator delete(*(void **)&v41[15]); v18 = sub_10028CC60(v72, (double *)&v65); sub_10028CFC0(&v71, v73); v42 = 16; strcpy(v43, "Password"); m_passwordField = (CCTextInputNode *)AccountRegisterLayer::createTextInput(a1, v72, &v71, &v42, 2, v18); a1->m_passwordField = m_passwordField; if ( (v42 & 1) != 0 ) { operator delete(*(void **)&v43[15]); m_passwordField = a1->m_passwordField; } v44.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x58u); v44.__r_.__value_.__r.__words[0] = 89; v44.__r_.__value_.__l.__size_ = 84; strcpy( v44.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*'();:@+$,/?#[]&"); CCTextInputNode::setAllowedChars((std::string *)m_passwordField, &v44); if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v44.__r_.__value_.__l.__data_); v20 = a1->m_passwordField; v20->m_maxLabelLength = 20; v20->m_usePasswordChar = 1; CCTextInputNode::setMaxLabelScale(v20, 1.0); sub_10028CBE0((float *)v72, 0.0, -45.0); sub_10028CCE0((double *)&v67, &v65, v72); sub_10028CC60(&v68, (double *)&v67); sub_10028CFC0(&v66, v73); v77.size = 0; sub_10028CC00((__int64)v72, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v77.origin = sub_10028D180(&v71, v72); v21 = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", v77); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64 *))v21->setContentSize)(v21, &v66); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v21, 1); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v21->setOpacity)(v21, 100); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v21->setPosition)(v21, &v68); sub_10028CC60(v72, (double *)&v67); strcpy((char *)v45, "\"Confirm Password:"); sub_10028CFC0(&v71, v73); a1->m_confirmPasswordLabel = (cocos2d::CCLabelBMFont *)AccountRegisterLayer::createTextLabel(a1, v72, v45, &v71); if ( ((__int64)v45[0] & 1) != 0 ) operator delete(v45[2]); sub_10028CC60(v72, (double *)&v67); sub_10028CFC0(&v71, v73); strcpy((char *)v46, " Confirm Password"); m_confirmPasswordField = (CCTextInputNode *)AccountRegisterLayer::createTextInput( a1, v72, &v71, v46, 3, 1.757001349190059e-152); a1->m_confirmPasswordField = m_confirmPasswordField; if ( ((__int64)v46[0] & 1) != 0 ) { operator delete(v46[2]); m_confirmPasswordField = a1->m_confirmPasswordField; } v47.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x58u); v47.__r_.__value_.__r.__words[0] = 89; v47.__r_.__value_.__l.__size_ = 84; strcpy( v47.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*'();:@+$,/?#[]&"); CCTextInputNode::setAllowedChars((std::string *)m_confirmPasswordField, &v47); if ( (*(_BYTE *)&v47.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v47.__r_.__value_.__l.__data_); v23 = a1->m_confirmPasswordField; v23->m_maxLabelLength = 20; v23->m_usePasswordChar = 1; CCTextInputNode::setMaxLabelScale(v23, 1.0); CCTextInputNode::forceOffset(a1->m_confirmPasswordField); sub_10028CBE0((float *)v72, 0.0, -45.0); sub_10028CCE0((double *)&v68, &v67, v72); sub_10028CC60(&v66, (double *)&v68); sub_10028CFC0(&v53, v73); v78.size = 0; sub_10028CC00((__int64)v72, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v78.origin = sub_10028D180(&v71, v72); v24 = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", v78); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64 *))v24->setContentSize)(v24, &v53); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v24, 1); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v24->setOpacity)(v24, 100); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64 *))v24->setPosition)(v24, &v66); sub_10028CC60(v72, (double *)&v68); v54 = 12; strcpy(v55, "Email:"); sub_10028CFC0(&v71, v73); a1->m_emailLabel = (cocos2d::CCLabelBMFont *)AccountRegisterLayer::createTextLabel(a1, v72, &v54, &v71); if ( (v54 & 1) != 0 ) operator delete(v56); v25 = sub_10028CC60(v72, (double *)&v68); sub_10028CFC0(&v71, v73); strcpy(v48, "\nEmail"); m_emailField = (CCTextInputNode *)AccountRegisterLayer::createTextInput(a1, v72, &v71, v48, 4, v25); a1->m_emailField = m_emailField; if ( (v48[0] & 1) != 0 ) { operator delete(v49); m_emailField = a1->m_emailField; } v50.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x48u); v50.__r_.__value_.__r.__words[0] = 73; v50.__r_.__value_.__l.__size_ = 67; strcpy(v50.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@."); CCTextInputNode::setAllowedChars((std::string *)m_emailField, &v50); if ( (*(_BYTE *)&v50.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v50.__r_.__value_.__l.__data_); v27 = a1->m_emailField; v27->m_maxLabelLength = 50; CCTextInputNode::forceOffset(v27); sub_10028CBE0((float *)v72, 0.0, -45.0); sub_10028CCE0((double *)&v66, &v68, v72); sub_10028CC60(&v53, (double *)&v66); sub_10028CFC0(&v34, v73); v79.size = 0; sub_10028CC00((__int64)v72, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v79.origin = sub_10028D180(&v71, v72); v28 = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", v79); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64 *))v28->setContentSize)(v28, &v34); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v28, 1); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v28->setOpacity)(v28, 100); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64 *))v28->setPosition)(v28, &v53); sub_10028CC60(v72, (double *)&v66); v57 = 26; strcpy(v58, "Verify Email:"); sub_10028CFC0(&v71, v73); a1->m_verifyEmailLabel = (cocos2d::CCLabelBMFont *)AccountRegisterLayer::createTextLabel(a1, v72, &v57, &v71); if ( (v57 & 1) != 0 ) operator delete(*(void **)&v58[15]); v29 = sub_10028CC60(v72, (double *)&v66); sub_10028CFC0(&v71, v73); v59 = 24; strcpy((char *)v60, "Verify Email"); m_verifyEmailField = (CCTextInputNode *)AccountRegisterLayer::createTextInput(a1, v72, &v71, &v59, 4, v29); a1->m_verifyEmailField = m_verifyEmailField; if ( (v59 & 1) != 0 ) { operator delete(*(void **)((char *)&v60[1] + 7)); m_verifyEmailField = a1->m_verifyEmailField; } v51.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x48u); v51.__r_.__value_.__r.__words[0] = 73; v51.__r_.__value_.__l.__size_ = 67; strcpy(v51.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@."); CCTextInputNode::setAllowedChars((std::string *)m_verifyEmailField, &v51); if ( (*(_BYTE *)&v51.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v51.__r_.__value_.__l.__data_); v31 = a1->m_verifyEmailField; v31->m_maxLabelLength = 50; CCTextInputNode::forceOffset(v31); v32 = LoadingCircle::create(); a1->m_loadingCircle = v32; v32->m_parentLayer = a1->m_mainLayer; v32->m_fade = 1; cocos2d::CCObject::retain(v32); LoadingCircle::show(a1->m_loadingCircle); ((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_loadingCircle->setVisible)(a1->m_loadingCircle, 0); m_sprite = a1->m_loadingCircle->m_sprite; sub_10028CBE0((float *)v72, v63 * 0.5, 0.5 * v64); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))m_sprite->setPosition)(m_sprite, v72); return v74; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source