//
// StartPosBrowser::init from 0x1404dba20 to 0x1404dbdc3 (931 bytes)
//
// 2 xrefs:
// > PauseLayer::onShowStartposBrowser @ 0x1404d9251
// > ??> @ 0x140929a20
//
// 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:33:04 +0000
//
bool __fastcall StartPosBrowser::init(__int64 a1, cocos2d::CCObject *a2, int a3)
{
bool result; // al
__int64 v7; // rcx
__int64 v8; // rax
__int64 v9; // rax
__int64 *v10; // rdi
__int64 v11; // rbx
__int64 v12; // rax
__int64 v13; // rbx
__int64 v14; // rax
struct cocos2d::CCLabelBMFont *v15; // rdi
__int64 v16; // rbx
__int64 v17; // rax
__int64 v18; // rcx
__int64 v19; // rax
__int64 v20; // rcx
int v21; // eax
cocos2d::CCObject *v22; // rsi
__int64 v23; // rdi
__int64 v24; // rbx
__int64 v25; // rax
__int64 v26; // rax
struct cocos2d::CCLabelBMFont *v27; // rax
__int64 v28; // rcx
__int64 *v29; // rdi
__int64 v30; // rbx
__int64 v31; // rax
__int64 *v32; // rdi
__int64 v33; // rbx
__int64 v34; // rax
_BYTE v35[8]; // [rsp+30h] [rbp-38h] BYREF
_BYTE v36[24]; // [rsp+38h] [rbp-30h] BYREF
float v37; // [rsp+88h] [rbp+20h] BYREF
float v38; // [rsp+8Ch] [rbp+24h]
result = FLAlertLayer::init_1(a1, 150);
if ( result )
{
*(_BYTE *)(a1 + 596) = 1;
*(_DWORD *)(a1 + 696) = a3;
*(_QWORD *)(a1 + 680) = a2;
if ( a2 )
cocos2d::CCObject::retain(a2);
v8 = cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8, &v37);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v36, 0.0, 0.0, 80.0, 80.0);
v10 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v9);
v11 = *v10;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v35, 400.0, 280.0);
(*(void (__fastcall **)(__int64 *, __int64))(v11 + 312))(v10, v12);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v10,
0xFFFFFFFFLL);
v13 = *v10;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, v37 * 0.5, v38 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v13 + 184))(v10, v14);
v15 = cocos2d::CCLabelBMFont::create("Select StartPos", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v15,
10);
v16 = *(_QWORD *)v15;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, v37 * 0.5, (float)((float)(v38 * 0.5) + 140.0) - 20.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v16 + 184))(v15, v17);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v15 + 160LL))(v15);
v19 = cocos2d::CCMenu::create(v18);
v20 = *(_QWORD *)(a1 + 584);
*(_QWORD *)(a1 + 552) = v19;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v20 + 456LL))(v20, v19, 10);
*(_DWORD *)(a1 + 640) = -1;
v21 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v22 = CCMenuItemSpriteExtra::create(v21, 0, a1, (__int64)StartPosBrowser::onClose);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v22);
v23 = *(_QWORD *)v22;
*((_DWORD *)v22 + 93) = 1070386381;
v24 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v35,
(float)((float)(v37 * 0.5) - 200.0) + 10.0,
(float)((float)(v38 * 0.5) + 140.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace(v24, v36, v25);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v23 + 184))(v22, v26);
v27 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt");
v28 = *(_QWORD *)(a1 + 584);
*(_QWORD *)(a1 + 704) = v27;
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v28 + 456LL))(v28, v27, 10);
v29 = *(__int64 **)(a1 + 704);
v30 = *v29;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v36,
(float)((float)(v37 * 0.5) + 200.0) - 15.0,
(float)((float)(v38 * 0.5) + 140.0) - 8.0);
(*(void (__fastcall **)(__int64 *, __int64))(v30 + 184))(v29, v31);
v32 = *(__int64 **)(a1 + 704);
v33 = *v32;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, 1.0, 1.0);
(*(void (__fastcall **)(__int64 *, __int64))(v33 + 288))(v32, v34);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 704) + 160LL))(*(_QWORD *)(a1 + 704));
StartPosBrowser::setupList(a1);
return 1;
}
return result;
}