//
// ProfilePage::onCopyName from 0x5fc38c to 0x5fc4dc (336 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:36 +0000
//
_DWORD *__fastcall ProfilePage::onCopyName(_DWORD *this, cocos2d::CCObject *a2)
{
_DWORD *v2; // r7
cocos2d::CCDictionary **v3; // r0
int v4; // r3
int v5; // r3
int v6; // r0
int v7; // r1
_BYTE *v8; // r2
void (__fastcall *v9)(_DWORD *, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v10; // r0
int v11; // [sp+8h] [bp-44h] BYREF
int v12; // [sp+Ch] [bp-40h]
_BYTE *v13; // [sp+10h] [bp-3Ch]
int v14; // [sp+14h] [bp-38h] BYREF
int v15; // [sp+18h] [bp-34h]
_BYTE *v16; // [sp+1Ch] [bp-30h]
int v17[3]; // [sp+20h] [bp-2Ch] BYREF
int v18[3]; // [sp+2Ch] [bp-20h] BYREF
int v19[3]; // [sp+38h] [bp-14h] BYREF
v2 = this;
if ( !*(this + 138) )
return this;
v3 = (cocos2d::CCDictionary **)GameLevelManager::sharedState((GameLevelManager *)this);
GameLevelManager::tryGetUsername((GameLevelManager *)&v11, v3, *(_DWORD *)(v2[138] + 296));
v4 = (unsigned __int8)v11;
if ( (v11 & 1) == 0 )
{
if ( (unsigned __int8)v11 >> 1 )
goto LABEL_10;
goto LABEL_6;
}
if ( !v12 )
{
LABEL_6:
std::string::basic_string(&v14, v2[138] + 264);
if ( (v11 & 1) != 0 )
{
*v13 = 0;
v12 = 0;
}
else
{
LOWORD(v11) = 0;
}
std::string::reserve(&v11, 0);
v6 = v14;
v7 = v15;
v8 = v16;
v14 = 0;
v15 = 0;
v16 = nullptr;
v11 = v6;
v12 = v7;
v13 = v8;
std::string::~string((int)&v14);
v4 = (unsigned __int8)v11;
if ( (v11 & 1) != 0 )
goto LABEL_4;
LABEL_10:
v5 = v4 >> 1;
goto LABEL_11;
}
LABEL_4:
v5 = v12;
LABEL_11:
if ( !v5 )
std::string::assign(&v11, "-");
std::string::basic_string(v17, (int)&v11);
PlatformToolbox::copyToClipboard((int)v17);
std::string::~string((int)v17);
v9 = *(void (__fastcall **)(_DWORD *, cocos2d::CCNode *, int))(*v2 + 232);
memset(v18, 0, sizeof(v18));
std::string::__init(v18, "Copied to clipboard", 0x13u);
memset(v19, 0, sizeof(v19));
std::string::__init(v19, &unk_B6B226, 0);
v10 = TextAlertPopup::create((int)v18, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v19);
v9(v2, v10, 100);
std::string::~string((int)v19);
std::string::~string((int)v18);
return (_DWORD *)std::string::~string((int)&v11);
}