//
// LevelLeaderboard::init from 0x140300b10 to 0x140301c99 (4489 bytes)
//
// 2 xrefs:
// > LevelLeaderboard::create @ 0x140300ad2
// > ??> @ 0x1406d4370
//
// 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
//
// Hidden C++ exception states: #wind=12
bool LevelLeaderboard::init(LevelLeaderboard *a1, GJGameLevel *a2, LevelLeaderboardType a3, LevelLeaderboardMode a4)
{
bool result; // al
int m_levelLength; // r13d
__int64 v10; // rcx
cocos2d::CCDirector *v11; // rax
struct cocos2d::CCRect *v12; // rax
struct cocos2d::extension::CCScale9Sprite *v13; // rdi
__int64 v14; // rdx
cocos2d::extension::CCScale9Sprite_vtbl *v15; // rbx
const cocos2d::CCSize *v16; // rax
size_t v17; // r14
float v18; // xmm0_4
cocos2d::extension::CCScale9Sprite_vtbl *v19; // rbx
const cocos2d::CCPoint *v20; // rax
__int64 v21; // rcx
cocos2d::CCMenu *v22; // rax
__int128 *v23; // rdx
size_t v24; // r8
const char *p_Src; // rcx
struct cocos2d::CCLabelBMFont *v26; // r15
float v27; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v28; // rbx
const cocos2d::CCPoint *v29; // rax
const char *v30; // rdx
const char *origin; // rcx
cocos2d::CCSprite *v32; // rdi
float width; // xmm7_4
float *v34; // rbx
double v35; // xmm0_8
__int64 v36; // rax
float v37; // xmm0_4
__int64 v38; // rax
__int64 v39; // rax
CCMenuItemSpriteExtra *SpriteButton; // rax
_BOOL8 v41; // rdx
__int64 v42; // rax
CCMenuItemSpriteExtra *v43; // rax
_BOOL8 v44; // rdx
float v45; // xmm0_4
double v46; // xmm0_8
float v47; // xmm0_4
GJLevelType v48; // r14d
double v49; // xmm0_8
__int64 v50; // rax
__int64 *v51; // rdi
__int64 v52; // rbx
struct cocos2d::CCPoint v53; // rax
GJGameLevel *m_level; // rcx
int v55; // ebx
__int64 v56; // rcx
cocos2d::CCString *v57; // rax
struct cocos2d::CCSprite *v58; // rax
CCMenuItemSpriteExtra *v59; // rdi
float v60; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v61; // rbx
struct cocos2d::CCPoint v62; // rax
struct cocos2d::CCSprite *v63; // rbx
CCMenuItemSpriteExtra *v64; // rax
float v65; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v66; // rbx
struct cocos2d::CCPoint v67; // rax
LoadingCircle *v68; // rax
double v69; // xmm0_8
const struct cocos2d::CCPoint *v70; // rax
char *v71; // rax
TextArea_vtbl *v72; // rbx
const cocos2d::CCPoint *v73; // rax
__int64 v74; // r12
__int64 v75; // rcx
cocos2d::CCNode *v76; // rbx
float x; // edi
int v78; // r15d
unsigned int v79; // r14d
char *v80; // rax
const char *v81; // rcx
struct cocos2d::CCSprite *v82; // r13
CCMenuItemSpriteExtra *v83; // rdi
CCMenuItemSpriteExtra_vtbl *v84; // rbx
struct cocos2d::CCPoint v85; // rax
void *v86; // rcx
_QWORD *v87; // r8
_OWORD *v88; // rdx
const char *v89; // rax
char *v90; // rdi
float v91; // xmm0_4
__int64 v92; // rbx
struct cocos2d::CCPoint v93; // rax
__int64 v94; // rax
LeaderboardManagerDelegate *v95; // rsi
GameLevelManager *v96; // rcx
struct cocos2d::CCPoint v97; // [rsp+40h] [rbp-C0h] BYREF
float v98; // [rsp+48h] [rbp-B8h]
__int128 *v99; // [rsp+50h] [rbp-B0h] BYREF
cocos2d::CCNode *v100; // [rsp+58h] [rbp-A8h] BYREF
__int16 v101; // [rsp+60h] [rbp-A0h]
GJLevelType m_levelType; // [rsp+68h] [rbp-98h] BYREF
__int128 *v103; // [rsp+70h] [rbp-90h] BYREF
__int128 v104; // [rsp+78h] [rbp-88h] BYREF
__int64 v105; // [rsp+88h] [rbp-78h]
unsigned __int64 v106; // [rsp+90h] [rbp-70h]
cocos2d::CCRect v107; // [rsp+98h] [rbp-68h] BYREF
__int64 v108; // [rsp+A8h] [rbp-58h]
unsigned __int64 v109; // [rsp+B0h] [rbp-50h]
__int128 v110; // [rsp+B8h] [rbp-48h] BYREF
__int64 v111; // [rsp+C8h] [rbp-38h]
unsigned __int64 v112; // [rsp+D0h] [rbp-30h]
__int128 Src; // [rsp+D8h] [rbp-28h] BYREF
__int64 v114; // [rsp+E8h] [rbp-18h]
unsigned __int64 v115; // [rsp+F0h] [rbp-10h]
result = FLAlertLayer::init_1(a1, 150);
if ( result )
{
if ( a3 == Local && a2->m_levelLength != 5 )
a3 = 1;
m_levelType = a2->m_levelType;
if ( m_levelType == Editor )
a3 = Local;
a1->m_type = a3;
a1->m_mode = a4;
a1->m_level = a2;
cocos2d::CCObject::retain(a2);
m_levelLength = a2->m_levelLength;
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v11);
cocos2d::CCRect::CCRect(&v107, 0.0, 0.0, 80.0, 80.0);
v13 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v12);
LOBYTE(v14) = -1;
v13->setOpacity(&v13->cocos2d::CCRGBAProtocol, v14);
v15 = v13->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v100, 440.0, 290.0);
v15->setContentSize(v13, v16);
v17 = -1;
v18 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v13,
0xFFFFFFFFLL);
v19 = v13->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v18, v98 * 0.5);
v19->setPosition_0(v13, v20);
v22 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v21);
a1->m_buttonMenu = v22;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v22, 10);
sub_14003BDB0((__int64)&v110, (__int64)&a1->m_level->m_levelName);
v23 = &v110;
if ( v112 > 0xF )
v23 = (__int128 *)v110;
Src = 0;
v114 = 0;
v115 = 0;
v24 = -1;
do
++v24;
while ( *((_BYTE *)v23 + v24) );
sub_14003A930(&Src, v23, v24);
sub_14003A830((__int64)&v110);
sub_140041270(&Src, " Leaderboard", 0xCu);
p_Src = (const char *)&Src;
if ( v115 > 0xF )
p_Src = (const char *)Src;
v26 = cocos2d::CCLabelBMFont::create(p_Src, "goldFont.fnt");
v27 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v26,
20);
v28 = v26->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v27, v98 * 0.5);
v28->setPosition_0(v26, v29);
cocos2d::CCLabelBMFont::limitLabelWidth(v26, 300.0, 0.80000001, 0.0);
if ( m_levelLength == 5 )
{
v30 = "GJ_timeIcon_001.png";
if ( a4 == Points )
v30 = "GJ_pointsIcon_001.png";
v107 = 0;
v108 = 0;
v109 = 0;
do
++v17;
while ( v30[v17] );
sub_14003A930(&v107, v30, v17);
origin = (const char *)&v107;
if ( v109 > 0xF )
origin = (const char *)v107.origin;
v32 = cocos2d::CCSprite::createWithSpriteFrameName(origin);
width = cocos2d::CCSprite::getTextureRect(v32)->size.width;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v32, 20);
v34 = (float *)v26->getContentSize(v26);
v35 = ((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v26->getScale)(v26);
cocos2d::CCPoint::CCPoint(
(float)((float)(*(float *)&v35 * *v34) * 0.5) + 2.5,
(float)((float)(*(float *)&v35 * *v34) * 0.5) + 2.5);
v36 = (__int64)v26->getPosition_0(v26);
cocos2d::CCPoint::operator+(v36, &v97);
v37 = ((float (__fastcall *)(cocos2d::CCSprite *, struct cocos2d::CCPoint *))v32->setPosition_0)(v32, &v97);
cocos2d::CCPoint::CCPoint(v37, (float)((float)-width * 0.5) - 2.5);
v38 = (__int64)v26->getPosition_0(v26);
cocos2d::CCPoint::operator+(v38, &v97);
v26->setPosition_0(v26, &v97);
v99 = &v104;
v104 = 0;
v105 = 0;
v106 = 15;
*(_QWORD *)&v104 = sub_14003AA10(0x20u);
v105 = 19;
v106 = 31;
strcpy((char *)v104, "GJ_timeIcon_001.png");
cocos2d::CCPoint::CCPoint(7.0763472e31, 0.0);
SpriteButton = (CCMenuItemSpriteExtra *)LevelLeaderboard::getSpriteButton(
(_DWORD)a1,
(unsigned int)&v104,
(unsigned int)LevelLeaderboard::onChangeMode,
a1->m_buttonMenu,
1060320051,
v39,
2 - (unsigned int)(a4 != Time));
a1->m_timeBtn = SpriteButton;
LOBYTE(v41) = a4 != Time;
SpriteButton->setEnabled(SpriteButton, v41);
a1->m_timeBtn->setTag(a1->m_timeBtn, 0);
v99 = &v104;
v104 = 0;
v105 = 0;
v106 = 15;
*(_QWORD *)&v104 = sub_14003AA10(0x20u);
v105 = 21;
v106 = 31;
strcpy((char *)v104, "GJ_pointsIcon_001.png");
cocos2d::CCPoint::CCPoint(2.7641981e29, 0.0);
v43 = (CCMenuItemSpriteExtra *)LevelLeaderboard::getSpriteButton(
(_DWORD)a1,
(unsigned int)&v104,
(unsigned int)LevelLeaderboard::onChangeMode,
a1->m_buttonMenu,
1060320051,
v42,
(unsigned int)(a4 == Points) + 1);
a1->m_pointsBtn = v43;
LOBYTE(v44) = a4 != Points;
v43->setEnabled(v43, v44);
v45 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_pointsBtn->setTag)(a1->m_pointsBtn, 1);
v46 = cocos2d::CCPoint::CCPoint(v45, (float)((float)(v98 * 0.5) - 220.0) + 25.0);
cocos2d::CCNode::convertToWorldSpace(a1->m_mainLayer, &v97);
cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v100);
cocos2d::CCPoint::CCPoint(*(float *)&v46, 0.0);
cocos2d::CCPoint::operator+(&v100, &v97);
v47 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint *))a1->m_timeBtn->setPosition_0)(
a1->m_timeBtn,
&v97);
cocos2d::CCPoint::CCPoint(v47, 0.0);
cocos2d::CCPoint::operator+(&v100, &v97);
a1->m_pointsBtn->setPosition_0(a1->m_pointsBtn, &v97);
v48 = m_levelType;
if ( m_levelType == Editor )
{
v99 = &v104;
v104 = 0;
v105 = 0;
v106 = 15;
*(_QWORD *)&v104 = sub_14003AA10(0x20u);
v105 = 19;
v106 = 31;
strcpy((char *)v104, "edit_delBtn_001.png");
v49 = cocos2d::CCPoint::CCPoint(7.396493e31, 0.0);
v51 = (__int64 *)LevelLeaderboard::getSpriteButton(
(_DWORD)a1,
(unsigned int)&v104,
(unsigned int)LevelLeaderboard::onDeleteLocalScores,
a1->m_buttonMenu,
1060320051,
v50,
4);
cocos2d::CCPoint::CCPoint(*(float *)&v49, (float)((float)(v98 * 0.5) + 220.0) - 25.0);
v52 = *v51;
cocos2d::CCNode::convertToWorldSpace(a1->m_mainLayer, (const struct cocos2d::CCPoint *)&v99);
v53 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v103);
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCPoint))(v52 + 184))(v51, v53);
}
sub_14003A830((__int64)&v107);
}
else
{
v48 = m_levelType;
}
m_level = a1->m_level;
if ( m_level->m_accountID.random == m_level->m_accountID.seed )
{
v55 = m_level->m_userID.random - m_level->m_userID.seed;
v56 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v103 = (__int128 *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v103);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v56 = qword_1406C2EC0;
}
v57 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(cocos2d::CCDictionary **)(v56 + 536), v55);
cocos2d::CCString::intValue(v57);
}
v58 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v59 = CCMenuItemSpriteExtra::create(v58, nullptr, a1, (cocos2d::SEL_MenuHandler *)AudioAssetsBrowser::onClose);
v60 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v59);
HIDWORD(v59->m_pfnSelector.adj) = 1070386381;
v61 = v59->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v60, (float)((float)(v98 * 0.5) - 220.0) + 10.0);
v62 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v99);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v61->setPosition_0)(v59, v62);
v63 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v63->setScale_0)(v63);
v64 = CCMenuItemSpriteExtra::create(v63, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelLeaderboard::onUpdate);
a1->m_refreshBtn = v64;
HIDWORD(v64->m_pfnSelector.adj) = 1069547520;
v65 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
a1->m_refreshBtn);
v66 = a1->m_refreshBtn->__vftable;
cocos2d::CCPoint::CCPoint(v65, (float)((float)(v98 * 0.5) + 220.0) - 25.0);
v67 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v99);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v66->setPosition_0)(a1->m_refreshBtn, v67);
a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0);
v68 = LoadingCircle::create();
a1->m_circle = v68;
v68->m_parentLayer = a1->m_mainLayer;
a1->m_circle->m_fade = 0;
cocos2d::CCObject::retain(a1->m_circle);
LoadingCircle::show(a1->m_circle);
a1->m_circle->setVisible(a1->m_circle, 0);
v103 = &v104;
v104 = 0;
v105 = 0;
v106 = 15;
*(_QWORD *)&v104 = sub_14003AA10(0x20u);
v105 = 31;
v106 = 31;
strcpy((char *)v104, "No Internet connection!");
v69 = cocos2d::CCPoint::CCPoint(1.6126443e-19, 0.5);
v71 = TextArea::create((__int64)&v104, &qword_14052A4D8, 1.0, 600.0, v70, 1101004800, 0);
a1->m_noInternet = (TextArea *)v71;
*((_DWORD *)v71 + 164) = 1106247680;
v72 = a1->m_noInternet->__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v69, v98 * 0.5);
v72->setPosition_0(a1->m_noInternet, v73);
((void (__fastcall *)(TextArea *))a1->m_noInternet->setScale_0)(a1->m_noInternet);
v74 = 2;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_noInternet, 2);
a1->m_noInternet->setVisible(a1->m_noInternet, 0);
if ( v48 != Editor )
{
v76 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v75);
v100 = v76;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v76, 2);
LODWORD(x) = (m_levelLength == 5) + 3;
v97.x = x;
v78 = 0;
while ( 1 )
{
v104 = 0;
v105 = 0;
v106 = 15;
LOBYTE(v104) = 0;
v79 = 0;
if ( !v78 )
{
v80 = (char *)sub_14003AA10(0x30u);
v105 = 35;
v106 = 47;
strcpy(v80, "levelLeaderboard_friendsBtn_001.png");
goto LABEL_38;
}
if ( v78 == 1 )
{
v80 = (char *)sub_14003AA10(0x30u);
v105 = 34;
v106 = 47;
strcpy(v80, "levelLeaderboard_globalBtn_001.png");
v79 = 1;
goto LABEL_38;
}
if ( v78 == 2 )
break;
if ( v78 == 3 )
{
v80 = (char *)sub_14003AA10(0x30u);
v105 = 33;
v106 = 47;
strcpy(v80, "levelLeaderboard_localBtn_001.png");
v79 = 3;
LABEL_38:
*(_QWORD *)&v104 = v80;
}
if ( v105 )
{
v81 = (const char *)&v104;
if ( v106 > 0xF )
v81 = (const char *)v104;
v82 = cocos2d::CCSprite::createWithSpriteFrameName(v81);
v83 = CCMenuItemSpriteExtra::create(
v82,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)LevelLeaderboard::onChangeType);
v83->setTag(v83, v79);
v76->addChild_1(v76, v83);
v84 = v83->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((float)v78 * 42.0, (float)((float)(v98 * 0.5) + 220.0) - 25.0);
v85 = cocos2d::CCNode::convertToNodeSpace(v100, (const struct cocos2d::CCPoint *)&v99);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v84->setPosition_0)(v83, v85);
if ( v79 == a1->m_type )
{
v83->setEnabled(v83, 0);
v101 = -26986;
LOWORD(m_levelType) = -26986;
BYTE2(m_levelType) = -106;
v82->setColor(&v82->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&m_levelType);
}
x = v97.x;
v76 = v100;
}
if ( v106 > 0xF )
{
v86 = (void *)v104;
if ( v106 + 1 >= 0x1000 )
{
v86 = *(void **)(v104 - 8);
if ( (unsigned __int64)(v104 - (_QWORD)v86 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v86);
}
if ( ++v78 >= SLODWORD(x) )
goto LABEL_50;
}
v80 = (char *)sub_14003AA10(0x30u);
v105 = 40;
v106 = 47;
strcpy(v80, "levelLeaderboard_globalWeeklyBtn_001.png");
v79 = 2;
goto LABEL_38;
}
LABEL_50:
if ( a1->m_level->m_normalPercent.random - a1->m_level->m_normalPercent.seed > a1->m_level->m_newNormalPercent2.random
- a1->m_level->m_newNormalPercent2.seed )
{
v100 = (cocos2d::CCNode *)&v107;
v107 = 0;
v108 = 0;
v109 = 15;
v87 = sub_14003AA10(0x120u);
v107.origin = (cocos2d::CCPoint)v87;
v108 = 276;
v109 = 287;
v88 = v87;
v89 = "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 se"
"e your leaderboard percentage by pressing the info button on the bottom left of the level page, or toggle th"
"e Leaderboard percent option.";
do
{
*v88 = *(_OWORD *)v89;
v88[1] = *((_OWORD *)v89 + 1);
v88[2] = *((_OWORD *)v89 + 2);
v88[3] = *((_OWORD *)v89 + 3);
v88[4] = *((_OWORD *)v89 + 4);
v88[5] = *((_OWORD *)v89 + 5);
v88[6] = *((_OWORD *)v89 + 6);
v88 += 8;
*(v88 - 1) = *((_OWORD *)v89 + 7);
v89 += 128;
--v74;
}
while ( v74 );
*v88 = *(_OWORD *)v89;
*((_DWORD *)v88 + 4) = *((_DWORD *)v89 + 4);
*((_BYTE *)v87 + 276) = 0;
v110 = 0;
v111 = 0;
v112 = 15;
*(_QWORD *)&v110 = sub_14003AA10(0x20u);
v111 = 18;
v112 = 31;
strcpy((char *)v110, "Level Leaderboards");
v90 = InfoAlertButton::create((__int64)&v110, (__int64)&v107);
v91 = ((float (__fastcall *)(cocos2d::CCMenu *, char *))a1->m_buttonMenu->addChild_1)(a1->m_buttonMenu, v90);
v92 = *(_QWORD *)v90;
cocos2d::CCPoint::CCPoint(v91, (float)((float)(v98 * 0.5) + 220.0) - 5.0);
v93 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v97);
(*(void (__fastcall **)(char *, struct cocos2d::CCPoint))(v92 + 184))(v90, v93);
}
v94 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v107.origin = (cocos2d::CCPoint)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v107.origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v94 = qword_1406C2ED8;
}
if ( *(_BYTE *)(v94 + 648) || a1->m_type == Local )
{
LevelLeaderboard::loadScores(a1);
}
else
{
LevelLeaderboard::setupLeaderboard(a1, nullptr);
v95 = &a1->LeaderboardManagerDelegate;
v96 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107.origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v107.origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v96 = (GameLevelManager *)qword_1406C2EC0;
}
v96->m_leaderboardManagerDelegate = v95;
GameLevelManager::updateUserScore(v96);
}
sub_14003A830((__int64)&Src);
return 1;
}
return result;
}