//
// GJAccountManager::showAccountNeededAlert from 0x987c8c to 0x987dc8 (316 bytes)
//
// 10 xrefs:
// > CommentCell::onLike @ 0x735bfc
// > EditLevelLayer::onShare @ 0x7ee858
// > InfoLayer::onComment @ 0x9085c8
// > ProfilePage::onSendMessage @ 0xa55ae4
// > ProfilePage::onBlockUser @ 0xa5661c
// > ProfilePage::onFriend @ 0xa56b94
// > LevelListLayer::onShare @ 0xbadfb8
// > EditorSoundConfigInfoLayer::onUpload @ 0xccce18
// > EditorSoundConfigUploadPopup::performUpload @ 0xcd45c4
// > ??> @ 0xca228
//
// This function is hookable on this platform (idp: arm, 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 12:57:54 +0000
//
__int64 __fastcall GJAccountManager::showAccountNeededAlert(GJAccountManager *this, const char *a2)
{
cocos2d::CCString *v2; // x0
const char *CString; // x23
size_t v4; // x0
size_t v5; // x19
unsigned __int64 v6; // x0
char *v7; // x3
__int64 v8; // x0
__int64 v10; // [xsp+40h] [xbp+40h] BYREF
size_t v11; // [xsp+48h] [xbp+48h]
void *v12; // [xsp+50h] [xbp+50h]
v2 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You need an account to %s.\n"
"You can create one for free in the main menu.",
a2);
v10 = 0;
CString = (const char *)cocos2d::CCString::getCString(v2);
v11 = 0;
v12 = nullptr;
v4 = strlen(CString);
v5 = v4;
if ( v4 > 0xFFFFFFFFFFFFFFEFLL )
sub_62D5DC();
if ( v4 > 0x16 )
{
v6 = (v4 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v10 = v6 | 1;
v7 = (char *)operator new(v6);
v12 = v7;
v11 = v5;
LABEL_4:
v7 = (char *)memcpy(v7, CString, v5);
goto LABEL_5;
}
LOBYTE(v10) = 2 * v4;
v7 = (char *)&v10 + 1;
if ( v4 )
goto LABEL_4;
LABEL_5:
v7[v5] = 0;
v8 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"Account Needed",
(char *)&v10,
(ButtonSprite *)"Close",
nullptr,
380.0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
if ( (v10 & 1) != 0 )
operator delete(v12);
return _stack_chk_guard;
}