// // AccountLoginLayer::init from 0x46956c to 0x469b2e (1474 bytes) // // 1 xrefs: // > AccountLoginLayer::create @ 0x469c40 // // 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 // int __fastcall AccountLoginLayer::init(AccountLoginLayer *a1, char **a2) { int v3; // r11 cocos2d::CCDirector *v4; // r0 cocos2d::CCLayer *v5; // r0 AccountLoginLayer_vtbl *v6; // r3 cocos2d::CCNode *v7; // r7 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r6 cocos2d::CCLabelBMFont *v9; // r10 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCMenu *v11; // r0 cocos2d::CCArray *v12; // r0 cocos2d::CCArray *v13; // r7 const char *v14; // r1 ButtonSprite *v15; // r0 CCMenuItemSpriteExtra *v16; // r10 const char *v17; // r1 ButtonSprite *v18; // r0 CCMenuItemSpriteExtra *v19; // r6 cocos2d::CCNode *m_buttonMenu; // r10 float v21; // s17 int v22; // r0 cocos2d::CCPoint v23; // r1 cocos2d::CCPoint v24; // r1 cocos2d::CCPoint v25; // r1 CCTextInputNode *TextInput; // r9 int m_usernameInput; // r9 char *v28; // r2 cocos2d::CCPoint v29; // r1 cocos2d::CCPoint v30; // r1 cocos2d::CCPoint v31; // r1 CCTextInputNode *v32; // r9 CCTextInputNode *m_passwordInput; // r0 ButtonSprite *v34; // r0 CCMenuItemSpriteExtra *v35; // r9 ButtonSprite *v36; // r0 CCMenuItemSpriteExtra *v37; // r8 cocos2d::CCNode *v38; // r10 float v39; // r8 float v40; // s17 float v41; // r0 cocos2d::CCPoint v42; // r2 LoadingCircle *v43; // r0 cocos2d::CCLayer *m_mainLayer; // r3 LoadingCircle *m_loadingCircle; // r0 cocos2d::CCSprite *m_sprite; // r4 void (__fastcall *v47)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5 float v49; // r2 float v50; // r3 cocos2d::CCSize v51; // [sp+0h] [bp-8Ch] cocos2d::CCSize v52; // [sp+0h] [bp-8Ch] cocos2d::CCSize v53; // [sp+0h] [bp-8Ch] cocos2d::CCSize v54; // [sp+0h] [bp-8Ch] char *v55; // [sp+4h] [bp-88h] char *v56; // [sp+4h] [bp-88h] char *v57; // [sp+8h] [bp-84h] char *v58; // [sp+8h] [bp-84h] float v59; // [sp+10h] [bp-7Ch] float v60; // [sp+10h] [bp-7Ch] float x; // [sp+1Ch] [bp-70h] cocos2d::CCSize v63; // [sp+24h] [bp-68h] BYREF cocos2d::CCPoint v64; // [sp+2Ch] [bp-60h] BYREF cocos2d::CCSize v65; // [sp+34h] [bp-58h] BYREF cocos2d::CCPoint v66; // [sp+3Ch] [bp-50h] BYREF cocos2d::CCPoint v67; // [sp+44h] [bp-48h] BYREF cocos2d::CCPoint v68; // [sp+4Ch] [bp-40h] BYREF cocos2d::CCPoint v69; // [sp+54h] [bp-38h] BYREF void (*v70)(AccountLoginLayer *, cocos2d::CCObject *); // [sp+5Ch] [bp-30h] int v71; // [sp+60h] [bp-2Ch] void (*v72)(AccountLoginLayer *, cocos2d::CCObject *); // [sp+64h] [bp-28h] int v73; // [sp+68h] [bp-24h] cocos2d::CCPoint v74; // [sp+6Ch] [bp-20h] BYREF cocos2d::CCRect v75; // [sp+74h] [bp-18h] BYREF cocos2d::CCSize v76; // 0:^0.8 cocos2d::CCRect v77; // 0:kr00_16.16 cocos2d::CCSize v78; // 0:r3.4,4:^0.4 cocos2d::CCSize v79; // 0:r3.4,4:^0.4 v75.origin.x = -1.034e-25; v3 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v75); if ( v3 ) { FLAlertLayer::incrementForcePrio(a1); a1->setTouchEnabled(a1, 1); a1->setKeypadEnabled(a1, 1); a1->m_noElasticity = 1; v4 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v63, v4); v5 = cocos2d::CCLayer::create(); v6 = a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_mainLayer = v5; v6->addChild(a1, v5); cocos2d::CCRect::CCRect(&v75, 0.0, 0.0, 80.0, 80.0); v77.origin.x = v49; v77.origin.y = v50; v77.size = v76; v7 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v75, v77); ((void (__fastcall *)(cocos2d::CCNode *, int))v7->__vftable[1].~CCNode_0)(v7, 255); setContentSize = v7->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, 400.0, 300.0); setContentSize(v7, (const cocos2d::CCSize *)&v75); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v7, -1); cocos2d::CCPoint::CCPoint(&v64, v63.width * 0.5, v63.height * 0.5); v7->setPosition(v7, &v64); v9 = cocos2d::CCLabelBMFont::create(); setPosition = v9->setPosition; cocos2d::CCPoint::CCPoint(&v75.origin, v64.x, (float)(v64.y + 150.0) - 16.0); setPosition(v9, &v75.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v9); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v9->setScale)(v9, 1058642330); a1->m_joystickConnected = -1; v11 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v11; v12 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, int))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v11, 10); v13 = (cocos2d::CCArray *)cocos2d::CCArray::create(v12); v15 = ButtonSprite::create((ButtonSprite *)"Cancel", v14); v71 = 0; v70 = AccountLoginLayer::onClose; v16 = CCMenuItemSpriteExtra::create( v15, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(AccountLoginLayer::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v16); cocos2d::CCArray::addObject(v13, v16); v18 = ButtonSprite::create((ButtonSprite *)"Login", v17); v73 = 0; v72 = AccountLoginLayer::onSubmit; v19 = CCMenuItemSpriteExtra::create( v18, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(AccountLoginLayer::onSubmit, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v19); cocos2d::CCArray::addObject(v13, v19); m_buttonMenu = a1->m_buttonMenu; x = v64.x; v21 = (float)(v64.y - 150.0) + 22.0; v22 = (int)a1->m_mainLayer->getPosition(a1->m_mainLayer); cocos2d::CCPoint::CCPoint(&v74, x, v21 + *(float *)(v22 + 4)); cocos2d::CCNode::convertToNodeSpace(&v75.origin, m_buttonMenu, &v74); GameToolbox::alignItemsHorisontally(v13, 15.0, (cocos2d::CCPoint)(unsigned int)&v75, 0); cocos2d::CCSize::CCSize(&v65, 300.0, 30.0); cocos2d::CCPoint::CCPoint(&v66, v64.x, v64.y + 80.0); cocos2d::CCPoint::CCPoint(&v74, &v66); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, &v65); LODWORD(v23.x) = &v74; LODWORD(v23.y) = "Username:"; AccountLoginLayer::createTextBackground(a1, v23, (const char *)&v75, v51); cocos2d::CCPoint::CCPoint(&v74, &v66); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, &v65); LODWORD(v24.x) = &v74; LODWORD(v24.y) = "Username:"; a1->m_usernameLabel = AccountLoginLayer::createTextLabel(a1, v24, (const char *)&v75, v52); cocos2d::CCPoint::CCPoint(&v74, &v66); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, &v65); LODWORD(v78.height) = 1; LODWORD(v25.x) = &v74; LODWORD(v25.y) = &v75; LODWORD(v78.width) = "Username"; TextInput = AccountLoginLayer::createTextInput(a1, v25, v78, v55, (int)v57); a1->m_usernameInput = TextInput; sub_776584((int)&v75, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); CCTextInputNode::setAllowedChars((int)TextInput, (int)&v75); sub_774008(&v75); m_usernameInput = (int)a1->m_usernameInput; *(_DWORD *)(m_usernameInput + 388) = 16; if ( *((_DWORD *)*a2 - 3) ) { sub_776584((int)&v75, *a2); CCTextInputNode::setString(m_usernameInput, (char *)&v75, v28); sub_774008(&v75); } cocos2d::CCPoint::CCPoint(&v75.origin, 0.0, -50.0); cocos2d::CCPoint::operator+(&v67, &v66, &v75); cocos2d::CCPoint::CCPoint(&v74, &v67); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, &v65); LODWORD(v29.x) = &v74; LODWORD(v29.y) = "Password:"; AccountLoginLayer::createTextBackground(a1, v29, (const char *)&v75, v53); cocos2d::CCPoint::CCPoint(&v74, &v67); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, &v65); LODWORD(v30.x) = &v74; LODWORD(v30.y) = "Password:"; a1->m_passwordLabel = AccountLoginLayer::createTextLabel(a1, v30, (const char *)&v75, v54); cocos2d::CCPoint::CCPoint(&v74, &v67); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v75, &v65); LODWORD(v79.height) = 2; LODWORD(v31.x) = &v74; LODWORD(v31.y) = &v75; LODWORD(v79.width) = "Password"; v32 = AccountLoginLayer::createTextInput(a1, v31, v79, v56, (int)v58); a1->m_passwordInput = v32; sub_776584((int)&v75, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*'();:@+$,/?#[]&"); CCTextInputNode::setAllowedChars((int)v32, (int)&v75); sub_774008(&v75); m_passwordInput = a1->m_passwordInput; m_passwordInput->m_maxLabelLength = 20; m_passwordInput->m_usePasswordChar = 1; CCTextInputNode::setMaxLabelScale(m_passwordInput, 1.0); cocos2d::CCArray::removeAllObjects(v13); v34 = ButtonSprite::create( (ButtonSprite *)"Forgot Username", (const char *)&dword_78, 0, 0.8, 1, "goldFont.fnt", "GJ_button_05.png", COERCE_CONST_CHAR_(25.0), v59); v74.y = 0.0; LODWORD(v74.x) = AccountLoginLayer::onForgotUser; v35 = CCMenuItemSpriteExtra::create( v34, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(AccountLoginLayer::onForgotUser, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v35); v36 = ButtonSprite::create( (ButtonSprite *)"Forgot Password", (const char *)&dword_78, 0, 0.8, 1, "goldFont.fnt", "GJ_button_05.png", COERCE_CONST_CHAR_(25.0), v60); v75.origin.y = 0.0; LODWORD(v75.origin.x) = AccountLoginLayer::onForgotPassword; v37 = CCMenuItemSpriteExtra::create( v36, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(AccountLoginLayer::onForgotPassword, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v37); cocos2d::CCArray::addObject(v13, v37); cocos2d::CCArray::addObject(v13, v35); v38 = a1->m_buttonMenu; v39 = v64.x; v40 = v64.y - 45.0; v41 = ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_mainLayer->getPosition)(a1->m_mainLayer); cocos2d::CCPoint::CCPoint(&v68, v39, v40 + *(float *)(LODWORD(v41) + 4)); cocos2d::CCNode::convertToNodeSpace(&v69, v38, &v68); LODWORD(v42.x) = &v69; GameToolbox::alignItemsVertically(v13, 15.0, v42); v43 = LoadingCircle::create(); m_mainLayer = a1->m_mainLayer; a1->m_loadingCircle = v43; v43->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; v47 = m_sprite->setPosition; cocos2d::CCPoint::CCPoint(&v69, v63.width * 0.5, v63.height * 0.5); v47(m_sprite, &v69); } return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source