//
// LevelLeaderboard::init from 0x1003da090 to 0x1003dafd1 (3905 bytes)
//
// 1 xrefs:
// > LevelLeaderboard::create @ 0x1003da04a
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall LevelLeaderboard::init(
LevelLeaderboard *a1,
GJGameLevel *a2,
LevelLeaderboardType a3,
LevelLeaderboardMode a4)
{
LevelLeaderboard *v5; // r12
bool inited; // r14
LevelLeaderboardType v7; // eax
cocos2d::extension::CCScale9Sprite *v8; // rbx
__int128 v9; // xmm0
cocos2d::CCMenu *v10; // rax
GJGameLevel *m_level; // rax
std::string *p_m_levelName; // rax
const char *data; // rbx
size_t v14; // rax
std::string::size_type v15; // r13
char *v16; // r15
const char *v17; // rdi
size_t v18; // r12
cocos2d::CCLabelBMFont *v19; // r13
const char *v20; // rsi
__int64 v21; // r14
cocos2d::CCSprite *v22; // rbx
unsigned __int64 *v23; // r15
float v24; // xmm2_4
unsigned __int64 *v25; // rbx
cocos2d::CCMenu *m_buttonMenu; // rbx
__int64 SpriteButton; // rax
cocos2d::CCMenu *v28; // rbx
__int64 m_pointsBtn; // rax
const cocos2d::CCPoint *v30; // rbx
const cocos2d::CCPoint *m_mainLayer; // r15
CCMenuItemSpriteExtra *m_timeBtn; // rbx
CCMenuItemSpriteExtra *v33; // rbx
cocos2d::CCMenu *v34; // rbx
__int64 v35; // rbx
const cocos2d::CCPoint *v36; // r15
GameLevelManager *v37; // rax
cocos2d::CCSprite *v38; // rax
CCMenuItemSpriteExtra *v39; // rbx
const cocos2d::CCPoint *v40; // r15
cocos2d::CCSprite *v41; // rbx
CCMenuItemSpriteExtra *v42; // rax
CCMenuItemSpriteExtra *m_refreshBtn; // rbx
const cocos2d::CCPoint *v44; // r15
LoadingCircle *v45; // rax
char *m_noInternet; // rbx
cocos2d::CCObject *v47; // r12
int NormalPercent; // eax
__int64 v49; // rbx
const cocos2d::CCPoint *v50; // r15
cocos2d::CCMenu *v51; // rbx
int v52; // r14d
int v53; // xmm0_4
int v54; // r14d
unsigned int v55; // r15d
std::string::value_type *v56; // r12
const char *v57; // rdi
cocos2d::CCSprite *v58; // rbx
CCMenuItemSpriteExtra *v59; // r13
GameLevelManager *v60; // rax
__int64 v62; // [rsp+8h] [rbp-138h] BYREF
__int128 v63; // [rsp+10h] [rbp-130h] BYREF
void *v64; // [rsp+20h] [rbp-120h]
_QWORD v65[2]; // [rsp+28h] [rbp-118h] BYREF
void *v66; // [rsp+38h] [rbp-108h]
void *v67[3]; // [rsp+40h] [rbp-100h] BYREF
void *v68[3]; // [rsp+58h] [rbp-E8h] BYREF
void *v69[3]; // [rsp+70h] [rbp-D0h] BYREF
void *v70[3]; // [rsp+88h] [rbp-B8h] BYREF
float v71; // [rsp+A0h] [rbp-A0h]
float width; // [rsp+A4h] [rbp-9Ch]
std::string __dst; // [rsp+A8h] [rbp-98h] BYREF
const cocos2d::CCPoint *v74; // [rsp+C0h] [rbp-80h]
unsigned __int64 v75; // [rsp+CCh] [rbp-74h] BYREF
float v76; // [rsp+D4h] [rbp-6Ch]
LevelLeaderboard *v77; // [rsp+D8h] [rbp-68h]
std::string __s; // [rsp+E0h] [rbp-60h] BYREF
bool v79; // [rsp+FFh] [rbp-41h]
unsigned __int64 v80; // [rsp+100h] [rbp-40h] BYREF
float v81; // [rsp+108h] [rbp-38h] BYREF
float v82; // [rsp+10Ch] [rbp-34h]
unsigned __int64 v83[6]; // [rsp+110h] [rbp-30h] BYREF
double v84; // 0:xmm0_8.8
double v85; // 0:xmm0_8.8
double v86; // 0:xmm0_8.8
double v87; // 0:xmm0_8.8
double v88; // 0:xmm0_8.8
cocos2d::CCRect v89; // 0:xmm0_8.8,8:xmm1_8.8
LODWORD(v77) = a4;
v5 = a1;
inited = FLAlertLayer::init_1(a1, 150);
if ( !inited )
return inited;
if ( a3 == Local )
a3 = 2 * GJGameLevel::isPlatformer(a2) + 1;
LODWORD(v74) = a2->m_levelType;
v7 = Local;
if ( (_DWORD)v74 != 2 )
v7 = a3;
a1->m_type = v7;
a1->m_mode = (int)v77;
a1->m_level = a2;
cocos2d::CCObject::retain(a2);
LOBYTE(v76) = GJGameLevel::isPlatformer(a2);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v81);
v89.origin = 0;
v89.size = 0;
sub_10028CC00((__int64)&__dst, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v8 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square02.png", v89);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v8->setOpacity)(v8, 255);
sub_10028CBF0((float *)&__dst, 440.0, 290.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v8->setContentSize)(v8, &__dst);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v8,
0xFFFFFFFFLL);
*(_QWORD *)&v9 = LODWORD(v81);
*(float *)&v9 = v81 * 0.5;
sub_10028CBE0((float *)&__dst, v81 * 0.5, v82 * 0.5);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v8->setPosition)(v8, &__dst);
v10 = cocos2d::CCMenu::create();
a1->m_buttonMenu = v10;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v10,
10);
m_level = a1->m_level;
if ( (m_level->m_levelName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&__s,
m_level->m_levelName.m_data.m_long.longStorage,
m_level->m_levelName.m_data.m_long.size,
*(double *)&v9);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_8;
}
else
{
p_m_levelName = &m_level->m_levelName;
__s.__r_.__value_.__r.__words[2] = (std::string::size_type)p_m_levelName->m_data.m_long.longStorage;
v9 = *(_OWORD *)&p_m_levelName->m_data.m_short.sizex2;
*(_OWORD *)&__s.__r_.__value_.__l.0 = *(_OWORD *)&p_m_levelName->m_data.m_short.sizex2;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_8:
data = __s.__r_.__value_.__s.__data_;
goto LABEL_11;
}
}
data = __s.__r_.__value_.__l.__data_;
LABEL_11:
v14 = strlen(data);
if ( v14 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)&v9);
v15 = v14;
v79 = inited;
if ( v14 >= 0x17 )
{
v18 = 26;
if ( (v14 | 7) != 0x17 )
v18 = (v14 | 7) + 1;
v16 = (char *)operator new(v18);
__dst.__r_.__value_.__r.__words[2] = (std::string::size_type)v16;
__dst.__r_.__value_.__r.__words[0] = v18 | 1;
__dst.__r_.__value_.__l.__size_ = v15;
v5 = a1;
}
else
{
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v14);
v16 = __dst.__r_.__value_.__s.__data_;
if ( !v14 )
{
__dst.__r_.__value_.__s.__data_[0] = 0;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_16;
goto LABEL_15;
}
}
memmove(v16, data, v15);
v16[v15] = 0;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
LABEL_15:
operator delete(__s.__r_.__value_.__l.__data_);
LABEL_16:
std::string::append(&__dst, " Leaderboard");
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
v17 = __dst.__r_.__value_.__l.__data_;
else
v17 = __dst.__r_.__value_.__s.__data_;
v19 = cocos2d::CCLabelBMFont::create_3(v17, "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
v19,
20);
sub_10028CBE0((float *)&__s, v81 * 0.5, (float)((float)(v82 * 0.5) + 145.0) + -18.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v19->setPosition)(v19, &__s);
cocos2d::CCLabelBMFont::limitLabelWidth(v19, 300.0, 0.80000001, 0.0);
if ( LOBYTE(v76) )
{
v20 = "GJ_timeIcon_001.png";
if ( (_DWORD)v77 == 1 )
v20 = "GJ_pointsIcon_001.png";
v21 = 2 * (unsigned int)((_DWORD)v77 == 1);
__s.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * (2 * ((_DWORD)v77 == 1) + 19));
memcpy((char *)&__s.__r_.__value_.__l.0 + 1, v20, v21 + 19);
*((_BYTE *)&__s.__r_.__value_.__r.__words[2] + v21 + 4) = 0;
v22 = cocos2d::CCSprite::createWithSpriteFrameName(__s.__r_.__value_.__s.__data_);
width = v22->m_obRect.size.width;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
v22,
20);
v23 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getPosition)(v19);
v71 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getContentSize)(v19);
v24 = (float)((float)(v71 * ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getScale)(v19)) * 0.5) + 2.5;
sub_10028CBE0((float *)&v80, v24, -3.0);
sub_10028CCE0((double *)v83, v23, &v80);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v22->setPosition)(v22, v83);
v25 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getPosition)(v19);
sub_10028CBE0((float *)&v80, (float)(width * -0.5) + -2.5, 0.0);
sub_10028CCE0((double *)v83, v25, &v80);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v19->setPosition)(v19, v83);
strcpy((char *)v67, "&GJ_timeIcon_001.png");
m_buttonMenu = v5->m_buttonMenu;
sub_10028CBE0((float *)v83, 0.0, -0.5);
SpriteButton = LevelLeaderboard::getSpriteButton(
(_DWORD)v5,
(unsigned int)v67,
(unsigned int)LevelLeaderboard::onChangeMode,
0,
(_DWORD)m_buttonMenu,
(unsigned int)v83,
(unsigned int)((_DWORD)v77 == 0) + 1);
v5->m_timeBtn = (CCMenuItemSpriteExtra *)SpriteButton;
if ( ((__int64)v67[0] & 1) != 0 )
{
operator delete(v67[2]);
SpriteButton = (__int64)v5->m_timeBtn;
}
(*(void (__fastcall **)(__int64, bool, double))(*(_QWORD *)SpriteButton + 1040LL))(
SpriteButton,
(_DWORD)v77 != 0,
COERCE_DOUBLE(1060320051));
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v5->m_timeBtn->setTag)(v5->m_timeBtn, 0);
strcpy((char *)v68, "*GJ_pointsIcon_001.png");
v28 = v5->m_buttonMenu;
sub_10028CBE0((float *)v83, 0.0, -1.0);
m_pointsBtn = LevelLeaderboard::getSpriteButton(
(_DWORD)v5,
(unsigned int)v68,
(unsigned int)LevelLeaderboard::onChangeMode,
0,
(_DWORD)v28,
(unsigned int)v83,
(unsigned int)((_DWORD)v77 == 1) + 1);
v5->m_pointsBtn = (CCMenuItemSpriteExtra *)m_pointsBtn;
if ( ((__int64)v68[0] & 1) != 0 )
{
operator delete(v68[2]);
m_pointsBtn = (__int64)v5->m_pointsBtn;
}
(*(void (__fastcall **)(__int64, bool, double))(*(_QWORD *)m_pointsBtn + 1040LL))(
m_pointsBtn,
(_DWORD)v77 != 1,
COERCE_DOUBLE(1060320051));
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v5->m_pointsBtn->setTag)(v5->m_pointsBtn, 1);
v30 = (const cocos2d::CCPoint *)v5->m_buttonMenu;
m_mainLayer = (const cocos2d::CCPoint *)v5->m_mainLayer;
sub_10028CBE0((float *)&v75, (float)((float)(v81 * 0.5) + -220.0) + 25.0, (float)(v82 * 0.5) + 40.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v80, m_mainLayer);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v83, v30);
m_timeBtn = v5->m_timeBtn;
sub_10028CBE0((float *)&v75, 0.0, 20.0);
sub_10028CCE0((double *)&v80, v83, &v75);
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))m_timeBtn->setPosition)(m_timeBtn, &v80);
v33 = v5->m_pointsBtn;
sub_10028CBE0((float *)&v75, 0.0, -20.0);
sub_10028CCE0((double *)&v80, v83, &v75);
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))v33->setPosition)(v33, &v80);
if ( (_DWORD)v74 == 2 )
{
strcpy((char *)v69, "&edit_delBtn_001.png");
v34 = v5->m_buttonMenu;
sub_10028CBE0((float *)&v80, 0.0, -0.5);
v35 = LevelLeaderboard::getSpriteButton(
(_DWORD)v5,
(unsigned int)v69,
(unsigned int)LevelLeaderboard::onDeleteLocalScores,
0,
(_DWORD)v34,
(unsigned int)&v80,
4);
if ( ((__int64)v69[0] & 1) != 0 )
operator delete(v69[2]);
sub_10028CBE0(
(float *)&v80,
(float)((float)(v81 * 0.5) + 220.0) + -25.0,
(float)((float)(v82 * 0.5) + 145.0) + -23.0);
v36 = (const cocos2d::CCPoint *)v5->m_buttonMenu;
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v62, (const cocos2d::CCPoint *)v5->m_mainLayer);
*(cocos2d::CCPoint *)&v84 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v75, v36);
(*(void (__fastcall **)(__int64, unsigned __int64 *, double))(*(_QWORD *)v35 + 184LL))(v35, &v75, v84);
}
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
}
if ( v5->m_level->m_accountID.random == v5->m_level->m_accountID.seed )
{
v37 = GameLevelManager::sharedState();
GameLevelManager::accountIDForUserID(v37, v5->m_level->m_userID.random - v5->m_level->m_userID.seed);
}
v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v39 = CCMenuItemSpriteExtra::create(
v38,
nullptr,
v5,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelLeaderboard::onClose);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild)(v5->m_buttonMenu, v39);
CCMenuItemSpriteExtra::setSizeMult(v39, 1.6);
v40 = (const cocos2d::CCPoint *)v5->m_buttonMenu;
sub_10028CBE0((float *)v83, (float)((float)(v81 * 0.5) + -220.0) + 10.0, (float)((float)(v82 * 0.5) + 145.0) + -10.0);
*(cocos2d::CCPoint *)&v85 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&__s, v40);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v39->setPosition)(v39, &__s, v85);
v41 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v41->setScale)(v41, 0.60000002);
v42 = CCMenuItemSpriteExtra::create(
v41,
nullptr,
v5,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelLeaderboard::onUpdate);
v5->m_refreshBtn = v42;
CCMenuItemSpriteExtra::setSizeMult(v42, 1.5);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild)(
v5->m_buttonMenu,
v5->m_refreshBtn);
m_refreshBtn = v5->m_refreshBtn;
v44 = (const cocos2d::CCPoint *)v5->m_buttonMenu;
sub_10028CBE0((float *)v83, (float)((float)(v81 * 0.5) + 220.0) + -25.0, (float)(0.5 * v82) + 100.0);
*(cocos2d::CCPoint *)&v86 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&__s, v44);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))m_refreshBtn->setPosition)(
m_refreshBtn,
&__s,
v86);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v5->m_refreshBtn->setVisible)(v5->m_refreshBtn, 0);
v45 = LoadingCircle::create();
v5->m_circle = v45;
v45->m_parentLayer = v5->m_mainLayer;
v45->m_fade = 0;
cocos2d::CCObject::retain(v45);
LoadingCircle::show(v5->m_circle);
((void (__fastcall *)(LoadingCircle *, _QWORD))v5->m_circle->setVisible)(v5->m_circle, 0);
v64 = operator new(0x20u);
*(_QWORD *)&v63 = 33;
*((_QWORD *)&v63 + 1) = 31;
strcpy((char *)v64, "No Internet connection!");
sub_10028CBE0((float *)&__s, 0.5, 1.0);
m_noInternet = TextArea::create(&v63, (__int64)"bigFont.fnt", (double *)&__s, 0, 1.0, 600.0, 20.0);
v5->m_noInternet = (TextArea *)m_noInternet;
if ( (v63 & 1) != 0 )
{
operator delete(v64);
m_noInternet = (char *)v5->m_noInternet;
}
*((_DWORD *)m_noInternet + 160) = 1106247680;
sub_10028CBE0((float *)&__s, v81 * 0.5, (float)(v82 * 0.5) + 10.0);
(*(void (__fastcall **)(char *, std::string *))(*(_QWORD *)m_noInternet + 184LL))(m_noInternet, &__s);
((void (__fastcall *)(TextArea *, float))v5->m_noInternet->setScale)(v5->m_noInternet, 0.60000002);
((void (__fastcall *)(cocos2d::CCLayer *, TextArea *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
v5->m_noInternet,
2);
((void (__fastcall *)(TextArea *, _QWORD))v5->m_noInternet->setVisible)(v5->m_noInternet, 0);
v77 = v5;
if ( (_DWORD)v74 != 2 )
{
v51 = cocos2d::CCMenu::create();
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))v77->m_mainLayer->addChild_0)(
v77->m_mainLayer,
v51,
2);
v74 = (const cocos2d::CCPoint *)v51;
v52 = LOBYTE(v76);
if ( LOBYTE(v76) )
*(float *)&v53 = 15.0;
else
*(float *)&v53 = 0.0;
v76 = *(float *)&v53;
v54 = v52 + 3;
v55 = 0;
v56 = byte_10081B020;
do
{
*(_WORD *)&__s.__r_.__value_.__l.0 = 0;
if ( v55 < 4 )
{
std::string::assign(&__s, &byte_10081B020[*(int *)v56]);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
{
if ( __s.__r_.__value_.__l.__size_ )
{
v57 = __s.__r_.__value_.__l.__data_;
LABEL_62:
v58 = cocos2d::CCSprite::createWithSpriteFrameName(v57);
v59 = CCMenuItemSpriteExtra::create(
v58,
nullptr,
v77,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelLeaderboard::onChangeType);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v59->setTag)(v59, v55);
(*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v74 + 440LL))(
v74,
v59);
sub_10028CBE0(
(float *)&v80,
(float)((float)(v81 * 0.5) + 220.0) + -25.0,
(float)((float)((float)(v82 * 0.5) + 42.0) - (float)((float)(int)v55 * 42.0)) + v76);
*(cocos2d::CCPoint *)&v88 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v83, v74);
((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v59->setPosition)(v59, v83, v88);
if ( v55 == v77->m_type )
{
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v59->setEnabled)(v59, 0);
BYTE2(v83[0]) = -106;
LOWORD(v83[0]) = -26986;
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v58->setColor)(v58, v83);
}
}
}
else
{
v57 = __s.__r_.__value_.__s.__data_;
if ( __s.__r_.__value_.__s.0 )
goto LABEL_62;
}
}
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
++v55;
v56 += 4;
}
while ( v54 != v55 );
}
v47 = v77;
NormalPercent = GJGameLevel::getNormalPercent(v77->m_level);
inited = v79;
if ( NormalPercent > *(_DWORD *)(*(_QWORD *)&v47[11].m_uIndexInArray + 760LL)
- *(_DWORD *)(*(_QWORD *)&v47[11].m_uIndexInArray + 764LL) )
{
strcpy((char *)v70, "$Level Leaderboards");
v66 = operator new(0x118u);
v65[0] = 281;
v65[1] = 276;
strcpy(
(char *)v66,
"Q: My score is wrong!?\n"
"A: Level leaderboards changed in update 2.11. Scores from before update 2.11 need to be replayed. You can see your"
" leaderboard percentage by pressing the info button on the bottom left of the level page, or toggle the Leaderboar"
"d percent option.");
v49 = InfoAlertButton::create(v70, v65, 1.0);
if ( (v65[0] & 1) != 0 )
operator delete(v66);
if ( ((__int64)v70[0] & 1) != 0 )
operator delete(v70[2]);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)&v47[9].m_unknown2 + 440LL))(
*(_QWORD *)&v47[9].m_unknown2,
v49);
v50 = *(const cocos2d::CCPoint **)&v47[9].m_unknown2;
sub_10028CBE0((float *)v83, (float)((float)(v81 * 0.5) + 220.0) + -5.0, (float)((float)(0.5 * v82) + 145.0) + -5.0);
*(cocos2d::CCPoint *)&v87 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&__s, v50);
(*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v49 + 184LL))(v49, &__s, v87);
}
if ( GameManager::sharedState()->m_scoreValid || v47[11].m_unknown2 == 3 )
{
LevelLeaderboard::loadScores((LevelLeaderboard *)v47);
}
else
{
LevelLeaderboard::setupLeaderboard((LevelLeaderboard *)v47, nullptr);
GameLevelManager::sharedState()->m_leaderboardManagerDelegate = (LeaderboardManagerDelegate *)&v47[11].m_nTag;
v60 = GameLevelManager::sharedState();
GameLevelManager::updateUserScore(v60);
}
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
return inited;
}