//
// AccountHelpLayer::onUnlink from 0x140095280 to 0x14009541c (412 bytes)
//
// 2 xrefs:
// > AccountHelpLayer::customSetup @ 0x140094f8f
// > ??> @ 0x140912c44
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:26:02 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall AccountHelpLayer::onUnlink(__int64 a1)
{
__int64 v2; // rax
const char *v3; // rdx
cocos2d::CCString *v4; // rax
const char *CString; // rdi
int v6; // esi
size_t v7; // r8
__int64 v8; // rax
__int64 *v9; // rbx
__int128 v11; // [rsp+58h] [rbp-60h] BYREF
__int64 v12; // [rsp+68h] [rbp-50h]
__int64 v13; // [rsp+70h] [rbp-48h]
_QWORD v14[4]; // [rsp+80h] [rbp-38h] BYREF
v2 = GJAccountManager::sharedState(a1);
sub_14003F4F0((__int64)v14, v2 + 328);
v3 = (const char *)v14;
if ( v14[3] > 0xFu )
v3 = (const char *)v14[0];
v4 = cocos2d::CCString::createWithFormat(
"Are you sure you want to unlink from the account %s?\n"
"Unlinking will delete all data from this device.",
v3);
CString = cocos2d::CCString::getCString(v4);
sub_14003D310((__int64)v14);
v6 = a1 + 616;
if ( !a1 )
v6 = 0;
v11 = 0;
v12 = 0;
v13 = 0;
v7 = -1;
do
++v7;
while ( CString[v7] );
sub_14003D230(&v11, CString, v7);
v8 = sub_14003F4F0((__int64)v14, (__int64)&v11);
v9 = (__int64 *)FLAlertLayer::create(
v6,
(int)"Unlink Account",
v8,
(__int64)"Cancel",
(__int64)"Unlink",
1133903872,
0,
0,
1065353216);
sub_14003D310((__int64)&v11);
ButtonSprite::updateBGImage(v9[77], "GJ_button_05.png");
(*(void (__fastcall **)(__int64 *, __int64))(*v9 + 64))(v9, 3);
return (*(__int64 (__fastcall **)(__int64 *))(*v9 + 1064))(v9);
}