//
// AccountHelpLayer::onUnlink from 0x98e30c to 0x98e488 (380 bytes)
//
// 3 xrefs:
// > ??> @ 0x52e28
// > AccountHelpLayer::customSetup @ 0x98ea5c
// > ??> @ 0x1541cd0
//
// 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:57 +0000
//
__int64 __fastcall AccountHelpLayer::onUnlink(AccountHelpLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x2
__int64 v4; // x1
char *v5; // x1
cocos2d::CCString *v6; // x0
char *CString; // x21
size_t v8; // x0
ButtonSprite **v9; // x19
__int64 v11; // [xsp+30h] [xbp+30h] BYREF
__int64 v12; // [xsp+38h] [xbp+38h]
char *v13; // [xsp+40h] [xbp+40h]
v11 = 0;
v12 = 0;
v3 = GJAccountManager::sharedState(_stack_chk_guard) + 328;
v13 = nullptr;
if ( (*(_BYTE *)v3 & 1) != 0 )
{
std::string::__init(&v11, *(void **)(v3 + 16), *(_QWORD *)(v3 + 8));
}
else
{
v4 = *(_QWORD *)(v3 + 8);
v11 = *(_QWORD *)v3;
v12 = v4;
v13 = *(char **)(v3 + 16);
}
v5 = (char *)&v11 + 1;
if ( (v11 & 1) != 0 )
v5 = v13;
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Are you sure you want to unlink from the account %s?\n"
"Unlinking will delete all data from this device.",
v5);
CString = (char *)cocos2d::CCString::getCString(v6);
if ( (v11 & 1) != 0 )
operator delete(v13);
v11 = 0;
v12 = 0;
v13 = nullptr;
v8 = strlen(CString);
std::string::__init(&v11, CString, v8);
v9 = (ButtonSprite **)FLAlertLayer::create(
(__int64)this + 616,
(cocos2d::CCLabelBMFont *)"Unlink Account",
(char *)&v11,
(ButtonSprite *)"Cancel",
(ButtonSprite *)"Unlink",
300.0);
if ( (v11 & 1) != 0 )
operator delete(v13);
ButtonSprite::updateBGImage(v9[77], "GJ_button_05.png");
(*((void (__fastcall **)(ButtonSprite **, __int64))*v9 + 9))(v9, 3);
(*((void (__fastcall **)(ButtonSprite **))*v9 + 164))(v9);
return _stack_chk_guard;
}