//
// AccountHelpLayer::customSetup from 0x4678fc to 0x467baa (686 bytes)
//
// 0 xrefs:
//
// 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
//
void AccountHelpLayer::customSetup(AccountHelpLayer *a1)
{
cocos2d::CCDirector *v2; // r0
cocos2d::CCLabelBMFont *v3; // r0
cocos2d::CCLabelBMFont_vtbl *v4; // r3
cocos2d::CCLabelBMFont *m_loginStatusLabel; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
TextArea *m_textArea; // r8
void (__fastcall *v8)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
const cocos2d::CCPoint *v9; // r10
ButtonSprite *v10; // r0
CCMenuItemSpriteExtra *v11; // r0
ButtonSprite *v12; // r0
CCMenuItemSpriteExtra *v13; // r10
ButtonSprite *v14; // r0
CCMenuItemSpriteExtra *v15; // r0
cocos2d::CCLayer *m_mainLayer; // r9
cocos2d::CCMenu *m_buttonMenu; // r11
CCMenuItemSpriteExtra *m_refreshLoginButton; // r11
void (__fastcall *v19)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
CCMenuItemSpriteExtra *m_unlinkAccountButton; // r10
void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
bool v22; // [sp+4h] [bp-58h]
bool v23; // [sp+4h] [bp-58h]
bool v24; // [sp+4h] [bp-58h]
void (__fastcall *v25)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+14h] [bp-48h]
cocos2d::CCSize v26; // [sp+1Ch] [bp-40h] BYREF
cocos2d::CCPoint v27; // [sp+24h] [bp-38h] BYREF
cocos2d::CCPoint v28; // [sp+2Ch] [bp-30h] BYREF
cocos2d::CCPoint v29; // [sp+34h] [bp-28h] BYREF
void (*v30)(AccountHelpLayer *, cocos2d::CCObject *); // [sp+3Ch] [bp-20h]
int v31; // [sp+40h] [bp-1Ch]
cocos2d::CCPoint v32; // [sp+44h] [bp-18h] BYREF
cocos2d::CCPoint v33; // [sp+4Ch] [bp-10h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v26, v2);
v3 = cocos2d::CCLabelBMFont::create();
v4 = v3->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_loginStatusLabel = v3;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v4->setScale)(v3, 1061997773);
a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_loginStatusLabel);
m_loginStatusLabel = a1->m_loginStatusLabel;
setPosition = m_loginStatusLabel->setPosition;
cocos2d::CCPoint::CCPoint(&v33, v26.width * 0.5, (float)(v26.height * 0.5) + 90.0);
setPosition(m_loginStatusLabel, &v33);
sub_776584((int)&v32, " ");
cocos2d::CCPoint::CCPoint(&v33, 0.5, 1.0);
a1->m_textArea = (TextArea *)TextArea::create(
(TextArea *)&v32,
(std::string)"bigFont.fnt",
(const char *)0x3F800000,
1148846080,
&v33,
(cocos2d::CCPoint)1108082688LL);
sub_774008(&v32);
((void (__fastcall *)(TextArea *, int))a1->m_textArea->setScale)(a1->m_textArea, 1053609165);
a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_textArea);
m_textArea = a1->m_textArea;
v8 = m_textArea->setPosition;
v9 = a1->m_loginStatusLabel->getPosition(a1->m_loginStatusLabel);
cocos2d::CCPoint::CCPoint(&v32, 0.0, -18.0);
cocos2d::CCPoint::operator+(&v33, v9, &v32);
v8(m_textArea, &v33);
v10 = ButtonSprite::create((ButtonSprite *)"Refresh Login", (const char *)&dword_A0, 0, 1.0, COERCE_FLOAT(1), v22);
v30 = AccountHelpLayer::onReLogin;
v31 = 0;
v11 = CCMenuItemSpriteExtra::create(
v10,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(AccountHelpLayer::onReLogin, (unsigned int)a1));
a1->m_refreshLoginButton = v11;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v11);
v12 = ButtonSprite::create((ButtonSprite *)"Manage Account", (const char *)&dword_A0, 0, 1.0, COERCE_FLOAT(1), v23);
LODWORD(v32.x) = AccountHelpLayer::onAccountManagement;
v32.y = 0.0;
v13 = CCMenuItemSpriteExtra::create(
v12,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(AccountHelpLayer::onAccountManagement, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v13);
v14 = ButtonSprite::create((ButtonSprite *)"Unlink Account", (const char *)&dword_A0, 0, 1.0, COERCE_FLOAT(1), v24);
LODWORD(v33.x) = AccountHelpLayer::onUnlink;
v33.y = 0.0;
v15 = CCMenuItemSpriteExtra::create(
v14,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(AccountHelpLayer::onUnlink, (unsigned int)a1));
a1->m_unlinkAccountButton = v15;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v15);
m_mainLayer = a1->m_mainLayer;
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v28, v26.width * 0.5, (float)(v26.height * 0.5) + 30.0);
cocos2d::CCNode::convertToWorldSpace(&v29, m_mainLayer, &v28);
cocos2d::CCNode::convertToNodeSpace(&v27, m_buttonMenu, &v29);
m_refreshLoginButton = a1->m_refreshLoginButton;
v25 = m_refreshLoginButton->setPosition;
cocos2d::CCPoint::CCPoint(&v28, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v29, &v27, &v28);
v25(m_refreshLoginButton, &v29);
v19 = v13->setPosition;
cocos2d::CCPoint::CCPoint(&v28, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v29, &v27, &v28);
v19(v13, &v29);
m_unlinkAccountButton = a1->m_unlinkAccountButton;
v21 = m_unlinkAccountButton->setPosition;
cocos2d::CCPoint::CCPoint(&v28, 0.0, -90.0);
cocos2d::CCPoint::operator+(&v29, &v27, &v28);
v21(m_unlinkAccountButton, &v29);
AccountHelpLayer::updatePage(a1);
GJAccountManager::sharedState()->m_accountDelegate = &a1->GJAccountDelegate;
a1->m_unk290 = 1;
}