//
// StartPosBrowser::setupList from 0x7d6a04 to 0x7d6da8 (932 bytes)
//
// 2 xrefs:
// > StartPosBrowser::init @ 0x7d70d4
// > ??> @ 0x81490
//
// This function is hookable on this platform (idp: arm, 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 12:54:21 +0000
//
__int64 __fastcall StartPosBrowser::setupList(StartPosBrowser *this)
{
cocos2d::CCDirector *v2; // x0
__int64 v3; // x0
cocos2d::CCTouchDispatcher *v4; // x0
cocos2d::CCDirector *v5; // x0
cocos2d::CCArray *WinSize; // x0
cocos2d::CCArray *v7; // x27
cocos2d::CCObject *v8; // x22
__int64 v9; // x2
cocos2d::CCArray *v10; // x0
unsigned int i; // w21
const char *v12; // x1
_BOOL4 v13; // w25
size_t v14; // x0
__int64 v15; // x21
__int64 v16; // x2
unsigned int v17; // w22
StartPosObject *v18; // x24
char *v19; // x2
cocos2d::CCString *v20; // x0
const char *CString; // x0
size_t v22; // x0
__int64 v23; // x0
__int64 v24; // x0
__int64 v25; // x20
void (__fastcall *v26)(__int64, _BYTE *); // x19
char *v28; // [xsp+78h] [xbp+78h]
char *v29; // [xsp+78h] [xbp+78h]
__int64 v30; // [xsp+88h] [xbp+88h] BYREF
_BYTE v31[8]; // [xsp+90h] [xbp+90h] BYREF
__int64 v32[2]; // [xsp+98h] [xbp+98h] BYREF
void *v33; // [xsp+A8h] [xbp+A8h]
__int64 v34; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v35; // [xsp+B8h] [xbp+B8h]
void *v36; // [xsp+C0h] [xbp+C0h]
v2 = *((cocos2d::CCDirector **)this + 86);
if ( v2 )
{
v3 = cocos2d::CCDirector::sharedDirector(v2);
v4 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 160LL))(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, *((cocos2d::CCObject **)this + 86));
v2 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 86) + 536LL))(*((_QWORD *)this + 86));
*((_QWORD *)this + 86) = 0;
}
v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
WinSize = (cocos2d::CCArray *)cocos2d::CCDirector::getWinSize(&v30, v5);
v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(WinSize);
v34 = 0;
v35 = 0;
v36 = nullptr;
std::string::__init(&v34, "No StartPos", 0xBu);
v8 = (cocos2d::CCObject *)OptionsObject::create(0, 0, &v34, (char *)this + 672);
if ( (v34 & 1) != 0 )
operator delete(v36);
v9 = *(_QWORD *)v8;
*((_DWORD *)v8 + 24) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(v9 + 72))(v8, 0);
cocos2d::CCArray::addObject(v7, v8);
v10 = *((cocos2d::CCArray **)this + 85);
if ( v10 )
{
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v10); i = v17 )
{
v17 = i + 1;
v18 = (StartPosObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 85), i);
StartPosObject::getDisplayName(&v34, v18);
v19 = (char *)&v34 + 1;
if ( (v34 & 1) != 0 )
v19 = (char *)v36;
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i: %s",
(const char *)v17,
v19);
CString = (const char *)cocos2d::CCString::getCString(v20);
v32[0] = 0;
v32[1] = 0;
v33 = nullptr;
v29 = (char *)CString;
v22 = strlen(CString);
std::string::__init(v32, v29, v22);
if ( (v34 & 1) != 0 )
operator delete(v36);
v12 = (char *)v32 + 1;
v13 = *((_DWORD *)this + 174) == v17;
if ( (v32[0] & 1) != 0 )
v12 = (const char *)v33;
v34 = 0;
v35 = 0;
v36 = nullptr;
v28 = (char *)v12;
v14 = strlen(v12);
std::string::__init(&v34, v28, v14);
v15 = OptionsObject::create(i, v13, &v34, (char *)this + 672);
if ( (v34 & 1) != 0 )
operator delete(v36);
v16 = *(_QWORD *)v15;
*(_DWORD *)(v15 + 96) = 1;
*(_QWORD *)(v15 + 104) = v18;
(*(void (__fastcall **)(__int64, _QWORD))(v16 + 72))(v15, v17);
cocos2d::CCArray::addObject(v7, (cocos2d::CCObject *)v15);
if ( (v32[0] & 1) != 0 )
operator delete(v33);
v10 = *((cocos2d::CCArray **)this + 85);
}
}
v23 = CustomListView::create(v7, (int)this + 664, 0, 24, 220.0, 340.0, 0.0);
v24 = GJCommentListLayer::create(v23, &byte_11B8890, 4281479730LL, 1, 340.0, 220.0);
*((_QWORD *)this + 86) = v24;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v24, 10);
v25 = *((_QWORD *)this + 86);
v26 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v25 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v31,
(float)(*(float *)&v30 - 340.0) * 0.5,
(float)((float)(*((float *)&v30 + 1) - 220.0) * 0.5) + -10.0);
v26(v25, v31);
StartPosBrowser::updatePageLabel(this);
return _stack_chk_guard;
}