//
// sub_140078960 from 0x140078960 to 0x140078a93 (307 bytes)
//
// 3 xrefs:
// > sub_14007D20C @ 0x14007d213
// > ??> @ 0x1405399f0
// > ??> @ 0x1406c66c0
//
// 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_140078960(char *Block, char a2)
{
char *v4; // rbx
GJAccountManager *v5; // rax
cocos2d::CCObject *v6; // rcx
*(_QWORD *)Block = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 40) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 41) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 42) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 43) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 44) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 51) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 54) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 79) = &AccountLoginLayer::`vftable';
v4 = Block + 640;
*((_QWORD *)Block + 80) = &AccountLoginLayer::`vftable';
*((_QWORD *)Block + 81) = &AccountLoginLayer::`vftable';
v5 = GJAccountManager::sharedState();
if ( !Block )
v4 = nullptr;
if ( (char *)v5->m_accountLoginDelegate == v4 )
GJAccountManager::sharedState()->m_accountLoginDelegate = nullptr;
v6 = *((cocos2d::CCObject **)Block + 86);
if ( v6 )
cocos2d::CCObject::release(v6);
sub_14003A830((__int64)(Block + 728));
sub_14003A830((__int64)(Block + 696));
FLAlertLayer::dFLAlertLayer((__int64)Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}