//
// AccountHelpLayer::customSetup from 0x14007f610 to 0x14007fa1f (1039 bytes)
//
// 3 xrefs:
// > ??> @ 0x14053b0f8
// > ??> @ 0x1406c6948
// > ??> @ 0x1406c6954
//
// 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
//
// Hidden C++ exception states: #wind=1
void AccountHelpLayer::customSetup(AccountHelpLayer *a1)
{
cocos2d::CCDirector *v2; // rax
cocos2d::CCLabelBMFont *v3; // rax
cocos2d::CCLabelBMFont_vtbl *v4; // rbx
const cocos2d::CCPoint *v5; // rax
const struct cocos2d::CCPoint *v6; // rax
char *v7; // rax
const cocos2d::CCPoint *v8; // rax
ButtonSprite *v9; // rax
CCMenuItemSpriteExtra *v10; // rax
ButtonSprite *v11; // rax
CCMenuItemSpriteExtra *v12; // rbx
ButtonSprite *v13; // rax
CCMenuItemSpriteExtra *v14; // rax
GJAccountDelegate *v15; // rbx
__int128 v16; // [rsp+48h] [rbp-19h] BYREF
__int64 v17; // [rsp+58h] [rbp-9h]
__int128 v18; // [rsp+60h] [rbp-1h]
float v19; // [rsp+C8h] [rbp+67h]
float v20; // [rsp+CCh] [rbp+6Bh]
struct cocos2d::CCPoint v21; // [rsp+D0h] [rbp+6Fh] BYREF
__int128 *v22; // [rsp+D8h] [rbp+77h] BYREF
cocos2d::CCPoint v23; // [rsp+E0h] [rbp+7Fh] BYREF
v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2);
v3 = cocos2d::CCLabelBMFont::create(byte_140518980, "goldFont.fnt");
a1->m_loginStatusLabel = v3;
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v3->setScale_0)(v3);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, a1->m_loginStatusLabel);
v4 = a1->m_loginStatusLabel->__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, v19 * 0.5, (float)(v20 * 0.5) + 90.0);
v4->setPosition_0(a1->m_loginStatusLabel, v5);
v22 = &v16;
v16 = 0;
v17 = 1;
*(_QWORD *)&v18 = 15;
LOWORD(v16) = 32;
cocos2d::CCPoint::CCPoint(&v23, 0.5, 1.0);
v7 = TextArea::create((__int64)&v16, &qword_14052A4D8, 1.0, 1000.0, v6, 1108082688, 0);
a1->m_textArea = (TextArea *)v7;
(*(void (__fastcall **)(char *))(*(_QWORD *)v7 + 160LL))(v7);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, a1->m_textArea);
cocos2d::CCPoint::CCPoint(&v23, 0.0, -18.0);
v8 = a1->m_loginStatusLabel->getPosition_0(a1->m_loginStatusLabel);
cocos2d::CCPoint::operator+(v8, &v22);
a1->m_textArea->setPosition_0(a1->m_textArea, (const cocos2d::CCPoint *)&v22);
v9 = ButtonSprite::create_1("Refresh Login", 160, 0, 1.0, 1, "goldFont.fnt", "GJ_button_01.png", 0.0);
v10 = CCMenuItemSpriteExtra::create(v9, nullptr, a1, (cocos2d::SEL_MenuHandler *)AccountHelpLayer::onReLogin);
a1->m_refreshLoginButton = v10;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v10);
v11 = ButtonSprite::create_1("Manage Account", 160, 0, 1.0, 1, "goldFont.fnt", "GJ_button_01.png", 0.0);
v12 = CCMenuItemSpriteExtra::create(
v11,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)AccountHelpLayer::onAccountManagement);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v12);
v13 = ButtonSprite::create_1("Unlink Account", 160, 0, 1.0, 1, "goldFont.fnt", "GJ_button_01.png", 0.0);
v14 = CCMenuItemSpriteExtra::create(v13, nullptr, a1, (cocos2d::SEL_MenuHandler *)AccountHelpLayer::onUnlink);
a1->m_unlinkAccountButton = v14;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, v19 * 0.5, (float)(v20 * 0.5) + 30.0);
cocos2d::CCNode::convertToWorldSpace(a1->m_mainLayer, &v23);
cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v21);
cocos2d::CCPoint::CCPoint(&v23, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v21, &v22);
a1->m_refreshLoginButton->setPosition_0(a1->m_refreshLoginButton, (const cocos2d::CCPoint *)&v22);
cocos2d::CCPoint::CCPoint(&v23, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v21, &v22);
v12->setPosition_0(v12, (const cocos2d::CCPoint *)&v22);
cocos2d::CCPoint::CCPoint(&v23, 0.0, -90.0);
cocos2d::CCPoint::operator+(&v21, &v22);
a1->m_unlinkAccountButton->setPosition_0(a1->m_unlinkAccountButton, (const cocos2d::CCPoint *)&v22);
AccountHelpLayer::updatePage(a1);
v15 = &a1->GJAccountDelegate;
if ( !a1 )
v15 = nullptr;
GJAccountManager::sharedState()->m_accountDelegate = v15;
a1->m_unk290 = 1;
}