//
// AccountHelpLayer::customSetup from 0x140094ce0 to 0x140095109 (1065 bytes)
//
// 2 xrefs:
// > ??> @ 0x140718ad0
// > ??> @ 0x140912c20
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:26:02 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall AccountHelpLayer::customSetup(__int64 a1)
{
__int64 v2; // rax
struct cocos2d::CCLabelBMFont *v3; // rax
__int64 *v4; // rdi
__int64 v5; // rbx
__int64 v6; // rax
const struct cocos2d::CCPoint *v7; // rax
char *v8; // rax
__int64 v9; // rax
__int64 v10; // rbx
__int64 v11; // rax
int v12; // eax
cocos2d::CCObject *v13; // rax
int v14; // eax
cocos2d::CCObject *v15; // rsi
int v16; // eax
cocos2d::CCObject *v17; // rax
__int64 v18; // rbx
__int64 v19; // rdi
__int64 v20; // rax
__int64 v21; // rax
__int64 v22; // rax
__int64 v23; // rax
__int64 v24; // rax
__int64 v25; // rcx
__int64 v26; // rbx
__int64 result; // rax
__int128 v28; // [rsp+48h] [rbp-29h] BYREF
__int64 v29; // [rsp+58h] [rbp-19h]
__int128 v30; // [rsp+60h] [rbp-11h]
float v31; // [rsp+D8h] [rbp+67h] BYREF
float v32; // [rsp+DCh] [rbp+6Bh]
char v33; // [rsp+E0h] [rbp+6Fh] BYREF
__int128 *v34; // [rsp+E8h] [rbp+77h] BYREF
char v35; // [rsp+F0h] [rbp+7Fh] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, &v31);
v3 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, "goldFont.fnt");
*(_QWORD *)(a1 + 624) = v3;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v3 + 160LL))(v3);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 576) + 464LL))(
*(_QWORD *)(a1 + 576),
*(_QWORD *)(a1 + 624));
v4 = *(__int64 **)(a1 + 624);
v5 = *v4;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, v31 * 0.5, (float)(v32 * 0.5) + 90.0);
(*(void (__fastcall **)(__int64 *, __int64))(v5 + 184))(v4, v6);
v34 = &v28;
v28 = 0;
v29 = 1;
*(_QWORD *)&v30 = 15;
LOWORD(v28) = 32;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, 0.5, 1.0);
v8 = TextArea::create((__int64)&v28, &qword_140704F78, 1.0, 1000.0, v7, 1108082688, 0, 0);
*(_QWORD *)(a1 + 632) = v8;
(*(void (__fastcall **)(char *))(*(_QWORD *)v8 + 160LL))(v8);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 576) + 464LL))(
*(_QWORD *)(a1 + 576),
*(_QWORD *)(a1 + 632));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, 0.0, -18.0);
v10 = v9;
v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 624) + 200LL))(*(_QWORD *)(a1 + 624));
cocos2d::CCPoint::operator+(v11, &v34, v10);
(*(void (__fastcall **)(_QWORD, __int128 **))(**(_QWORD **)(a1 + 632) + 184LL))(*(_QWORD *)(a1 + 632), &v34);
v12 = (unsigned int)ButtonSprite::create_1(
(int)"Refresh Login",
160,
0,
1.0,
1,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v13 = CCMenuItemSpriteExtra::create(v12, 0, a1, (__int64)AccountHelpLayer::onReLogin);
*(_QWORD *)(a1 + 640) = v13;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 560) + 464LL))(*(_QWORD *)(a1 + 560), v13);
v14 = (unsigned int)ButtonSprite::create_1(
(int)"Manage Account",
160,
0,
1.0,
1,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v15 = CCMenuItemSpriteExtra::create(v14, 0, a1, (__int64)AccountHelpLayer::onAccountManagement);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 560) + 464LL))(*(_QWORD *)(a1 + 560), v15);
v16 = (unsigned int)ButtonSprite::create_1(
(int)"Unlink Account",
160,
0,
1.0,
1,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v17 = CCMenuItemSpriteExtra::create(v16, 0, a1, (__int64)AccountHelpLayer::onUnlink);
*(_QWORD *)(a1 + 648) = v17;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 560) + 464LL))(*(_QWORD *)(a1 + 560), v17);
v18 = *(_QWORD *)(a1 + 576);
v19 = *(_QWORD *)(a1 + 560);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, v31 * 0.5, (float)(v32 * 0.5) + 30.0);
cocos2d::CCNode::convertToWorldSpace(v18, &v35, v20);
cocos2d::CCNode::convertToNodeSpace(v19, &v33, v21);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v33, &v34, v22);
(*(void (__fastcall **)(_QWORD, __int128 **))(**(_QWORD **)(a1 + 640) + 184LL))(*(_QWORD *)(a1 + 640), &v34);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v33, &v34, v23);
(*(void (__fastcall **)(cocos2d::CCObject *, __int128 **))(*(_QWORD *)v15 + 184LL))(v15, &v34);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, 0.0, -90.0);
cocos2d::CCPoint::operator+(&v33, &v34, v24);
(*(void (__fastcall **)(_QWORD, __int128 **))(**(_QWORD **)(a1 + 648) + 184LL))(*(_QWORD *)(a1 + 648), &v34);
AccountHelpLayer::updatePage(a1);
v26 = a1 + 608;
if ( !a1 )
v26 = 0;
result = GJAccountManager::sharedState(v25);
*(_QWORD *)(result + 424) = v26;
*(_BYTE *)(a1 + 656) = 1;
return result;
}