//
// AccountHelpLayer::onUnlink from 0x100167464 to 0x100167574 (272 bytes)
//
// 1 xrefs:
// > AccountHelpLayer::customSetup @ 0x1001671c8
//
// 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
//
void __fastcall AccountHelpLayer::onUnlink(AccountHelpLayer *a1, cocos2d::CCObject *a2)
{
GJAccountManager *v3; // x0
void **v4; // x8
cocos2d::CCString *v5; // x0
char *CString; // x20
ButtonSprite **v7; // x19
void *v8[2]; // [xsp+8h] [xbp-48h] BYREF
char v9; // [xsp+1Fh] [xbp-31h]
void *__p[2]; // [xsp+20h] [xbp-30h] BYREF
char *longStorage; // [xsp+30h] [xbp-20h]
v3 = GJAccountManager::sharedState();
if ( v3->m_username.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(__p, (void *)v3->m_username.m_data.m_long.capacitym1, v3->m_username.m_data.m_long.size);
}
else
{
*(_OWORD *)__p = *(_OWORD *)&v3->m_username.m_data.m_short.sizex2;
longStorage = v3->m_username.m_data.m_long.longStorage;
}
v4 = __p;
if ( SHIBYTE(longStorage) < 0 )
v4 = (void **)__p[0];
v5 = (cocos2d::CCString *)sub_100268F4C(
"Are you sure you want to unlink from the account %s?\n"
"Unlinking will delete all data from this device.",
(const char *)v4);
CString = (char *)cocos2d::CCString::getCString(v5);
if ( SHIBYTE(longStorage) < 0 )
operator delete(__p[0]);
sub_100009900(v8, CString);
v7 = (ButtonSprite **)FLAlertLayer::create_1(
&a1->FLAlertLayerProtocol,
"Unlink Account",
v8,
"Cancel",
"Unlink",
300.0);
if ( v9 < 0 )
operator delete(v8[0]);
ButtonSprite::updateBGImage(v7[75], "GJ_button_05.png");
(*(void (__fastcall **)(ButtonSprite **, __int64))&(*v7)->m_fVertexZ)(v7, 3);
(*(void (__fastcall **)(ButtonSprite **))&(*v7)[1].m_fTextureTop)(v7);
}