//
// AccountHelpLayer::FLAlert_Clicked from 0x14007fff0 to 0x140080365 (885 bytes)
//
// 2 xrefs:
// > ??> @ 0x14053ac90
// > ??> @ 0x1406c6990
//
// 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=5
void AccountHelpLayer::FLAlert_Clicked(AccountHelpLayer *a1, FLAlertLayer *a2, bool a3)
{
int v5; // eax
__int64 v6; // rdx
__int64 v7; // rcx
int v8; // eax
__int64 v9; // rax
unsigned __int8 *p_m_uOrderOfArrival; // rbx
GJAccountManager *v11; // rdi
_BYTE *v12; // rcx
__int64 v13; // rax
LocalLevelManager *v14; // rax
GJAccountDelegate *m_accountDelegate; // rcx
__int64 v16; // rax
MenuLayer *v17; // rcx
__int64 v18; // rax
FLAlertLayer *v19; // rbx
__int128 v20; // [rsp+50h] [rbp-48h] BYREF
__int64 v21; // [rsp+60h] [rbp-38h]
__int64 v22; // [rsp+68h] [rbp-30h]
_BYTE v23[40]; // [rsp+70h] [rbp-28h] BYREF
void *v24; // [rsp+A8h] [rbp+10h]
void *v25; // [rsp+A8h] [rbp+10h]
void *v26; // [rsp+A8h] [rbp+10h]
v5 = ((__int64 (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) - 3;
if ( v5 )
{
v8 = v5 - 1;
if ( v8 )
{
if ( v8 == 1 && a3 )
{
v9 = cocos2d::CCApplication::sharedApplication(v7, v6);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v9 + 88LL))(
v9,
"https://www.boomlings.com/database/accounts/accountManagement.php");
}
}
else if ( a3 )
{
p_m_uOrderOfArrival = (unsigned __int8 *)&a1[-1].m_uOrderOfArrival;
v11 = GJAccountManager::sharedState();
sub_14003CCE0((void **)&v11->m_GJP2, byte_140518980, 0);
sub_14003CCE0((void **)&v11->m_password, byte_140518980, 0);
sub_14003CCE0((void **)&v11->m_username, byte_140518980, 0);
v11->m_accountID = 0;
v12 = (_BYTE *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v24 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v24);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v12 = (_BYTE *)qword_1406C2ED8;
}
v12[1006] = 1;
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 896LL))(v12);
v13 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v25 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v25);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v13 = qword_1406C2ED8;
}
*(_BYTE *)(v13 + 1006) = 0;
v14 = LocalLevelManager::sharedState();
v14->firstLoad(v14);
m_accountDelegate = v11->m_accountDelegate;
if ( m_accountDelegate )
m_accountDelegate->accountStatusChanged(m_accountDelegate);
v16 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v26 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v26);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v16 = qword_1406C2ED8;
}
v17 = *(MenuLayer **)(v16 + 552);
if ( v17 )
MenuLayer::updateUserProfileButton(v17);
(*(void (__fastcall **)(unsigned __int8 *, _QWORD))(*(_QWORD *)p_m_uOrderOfArrival + 976LL))(
p_m_uOrderOfArrival,
0);
(*(void (__fastcall **)(unsigned __int8 *))(*(_QWORD *)p_m_uOrderOfArrival + 1104LL))(p_m_uOrderOfArrival);
(*(void (__fastcall **)(unsigned __int8 *, _QWORD))(*(_QWORD *)p_m_uOrderOfArrival + 1072LL))(
p_m_uOrderOfArrival,
p_m_uOrderOfArrival[600]);
}
}
else if ( a3 )
{
if ( a1 == (AccountHelpLayer *)616 )
LODWORD(a1) = 0;
v20 = 0;
*(_QWORD *)&v20 = sub_14003AA10(0x70u);
v21 = 110;
v22 = 111;
strcpy(
(char *)v20,
"This will delete ALL save data.\nDo you want to continue?\n(You cannot undo this action)");
v18 = sub_14003BDB0((__int64)v23, (__int64)&v20);
v19 = FLAlertLayer::create(
(int)a1,
(int)"Warning",
v18,
(__int64)"Cancel",
(__int64)"DELETE",
1133903872,
0,
0,
1065353216);
sub_14003A830((__int64)&v20);
v19->setTag(v19, 4);
ButtonSprite::updateBGImage(v19->m_button2, "GJ_button_06.png");
v19->show(v19);
}
}