//
// sub_140078840 from 0x140078840 to 0x14007895b (283 bytes)
//
// 4 xrefs:
// > sub_14007D218 @ 0x14007d21f
// > ??> @ 0x1405395b8
// > ??> @ 0x1406c66a8
// > ??> @ 0x1406c66b4
//
// 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_140078840(char *Block, char a2)
{
char *v4; // rbx
GJAccountManager *v5; // rax
cocos2d::CCObject *v6; // rcx
*(_QWORD *)Block = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 40) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 41) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 42) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 43) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 44) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 51) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 54) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 79) = &AccountRegisterLayer::`vftable';
v4 = Block + 640;
*((_QWORD *)Block + 80) = &AccountRegisterLayer::`vftable';
*((_QWORD *)Block + 81) = &AccountRegisterLayer::`vftable';
v5 = GJAccountManager::sharedState();
if ( !Block )
v4 = nullptr;
if ( (char *)v5->m_accountRegisterDelegate == v4 )
GJAccountManager::sharedState()->m_accountRegisterDelegate = nullptr;
v6 = *((cocos2d::CCObject **)Block + 92);
if ( v6 )
cocos2d::CCObject::release(v6);
FLAlertLayer::dFLAlertLayer((__int64)Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}