//
// sub_14007D340 from 0x14007d340 to 0x14007d4a8 (360 bytes)
//
// 3 xrefs:
// > sub_1400803F8 @ 0x1400803ff
// > ??> @ 0x14053b2d8
// > ??> @ 0x1406c6888
//
// 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
//
// Hidden C++ exception states: #wind=1
char *__fastcall sub_14007D340(char *Block, char a2)
{
char *v4; // rbx
char *v5; // r14
char *v6; // rsi
GJAccountManager *v7; // rax
GJAccountManager *v8; // rax
GJAccountManager *v9; // rax
*(_QWORD *)Block = &AccountLayer::`vftable';
*((_QWORD *)Block + 40) = &AccountLayer::`vftable';
*((_QWORD *)Block + 41) = &AccountLayer::`vftable';
*((_QWORD *)Block + 42) = &AccountLayer::`vftable';
*((_QWORD *)Block + 43) = &AccountLayer::`vftable';
*((_QWORD *)Block + 44) = &AccountLayer::`vftable';
*((_QWORD *)Block + 51) = &AccountLayer::`vftable';
*((_QWORD *)Block + 54) = &AccountLayer::`vftable';
v4 = Block + 608;
*((_QWORD *)Block + 76) = &AccountLayer::`vftable';
v5 = Block + 616;
*((_QWORD *)Block + 77) = &AccountLayer::`vftable';
v6 = Block + 624;
*((_QWORD *)Block + 78) = &AccountLayer::`vftable';
*((_QWORD *)Block + 79) = &AccountLayer::`vftable';
v7 = GJAccountManager::sharedState();
if ( !Block )
v4 = nullptr;
if ( (char *)v7->m_accountDelegate == v4 )
GJAccountManager::sharedState()->m_accountDelegate = nullptr;
v8 = GJAccountManager::sharedState();
if ( !Block )
v5 = nullptr;
if ( (char *)v8->m_backupDelegate == v5 )
GJAccountManager::sharedState()->m_backupDelegate = nullptr;
v9 = GJAccountManager::sharedState();
if ( !Block )
v6 = nullptr;
if ( (char *)v9->m_syncDelegate == v6 )
GJAccountManager::sharedState()->m_syncDelegate = nullptr;
GJDropDownLayer::dGJDropDownLayer(Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}