//
// GJScoreCell::onViewProfile from 0x1401569b0 to 0x140156b2d (381 bytes)
//
// 4 xrefs:
// > GJScoreCell::loadFromScore @ 0x1401556af
// > ??> @ 0x14089af7c
// > ??> @ 0x14089af8c
// > ??> @ 0x140917948
//
// 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:27:20 +0000
//
char __fastcall GJScoreCell::onViewProfile(__int64 a1)
{
__int64 v1; // rax
__int64 v2; // rdi
__int64 v3; // rax
__int64 v4; // rcx
__int64 v5; // rcx
__int64 v6; // rcx
__int64 v7; // rbx
__int64 v8; // rcx
struct cocos2d::CCScene *v9; // rbx
__int64 v10; // rcx
cocos2d::CCDirector *v11; // rax
cocos2d::CCString *v12; // rax
const char *CString; // rax
size_t v14; // r8
__int64 v15; // rbx
__int64 v16; // rdx
__int64 v17; // rcx
__int64 v18; // r8
__int64 v19; // r9
struct cocos2d::CCScene *v20; // rdi
__int64 v21; // rcx
__int64 v22; // rax
struct cocos2d::CCScene *v23; // rbx
__int64 v24; // rcx
cocos2d::CCDirector *v25; // rax
__int128 v27; // [rsp+20h] [rbp-28h] BYREF
__int64 v28; // [rsp+30h] [rbp-18h]
__int64 v29; // [rsp+38h] [rbp-10h]
v1 = *(_QWORD *)(a1 + 568);
v2 = a1;
if ( v1 && (a1 = *(unsigned int *)(v1 + 392), (int)a1 > 0) )
{
v3 = ProfilePage::create(a1, 0);
LOBYTE(v1) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 1064LL))(v3);
}
else if ( *(_DWORD *)(v1 + 384) == 1 )
{
v1 = cocos2d::CCDirector::sharedDirector(a1);
if ( !*(_BYTE *)(v1 + 176) )
{
v5 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(v4) + 272);
if ( *(_DWORD *)(v5 + 28) != 15 )
{
if ( *(_QWORD *)(cocos2d::CCDirector::sharedDirector(v5) + 96) )
{
v9 = *(struct cocos2d::CCScene **)(cocos2d::CCDirector::sharedDirector(v6) + 96);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::popToSceneInStack(v11, v9);
}
else
{
v7 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(v6) + 272);
*(_QWORD *)(cocos2d::CCDirector::sharedDirector(v8) + 96) = v7;
}
}
v12 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
*(unsigned int *)(*(_QWORD *)(v2 + 568) + 388LL));
CString = cocos2d::CCString::getCString(v12);
v27 = 0;
v28 = 0;
v14 = -1;
v29 = 0;
do
++v14;
while ( CString[v14] );
sub_14003D230(&v27, CString, v14);
v15 = GJSearchObject::create_1(5, &v27);
v20 = (struct cocos2d::CCScene *)cocos2d::CCScene::create(v17, v16, v18, v19);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v21) + 232) = v20;
v22 = LevelBrowserLayer::create(v15);
(*(void (__fastcall **)(struct cocos2d::CCScene *, __int64))(*(_QWORD *)v20 + 464LL))(v20, v22);
v23 = cocos2d::CCTransitionFade::create(0.5, v20);
v25 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v24);
LOBYTE(v1) = cocos2d::CCDirector::pushScene(v25, v23);
}
}
return v1;
}