//
// ProfilePage::init from 0x1403be840 to 0x1403bf7ee (4014 bytes)
//
// 2 xrefs:
// > ProfilePage::create @ 0x1403be7fd
// > ??> @ 0x1406d7724
//
// 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=20
bool ProfilePage::init(ProfilePage *a1, int a2, bool a3)
{
bool result; // al
__int64 v7; // rcx
GJAccountManager *v8; // rax
__int64 v9; // rax
GJAccountManager *v10; // rax
int v11; // ebx
__int64 v12; // rcx
GameLevelManager *v13; // rcx
GameLevelManager *v14; // rcx
GameLevelManager *v15; // rcx
GameLevelManager *v16; // rcx
GameLevelManager *v17; // rcx
GameLevelManager *v18; // rcx
cocos2d::CCArray *v19; // rax
__int64 v20; // rcx
cocos2d::CCDirector *v21; // rax
struct cocos2d::CCRect *v22; // rax
struct cocos2d::extension::CCScale9Sprite *v23; // rdi
__int64 v24; // rdx
cocos2d::extension::CCScale9Sprite_vtbl *v25; // rbx
const cocos2d::CCSize *v26; // rax
float v27; // xmm0_4
cocos2d::extension::CCScale9Sprite_vtbl *v28; // rbx
const cocos2d::CCPoint *v29; // rax
GJAccountManager *v30; // rax
GJAccountManager *v31; // rax
GJAccountManager *v32; // rax
int v33; // edi
__int64 v34; // rax
int v35; // ebx
__int64 v36; // rcx
__int64 v37; // rcx
const char *v38; // rcx
cocos2d::CCLabelBMFont *v39; // rax
float v40; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v41; // rbx
const cocos2d::CCPoint *v42; // rax
struct cocos2d::CCSprite *v43; // rdi
__int64 v44; // rdx
float v45; // xmm0_4
const cocos2d::CCPoint *v46; // rax
double v47; // xmm0_8
const char *v48; // rdx
GJCommentListLayer *v49; // rbx
__int64 v50; // rcx
__int64 v51; // rax
cocos2d::CCTouchDispatcher *v52; // rax
float v53; // xmm0_4
double v54; // xmm0_8
struct cocos2d::CCSprite *v55; // rax
CCMenuItemSpriteExtra *v56; // rax
cocos2d::CCMenu *v57; // rax
cocos2d::CCMenu_vtbl *v58; // rbx
const cocos2d::CCPoint *v59; // rax
__int64 v60; // rcx
cocos2d::CCDirector *v61; // rax
struct cocos2d::CCSprite *v62; // rbx
CCMenuItemSpriteExtra *v63; // rax
float v64; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v65; // rbx
struct cocos2d::CCPoint v66; // rax
cocos2d::CCSprite *v67; // rbx
CCMenuItemSpriteExtra *v68; // rax
float v69; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v70; // rbx
struct cocos2d::CCPoint v71; // rax
__int64 v72; // rcx
cocos2d::CCArray *v73; // rax
cocos2d::CCLabelBMFont *v74; // rax
float v75; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v76; // rbx
__int64 v77; // rax
double v78; // xmm0_8
GJAccountManager *v79; // rax
GameLevelManager *v80; // rcx
bool isFollowingUser; // di
const char *v82; // rcx
struct cocos2d::CCSprite *v83; // rax
CCMenuItemSpriteExtra *v84; // rax
CCMenuItemSpriteExtra_vtbl *v85; // rbx
struct cocos2d::CCPoint v86; // rax
struct cocos2d::CCSprite *v87; // rbx
float v88; // xmm0_4
LoadingCircle *v89; // rax
float v90; // xmm0_4
cocos2d::CCSprite *m_sprite; // rbx
cocos2d::CCSprite_vtbl *v92; // rdi
const cocos2d::CCPoint *v93; // rax
struct cocos2d::CCSprite *v94; // rax
CCMenuItemSpriteExtra *v95; // rax
float v96; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v97; // rbx
struct cocos2d::CCPoint v98; // rax
__int64 v99; // rcx
__int64 v100; // rax
_BOOL8 v101; // rdx
__int64 v102; // rax
GameLevelManager *v103; // rcx
GJUserScore *v104; // rax
GameLevelManager *v105; // rcx
__int64 v106; // [rsp+38h] [rbp-69h] BYREF
cocos2d::CCRect *v107; // [rsp+40h] [rbp-61h] BYREF
float v108; // [rsp+48h] [rbp-59h]
cocos2d::CCRect v109[2]; // [rsp+50h] [rbp-51h] BYREF
char v110[8]; // [rsp+70h] [rbp-31h] BYREF
_QWORD v111[4]; // [rsp+78h] [rbp-29h] BYREF
result = FLAlertLayer::init_1(a1, 150);
if ( result )
{
a1->m_accountID = a2;
if ( a3
&& (v8 = GJAccountManager::sharedState(), v7 = (unsigned int)(v8->m_accountID - v8->m_unkInt1), a2 == (_DWORD)v7) )
{
a1->m_ownProfile = 1;
v9 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v107 = (cocos2d::CCRect *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v9 = qword_1406C2ED8;
}
if ( !*(_BYTE *)(v9 + 648) )
{
v10 = GJAccountManager::sharedState();
v11 = v10->m_accountID - v10->m_unkInt1;
v12 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v12 = qword_1406C2EC0;
}
cocos2d::CCDictionary::removeObjectForKey(*(cocos2d::CCDictionary **)(v12 + 600), v11);
v13 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v13 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::invalidateMessages(v13, 1, 0);
v14 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v14 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::invalidateMessages(v14, 0, 0);
v15 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v15 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::invalidateRequests(v15, 1, 0);
v16 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v16 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::invalidateRequests(v16, 0, 0);
v17 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v17 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::resetStoredUserList(v17, (UserListType)0);
v18 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v18 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::resetStoredUserList(v18, Blocked);
}
}
else
{
a1->m_ownProfile = 0;
}
v19 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);
a1->m_arrayWithUsernameLabel = v19;
cocos2d::CCObject::retain(v19);
v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v20);
cocos2d::CCDirector::getWinSize(v21);
cocos2d::CCRect::CCRect(v109, 0.0, 0.0, 80.0, 80.0);
v23 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v22);
LOBYTE(v24) = -1;
v23->setOpacity(&v23->cocos2d::CCRGBAProtocol, v24);
v25 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v107, 440.0, 290.0);
v25->setContentSize(v23, v26);
v27 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v23,
0xFFFFFFFFLL);
v28 = v23->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v27, v108 * 0.5);
v28->setPosition_0(v23, v29);
v30 = GJAccountManager::sharedState();
if ( a2 == v30->m_accountID - v30->m_unkInt1 )
{
v107 = v109;
v31 = GJAccountManager::sharedState();
sub_14003BDB0((__int64)v109, (__int64)&v31->m_username);
v32 = GJAccountManager::sharedState();
v33 = v32->m_accountID - v32->m_unkInt1;
v34 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v106 = (__int64)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v106);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v34 = qword_1406C2ED8;
}
v35 = *(_DWORD *)(v34 + 652) - *(_DWORD *)(v34 + 656);
v36 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v106 = (__int64)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v106);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v36 = qword_1406C2EC0;
}
GameLevelManager::storeUserName(v36, v35, v33, v109);
}
v37 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v107 = (cocos2d::CCRect *)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v37 = qword_1406C2EC0;
}
GameLevelManager::tryGetUsername(v37, (__int64)v111, a2);
v38 = (const char *)v111;
if ( v111[3] > 0xFu )
v38 = (const char *)v111[0];
v39 = cocos2d::CCLabelBMFont::create(v38, (const char *)&qword_14052A4D8);
a1->m_usernameLabel = v39;
v40 = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v39,
20);
v41 = a1->m_usernameLabel->__vftable;
cocos2d::CCPoint::CCPoint(v40, v108 * 0.5);
v41->setPosition_0(a1->m_usernameLabel, v42);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_usernameLabel, 160.0, 0.80000001, 0.0);
cocos2d::CCArray::addObject(a1->m_arrayWithUsernameLabel, a1->m_usernameLabel);
v43 = cocos2d::CCSprite::createWithSpriteFrameName("floorLine_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v43->setScaleX)(v43);
((void (__fastcall *)(struct cocos2d::CCSprite *))v43->setScaleY)(v43);
LOBYTE(v44) = 100;
v43->setOpacity(&v43->cocos2d::CCRGBAProtocol, v44);
v45 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCSprite *, _QWORD))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v43,
0);
cocos2d::CCPoint::CCPoint(v45, 0.0);
v46 = a1->m_usernameLabel->getPosition_0(a1->m_usernameLabel);
v47 = cocos2d::CCPoint::operator+(v46, &v106);
v43->setPosition_0(v43, (const cocos2d::CCPoint *)&v106);
v106 = 0x100000302LL;
((void (__fastcall *)(cocos2d::CCTextureProtocol *, __int64))v43->setBlendFunc)(
&v43->cocos2d::CCTextureProtocol,
0x100000302LL);
cocos2d::CCArray::addObject(a1->m_arrayWithUsernameLabel, v43);
cocos2d::CCPoint::CCPoint(*(float *)&v47, v108 * 0.5);
LODWORD(v106) = -12684609;
v49 = GJCommentListLayer::create(nullptr, v48, (cocos2d::ccColor4B)-12684609, 340.0, 45.0, 0);
v51 = cocos2d::CCDirector::sharedDirector(v50);
v52 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 144LL))(v51);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v52, v49);
v53 = ((float (__fastcall *)(cocos2d::CCLayer *, GJCommentListLayer *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v49,
1);
cocos2d::CCPoint::CCPoint(v53, -170.0);
v54 = cocos2d::CCPoint::operator+(v110, &v106);
v49->setPosition_0(v49, (const cocos2d::CCPoint *)&v106);
cocos2d::CCArray::addObject(a1->m_arrayWithUsernameLabel, v49);
v55 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v56 = CCMenuItemSpriteExtra::create(v55, nullptr, a1, (cocos2d::SEL_MenuHandler *)ProfilePage::onClose);
HIDWORD(v56->m_pfnSelector.adj) = 1070386381;
v57 = cocos2d::CCMenu::create(v56, 0);
a1->m_buttonMenu = v57;
v58 = v57->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v54, (float)((float)(v108 * 0.5) - 220.0) + 10.0);
v58->setPosition_0(a1->m_buttonMenu, v59);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_buttonMenu, 10);
v61 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v60);
cocos2d::CCDirector::getWinSize(v61);
v62 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v62->setScale_0)(v62);
v63 = CCMenuItemSpriteExtra::create(v62, nullptr, a1, (cocos2d::SEL_MenuHandler *)ProfilePage::onPrevPage);
a1->m_leftArrow = v63;
v64 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v63);
v65 = a1->m_leftArrow->__vftable;
cocos2d::CCPoint::CCPoint(v64, (float)(*(float *)&v106 * 0.5) - 195.0);
v66 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v109[0].origin);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v65->setPosition_0)(a1->m_leftArrow, v66);
HIDWORD(a1->m_leftArrow->m_pfnSelector.adj) = 0x40000000;
v67 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v67, 1);
((void (__fastcall *)(cocos2d::CCSprite *))v67->setScale_0)(v67);
v68 = CCMenuItemSpriteExtra::create(v67, nullptr, a1, (cocos2d::SEL_MenuHandler *)ProfilePage::onNextPage);
a1->m_rightArrow = v68;
v69 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v68);
v70 = a1->m_rightArrow->__vftable;
cocos2d::CCPoint::CCPoint(v69, (float)(*(float *)&v106 * 0.5) + 195.0);
v71 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v107);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v70->setPosition_0)(a1->m_rightArrow, v71);
HIDWORD(a1->m_rightArrow->m_pfnSelector.adj) = 0x40000000;
a1->m_leftArrow->setVisible(a1->m_leftArrow, 0);
a1->m_rightArrow->setVisible(a1->m_rightArrow, 0);
v73 = (cocos2d::CCArray *)cocos2d::CCArray::create(v72);
a1->m_buttons = v73;
cocos2d::CCObject::retain(v73);
v74 = cocos2d::CCLabelBMFont::create("Something went wrong...", "goldFont.fnt");
a1->m_somethingWentWrong = v74;
v75 = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v74,
10);
v76 = a1->m_somethingWentWrong->__vftable;
cocos2d::CCPoint::CCPoint(v75, v108 * 0.5);
v78 = ((double (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v76->setPosition_0)(a1->m_somethingWentWrong, v77);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_somethingWentWrong->setScale_0)(a1->m_somethingWentWrong);
a1->m_somethingWentWrong->setVisible(a1->m_somethingWentWrong, 0);
v79 = GJAccountManager::sharedState();
if ( v79->m_accountID - v79->m_unkInt1 != a1->m_accountID )
{
v80 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v80 = (GameLevelManager *)qword_1406C2EC0;
}
isFollowingUser = GameLevelManager::isFollowingUser(v80, a1->m_accountID);
cocos2d::CCPoint::CCPoint(*(float *)&v78, (float)(v108 * 0.5) - 158.0);
v82 = "gj_heartOff_001.png";
if ( isFollowingUser )
v82 = "gj_heartOn_001.png";
v83 = cocos2d::CCSprite::createWithSpriteFrameName(v82);
v84 = CCMenuItemSpriteExtra::create(v83, nullptr, a1, (cocos2d::SEL_MenuHandler *)ProfilePage::onFollow);
a1->m_followBtn = v84;
HIDWORD(v84->m_pfnSelector.adj) = 1066192077;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, a1->m_followBtn);
v85 = a1->m_followBtn->__vftable;
v86 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v109[0].origin);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v85->setPosition_0)(a1->m_followBtn, v86);
if ( !isFollowingUser )
{
v87 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_followTxt_001.png");
v88 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v87,
2);
cocos2d::CCPoint::CCPoint(v88, 48.0);
cocos2d::CCPoint::operator+(&v106, &v107);
v87->setPosition_0(v87, (const cocos2d::CCPoint *)&v107);
}
}
v89 = LoadingCircle::create();
a1->m_circle = v89;
v89->m_parentLayer = a1->m_mainLayer;
a1->m_circle->m_fade = 0;
cocos2d::CCObject::retain(a1->m_circle);
LoadingCircle::show(a1->m_circle);
v90 = ((float (__fastcall *)(LoadingCircle *, _QWORD))a1->m_circle->setVisible)(a1->m_circle, 0);
m_sprite = a1->m_circle->m_sprite;
v92 = m_sprite->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v90, v108 * 0.5);
v92->setPosition_0(m_sprite, v93);
v94 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
v95 = CCMenuItemSpriteExtra::create(v94, nullptr, a1, (cocos2d::SEL_MenuHandler *)ProfilePage::onUpdate);
a1->m_refreshBtn = v95;
HIDWORD(v95->m_pfnSelector.adj) = 1069547520;
v96 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
a1->m_refreshBtn);
v97 = a1->m_refreshBtn->__vftable;
cocos2d::CCPoint::CCPoint(v96, (float)((float)(v108 * 0.5) - 220.0) + 10.0);
v98 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v107);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v97->setPosition_0)(a1->m_refreshBtn, v98);
a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0);
v99 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v99 = qword_1406C2EC0;
}
*(_QWORD *)(v99 + 800) = &a1->UserInfoDelegate;
if ( !a1->m_ownProfile )
goto LABEL_51;
v100 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v99 = qword_1406C2EC0;
v100 = qword_1406C2ED8;
}
if ( *(_BYTE *)(v100 + 648) )
{
LABEL_51:
if ( !v99 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v99 = qword_1406C2EC0;
}
v104 = (GJUserScore *)cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v99 + 600), a1->m_accountID);
if ( v104 )
{
if ( v104->m_friendReqStatus == 2 )
ProfilePage::setupCommentsBrowser(a1, nullptr);
else
a1->getUserInfoFinished(&a1->UserInfoDelegate, v104);
}
else
{
a1->m_circle->setVisible(a1->m_circle, 1);
a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0);
ProfilePage::setupCommentsBrowser(a1, nullptr);
v105 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v105 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::getGJUserInfo(v105, a1->m_accountID);
}
}
else
{
ProfilePage::setupCommentsBrowser(a1, nullptr);
v102 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v102 = qword_1406C2EC0;
}
*(_QWORD *)(v102 + 776) = &a1->LeaderboardManagerDelegate;
LOBYTE(v101) = 1;
a1->m_circle->setVisible(a1->m_circle, v101);
a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0);
v103 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v109[0].origin = (cocos2d::CCPoint)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v109[0].origin);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v103 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::updateUserScore(v103);
}
sub_14003A830((__int64)v111);
return 1;
}
return result;
}