//
// AccountHelpLayer::customSetup from 0x5854c8 to 0x585782 (698 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:57 +0000
//
int __fastcall AccountHelpLayer::customSetup(const cocos2d::CCPoint **this)
{
const char *v2; // r2
const cocos2d::CCPoint *v3; // r0
int v4; // r6
void (__fastcall *v5)(int, _DWORD *); // r8
int v6; // r6
void (__fastcall *v7)(int, _DWORD *); // r9
int v8; // r10
ButtonSprite *v9; // r0
int v10; // r0
ButtonSprite *v11; // r0
int v12; // r10
ButtonSprite *v13; // r0
int v14; // r0
const cocos2d::CCPoint *v15; // r9
const cocos2d::CCPoint *v16; // r11
int v17; // r11
void (__fastcall *v18)(int, _BYTE *); // r11
int v19; // r10
void (__fastcall *v20)(int, _BYTE *); // r11
int v21; // r1
char *v22; // r2
int v23; // r3
GJAccountManager *updated; // r0
int result; // r0
bool v26; // [sp+4h] [bp-60h]
bool v27; // [sp+4h] [bp-60h]
bool v28; // [sp+4h] [bp-60h]
void (__fastcall *v29)(int, _BYTE *); // [sp+14h] [bp-50h]
float v30; // [sp+18h] [bp-4Ch] BYREF
float v31; // [sp+1Ch] [bp-48h]
_BYTE v32[8]; // [sp+20h] [bp-44h] BYREF
_BYTE v33[8]; // [sp+28h] [bp-3Ch] BYREF
_BYTE v34[8]; // [sp+30h] [bp-34h] BYREF
int (__fastcall *v35)(AccountHelpLayer *, cocos2d::CCObject *, int, int); // [sp+38h] [bp-2Ch]
int v36; // [sp+3Ch] [bp-28h]
_DWORD v37[2]; // [sp+40h] [bp-24h] BYREF
_DWORD v38[2]; // [sp+48h] [bp-1Ch] BYREF
int v39[3]; // [sp+50h] [bp-14h] BYREF
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v30);
v3 = (const cocos2d::CCPoint *)cocos2d::CCLabelBMFont::create(
(cocos2d::CCLabelBMFont *)&unk_B6B226,
"goldFont.fnt",
v2);
*(this + 122) = v3;
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v3 + 80))(v3, 1061997773);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), *(this + 122));
v4 = (int)*(this + 122);
v5 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v30 * 0.5, (float)(v31 * 0.5) + 90.0);
v5(v4, v38);
memset(v39, 0, sizeof(v39));
std::string::__init(v39, " ", 1u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.5, 1.0);
*(this + 123) = (const cocos2d::CCPoint *)TextArea::create(
(int)v39,
"bigFont.fnt",
1065353216,
1148846080,
(const cocos2d::CCPoint *)v38,
1108082688,
0,
0);
std::string::~string((int)v39);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 123) + 80))(*(this + 123), 1053609165);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), *(this + 123));
v6 = (int)*(this + 123);
v7 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v6 + 92);
v8 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 122) + 96))(*(this + 122));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, 0.0, -18.0);
cocos2d::CCPoint::operator+(v38, v8, v37);
v7(v6, v38);
v9 = ButtonSprite::create((ButtonSprite *)"Refresh Login", (const char *)&dword_A0, 0, 1.0, COERCE_FLOAT(1), v26);
v35 = AccountHelpLayer::onReLogin;
v36 = 0;
v10 = CCMenuItemSpriteExtra::create((int)v9, 0, (int)this, (int)AccountHelpLayer::onReLogin, 0);
*(this + 124) = (const cocos2d::CCPoint *)v10;
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 114) + 228))(*(this + 114), v10);
v11 = ButtonSprite::create((ButtonSprite *)"Manage Account", (const char *)&dword_A0, 0, 1.0, COERCE_FLOAT(1), v27);
v37[0] = AccountHelpLayer::onAccountManagement;
v37[1] = 0;
v12 = CCMenuItemSpriteExtra::create((int)v11, 0, (int)this, (int)AccountHelpLayer::onAccountManagement, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 114) + 228))(*(this + 114), v12);
v13 = ButtonSprite::create((ButtonSprite *)"Unlink Account", (const char *)&dword_A0, 0, 1.0, COERCE_FLOAT(1), v28);
v38[0] = AccountHelpLayer::onUnlink;
v38[1] = 0;
v14 = CCMenuItemSpriteExtra::create((int)v13, 0, (int)this, (int)AccountHelpLayer::onUnlink, 0);
*(this + 125) = (const cocos2d::CCPoint *)v14;
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 114) + 228))(*(this + 114), v14);
v15 = *(this + 116);
v16 = *(this + 114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, v30 * 0.5, (float)(v31 * 0.5) + 30.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v34, v15);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v32, v16);
v17 = (int)*(this + 124);
v29 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, 0.0);
cocos2d::CCPoint::operator+(v34, v32, v33);
v29(v17, v34);
v18 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v12 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, -45.0);
cocos2d::CCPoint::operator+(v34, v32, v33);
v18(v12, v34);
v19 = (int)*(this + 125);
v20 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v19 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, -90.0);
cocos2d::CCPoint::operator+(v34, v32, v33);
v20(v19, v34);
updated = (GJAccountManager *)AccountHelpLayer::updatePage((AccountHelpLayer *)this, v21, v22, v23);
result = GJAccountManager::sharedState(updated);
*(_DWORD *)(result + 312) = this + 120;
*((_BYTE *)this + 504) = 1;
return result;
}