//
// InfoLayer::setupLevelInfo from 0x1403d0110 to 0x1403d0321 (529 bytes)
//
// 3 xrefs:
// > InfoLayer::init @ 0x1403ceb6e
// > InfoLayer::init @ 0x1403ced94
// > ??> @ 0x140924680
//
// 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:31:35 +0000
//
__int64 __fastcall InfoLayer::setupLevelInfo(__int64 a1)
{
__int64 v2; // rax
__int64 v3; // rbx
int v4; // edx
int v5; // ebx
__int64 v6; // rbx
_DWORD *v7; // rax
cocos2d::CCString *v8; // rax
const char *CString; // rax
struct cocos2d::CCLabelBMFont *v10; // rsi
__int64 v11; // rcx
__int64 v12; // r14
const char *v13; // rax
cocos2d::CCString *v14; // rax
struct cocos2d::CCLabelBMFont *v15; // rbx
__int64 v16; // rax
cocos2d::CCObject *v17; // rax
__int64 v18; // rax
float v20; // [rsp+50h] [rbp+8h] BYREF
float v21; // [rsp+54h] [rbp+Ch]
char v22; // [rsp+58h] [rbp+10h] BYREF
char v23; // [rsp+60h] [rbp+18h] BYREF
char v24; // [rsp+68h] [rbp+20h] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, &v20);
v3 = *(_QWORD *)(a1 + 712);
if ( v3 )
{
v4 = *(_DWORD *)(v3 + 348);
v5 = *(_DWORD *)(v3 + 344);
}
else
{
v6 = *(_QWORD *)(a1 + 720);
if ( v6 )
{
v4 = *(_DWORD *)(v6 + 332);
v5 = *(_DWORD *)(v6 + 320);
}
else
{
v7 = *(_DWORD **)(a1 + 696);
v5 = v7[82] - v7[83];
v4 = v7[215];
}
}
v8 = cocos2d::CCString::createWithFormat("Version: %i", v4);
CString = cocos2d::CCString::getCString(v8);
v10 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v10,
2);
v12 = cocos2d::CCMenu::create(v11);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v12, 2);
v13 = "ID: na";
if ( v5 )
{
v14 = cocos2d::CCString::createWithFormat("ID: %i", v5);
v13 = cocos2d::CCString::getCString(v14);
}
v15 = cocos2d::CCLabelBMFont::create(v13, "goldFont.fnt");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, v20 * 0.5, (float)((float)(v21 * 0.5) - 145.0) + 14.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, -50.0, 0.0);
cocos2d::CCPoint::operator+(&v22, &v23, v16);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v10 + 184LL))(v10, &v23);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v10 + 160LL))(v10);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v15 + 160LL))(v15);
v17 = CCMenuItemSpriteExtra::create((int)v15, 0, a1, (__int64)InfoLayer::onCopyLevelID);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v12 + 464LL))(v12, v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, 50.0, 0.0);
cocos2d::CCPoint::operator+(&v22, &v23, v18);
return (*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)v12 + 184LL))(v12, &v23);
}