//
// GJAccountManager::unlinkFromAccount from 0x847e50 to 0x847ef4 (164 bytes)
//
// 2 xrefs:
// > AccountHelpLayer::doUnlink @ 0x84d5fc
// > ??> @ 0x3f258
//
// 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 GJAccountManager::unlinkFromAccount(GJAccountManager *a1)
{
double v2; // d0
double v3; // d0
GameManager *v4; // x0
LocalLevelManager *v5; // x0
GJAccountDelegate *m_accountDelegate; // x0
GameManager *v7; // x0
*(_QWORD *)&v2 = sub_D1798C(&a1->m_GJP2, &byte_F288A0, 0).n128_u64[0];
*(_QWORD *)&v3 = sub_D1798C(&a1->m_password, &byte_F288A0, 0, v2).n128_u64[0];
sub_D1798C(&a1->m_username, &byte_F288A0, 0, v3);
a1->m_accountID = 0;
GameManager::sharedState()->m_shouldLoadUnlockValueKeeper = 1;
v4 = GameManager::sharedState();
v4->firstLoad(v4);
GameManager::sharedState()->m_shouldLoadUnlockValueKeeper = 0;
v5 = LocalLevelManager::sharedState();
v5->firstLoad(v5);
m_accountDelegate = a1->m_accountDelegate;
if ( m_accountDelegate )
m_accountDelegate->accountStatusChanged(m_accountDelegate);
v7 = GameManager::sharedState();
GameManager::accountStatusChanged(v7);
}