//
// FLAlertLayer::init from 0x14005a810 to 0x14005b39b (2955 bytes)
//
// 31 xrefs:
// > FLAlertLayer::create @ 0x14005a6c6
// > AudioAssetsBrowser::onInfo @ 0x140099e72
// > AccountReviewPopup::confirmDeleteSelected @ 0x1400b95eb
// > AccountReviewPopup::reviewChoicePicked @ 0x1400ba9fe
// > AccountReviewPopup::onDeleteRow @ 0x1400baffe
// > AccountReviewPopup::onDeleteFilterRow @ 0x1400bc43e
// > ReportPopup::onSubmit @ 0x1400c1ca5
// > AutoBackupPopup::onDeleteSelected @ 0x1400cc9b2
// > AutoBackupOptionsPopup::onPrune @ 0x1400ce993
// > AutoBackupOptionsPopup::onDeleteAll @ 0x1400cee39
// > MemberListPopup::onRevokeInvite @ 0x1400ecffc
// > MemberListPopup::onKickMember @ 0x1400ed20c
// > MemberListPopup::onTransferOwner @ 0x1400ed43c
// > ThreadOptionsPopup::onLeave @ 0x1400f516b
// > ThreadOptionsPopup::onDismissRemoved @ 0x1400f5303
// > ThreadOptionsPopup::onCancelRequest @ 0x1400f58dd
// > InvitesPopup::declineInvite @ 0x1400f96c6
// > GJMessageCell::onDeleteMessage @ 0x14015d6af
// > FRequestProfilePage::onDeleteSelected @ 0x14021126f
// > FRequestProfilePage::onDeleteSelected @ 0x14021139f
// > FriendRequestPopup::onIgnore @ 0x1403a2844
// > FriendRequestPopup::onBlock @ 0x1403a2df6
// > GJMessagePopup::onRemove @ 0x1403a45e8
// > GJMessagePopup::onBlock @ 0x1403a47c6
// > LevelBrowserLayer::onProcessSelected @ 0x1403e967f
// > MessagesProfilePage::onDeleteSelected @ 0x1404769b2
// > MusicDownloadManager::showTOS @ 0x140484d38
// > ProfilePage::onFriend @ 0x1405572e8
// > ProfilePage::onBlockUser @ 0x140557576
// > ProfilePage::createUnfriendAlert @ 0x14055913c
// > ??> @ 0x1409106e8
//
// 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:25:42 +0000
//
// Hidden C++ exception states: #wind=4
char __fastcall FLAlertLayer::init(
cocos2d::CCLayerColor *a1,
__int64 a2,
const char *a3,
__int64 a4,
__int64 a5,
__int64 a6,
float a7,
char a8,
int a9,
float a10)
{
__int64 v14; // rcx
__int64 v15; // rdx
__int64 v16; // rdx
__int64 v17; // rdx
__int64 v18; // rax
__int64 v19; // rax
cocos2d::CCObject *v20; // r12
float *v21; // rsi
__int64 v22; // rbx
float v23; // xmm9_4
__int64 v24; // rbx
float *v25; // rdi
__int64 v26; // rbx
__int64 v27; // rax
float v28; // xmm11_4
__int64 v29; // rax
__int64 v30; // rbx
__int64 v31; // rax
__int64 v32; // rax
__int64 v33; // rax
__int64 v34; // rdi
__int64 v35; // rbx
struct cocos2d::CCLayerColor *v36; // r13
__int64 v37; // rbx
__int64 v38; // rax
struct cocos2d::CCLayerColor *v39; // rdi
__int64 v40; // rbx
float v41; // xmm7_4
float *v42; // rax
__int64 v43; // rax
__int64 v44; // rax
__int64 *v45; // rdi
__int64 v46; // rbx
__int64 v47; // rax
__int64 v48; // rbx
__int64 v49; // rax
struct cocos2d::CCLabelBMFont *v50; // rdi
__int64 v51; // rbx
__int64 v52; // rax
__int64 v53; // rbx
__int64 v54; // rax
__int64 v55; // rax
__int64 v56; // rbx
__int64 v57; // rax
__int64 v58; // rbx
float v59; // xmm9_4
__int64 v60; // rax
__int64 v61; // rax
cocos2d::CCObject *v62; // rax
cocos2d::CCObject *v63; // r13
float v64; // xmm6_4
cocos2d::CCObject *v65; // rax
cocos2d::CCArray *v66; // rax
__int64 v67; // rdi
__int64 v68; // rax
__int64 v69; // rbx
__int64 v70; // rax
__int64 v71; // rbx
__int64 v72; // rax
struct cocos2d::CCSprite *v73; // rsi
__int64 v74; // rbx
__int64 v75; // rdi
__int64 v76; // rax
__int64 v77; // rax
__int64 v78; // rbx
__int64 v79; // rax
struct cocos2d::CCSprite *v80; // rdi
__int64 v81; // rbx
__int64 v82; // rax
int v83; // [rsp+48h] [rbp-C0h] BYREF
int v84; // [rsp+50h] [rbp-B8h] BYREF
float v85; // [rsp+54h] [rbp-B4h]
float v86; // [rsp+60h] [rbp-A8h] BYREF
float v87; // [rsp+64h] [rbp-A4h]
__int64 v88; // [rsp+68h] [rbp-A0h] BYREF
struct cocos2d::CCLayerColor *v89; // [rsp+70h] [rbp-98h] BYREF
_BYTE *v90; // [rsp+78h] [rbp-90h] BYREF
const char *v91; // [rsp+80h] [rbp-88h]
__int64 v92; // [rsp+88h] [rbp-80h]
__int64 v93; // [rsp+90h] [rbp-78h]
_BYTE v94[32]; // [rsp+98h] [rbp-70h] BYREF
__int64 v95; // [rsp+B8h] [rbp-50h]
v91 = a3;
v95 = a4;
v92 = a5;
v93 = a6;
v84 = -1778384896;
if ( cocos2d::CCLayerColor::initWithColor(a1, (const struct cocos2d::_ccColor4B *)&v84) )
{
v14 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v89 = (struct cocos2d::CCLayerColor *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v89);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v14 = qword_14090BFD0;
}
if ( (unsigned __int8)GameManager::getGameVariable(v14, "0168") )
*((_BYTE *)a1 + 596) = 1;
*((float *)a1 + 162) = a7;
*((_DWORD *)a1 + 163) = a9;
*((_BYTE *)a1 + 636) = a8;
*((_QWORD *)a1 + 70) = a2;
*((_BYTE *)a1 + 576) = 0;
FLAlertLayer::incrementForcePrio(a1);
LOBYTE(v15) = 1;
(*(void (__fastcall **)(cocos2d::CCLayerColor *, __int64))(*(_QWORD *)a1 + 920LL))(a1, v15);
LOBYTE(v16) = 1;
(*(void (__fastcall **)(cocos2d::CCLayerColor *, __int64))(*(_QWORD *)a1 + 992LL))(a1, v16);
LOBYTE(v17) = 1;
(*(void (__fastcall **)(cocos2d::CCLayerColor *, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v17);
v18 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v18, &v86);
v19 = cocos2d::CCLayer::create();
*((_QWORD *)a1 + 73) = v19;
(*(void (__fastcall **)(cocos2d::CCLayerColor *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v19);
v20 = nullptr;
v21 = nullptr;
ensureEmotesAreLoaded();
if ( *((_BYTE *)a1 + 636) )
{
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v88, 370.0, 180.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v84, v86 * 0.5, v87 * 0.5);
v90 = v94;
v24 = sub_14003F4F0((__int64)v94, a4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v89, 0.5, 1.0);
v25 = (float *)TextArea::create(v24, "chatFont.fnt");
v26 = *(_QWORD *)v25;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v90, 0.5, 0.5);
(*(void (__fastcall **)(float *, __int64))(v26 + 288))(v25, v27);
(*(void (__fastcall **)(float *))(*(_QWORD *)v25 + 160LL))(v25);
(*(void (__fastcall **)(float *, int *))(*(_QWORD *)v25 + 184LL))(v25, &v84);
v23 = 280.0;
v28 = (float)((float)(a10 * v25[109]) * 0.5) + 10.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v90, (const struct cocos2d::CCPoint *)&v84);
v30 = v29;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v83, (const struct cocos2d::CCSize *)&v88);
v32 = ScrollingLayer::create(v31, v30);
*((_QWORD *)a1 + 78) = v32;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)a1 + 73) + 456LL))(*((_QWORD *)a1 + 73), v32, 10);
*(_QWORD *)(*((_QWORD *)a1 + 78) + 600LL) = *((_QWORD *)a1 + 73);
(*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(*((_QWORD *)a1 + 78) + 592LL) + 464LL))(
*(_QWORD *)(*((_QWORD *)a1 + 78) + 592LL),
v25);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, 0.0, (float)-v28 * 0.5);
v34 = v33;
v35 = *((_QWORD *)a1 + 78);
cocos2d::CCPoint::operator=(v35 + 576, v33);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v35 + 592) + 184LL))(*(_QWORD *)(v35 + 592), v34);
}
else
{
v89 = (struct cocos2d::CCLayerColor *)v94;
v22 = sub_14003F4F0((__int64)v94, a4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v90, 0.5, 0.5);
v21 = (float *)TextArea::create(v22, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, float *, __int64))(**((_QWORD **)a1 + 73) + 456LL))(*((_QWORD *)a1 + 73), v21, 3);
v23 = fmaxf(140.0, (float)(a10 * v21[109]) + 120.0);
if ( a10 != 1.0 )
(*(void (__fastcall **)(float *))(*(_QWORD *)v21 + 160LL))(v21);
}
*((float *)a1 + 163) = v23;
v84 = -16777216;
LODWORD(v88) = -16777216;
v36 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v88, a7, v23);
v89 = v36;
v37 = *(_QWORD *)v36;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, (float)(v86 - a7) * 0.5, (float)(v87 - v23) * 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLayerColor *, __int64))(v37 + 184))(v36, v38);
(*(void (__fastcall **)(struct cocos2d::CCLayerColor *, _QWORD))(*(_QWORD *)v36 + 336LL))(v36, 0);
v84 = -6908266;
v39 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v84, a7 + 16.0, v23 + 16.0);
v40 = *(_QWORD *)v39;
v41 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCLayerColor *))(*(_QWORD *)v36 + 200LL))(v36) + 4)
- 8.0;
v42 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLayerColor *))(*(_QWORD *)v36 + 200LL))(v36);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, *v42 - 8.0, v41);
(*(void (__fastcall **)(struct cocos2d::CCLayerColor *, __int64))(v40 + 184))(v39, v43);
(*(void (__fastcall **)(struct cocos2d::CCLayerColor *, _QWORD))(*(_QWORD *)v39 + 336LL))(v39, 0);
v44 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v84, 0.0, 0.0, 94.0, 94.0);
v45 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("square01_001.png", v44);
v46 = *v45;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v83, a7, v23);
(*(void (__fastcall **)(__int64 *, __int64))(v46 + 312))(v45, v47);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**((_QWORD **)a1 + 73) + 456LL))(*((_QWORD *)a1 + 73), v45, 1);
v48 = *v45;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, v86 * 0.5, v87 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v48 + 184))(v45, v49);
v50 = cocos2d::CCLabelBMFont::create(v91, "goldFont.fnt");
v51 = *(_QWORD *)v50;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, 0.5, 1.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v51 + 288))(v50, v52);
v53 = *(_QWORD *)v50;
v54 = (*(__int64 (__fastcall **)(struct cocos2d::CCLayerColor *))(*(_QWORD *)v36 + 200LL))(v36);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, v86 * 0.5, (float)(v23 + *(float *)(v54 + 4)) - 15.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v53 + 184))(v50, v55);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)a1 + 73) + 456LL))(
*((_QWORD *)a1 + 73),
v50,
3);
cocos2d::CCLabelBMFont::limitLabelWidth(v50, a7 - 30.0, 0.89999998, 0.40000001);
if ( !*((_BYTE *)a1 + 636) )
{
v56 = *(_QWORD *)v21;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, 0.5, 0.5);
(*(void (__fastcall **)(float *, __int64))(v56 + 288))(v21, v57);
v58 = *(_QWORD *)v21;
v59 = (float)((float)(v23 * 0.5)
+ *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCLayerColor *))(*(_QWORD *)v36 + 200LL))(v36)
+ 4))
+ 5.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, v86 * 0.5, v59);
(*(void (__fastcall **)(float *, __int64))(v58 + 184))(v21, v60);
}
v61 = cocos2d::CCMenu::create();
*((_QWORD *)a1 + 69) = v61;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)a1 + 73) + 456LL))(*((_QWORD *)a1 + 73), v61, 2);
v62 = ButtonSprite::create_1(v92, 90, 0, 1.0, 0, (__int64)"goldFont.fnt", (__int64)"GJ_button_01.png", 0);
*((_QWORD *)a1 + 76) = v62;
v63 = CCMenuItemSpriteExtra::create((int)v62, 0, (int)a1, (__int64)FLAlertLayer::onButton);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v63 + 64LL))(v63, 0);
v64 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)a1 + 76) + 320LL))(*((_QWORD *)a1 + 76)) + 0.0;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)a1 + 69) + 464LL))(*((_QWORD *)a1 + 69), v63);
if ( v93 )
{
v65 = ButtonSprite::create_1(v93, 90, 0, 1.0, 0, (__int64)"goldFont.fnt", (__int64)"GJ_button_01.png", 0);
*((_QWORD *)a1 + 77) = v65;
v20 = CCMenuItemSpriteExtra::create((int)v65, 0, (int)a1, (__int64)FLAlertLayer::onButton);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v20 + 64LL))(v20, 1);
v64 = v64 + *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)a1 + 77) + 320LL))(*((_QWORD *)a1 + 77));
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)a1 + 69) + 464LL))(*((_QWORD *)a1 + 69), v20);
}
else
{
*((_BYTE *)a1 + 637) = 1;
}
if ( (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)a1 + 69) + 480LL))(*((_QWORD *)a1 + 69)) )
{
v66 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)a1 + 69) + 480LL))(*((_QWORD *)a1 + 69));
if ( cocos2d::CCArray::count(v66) > 1 )
cocos2d::CCMenu::alignItemsHorizontallyWithPadding(
*((cocos2d::CCMenu **)a1 + 69),
fminf(15.0, (float)(a7 - v64) * 0.5));
}
v67 = **((_QWORD **)a1 + 69);
v68 = (*(__int64 (__fastcall **)(struct cocos2d::CCLayerColor *))(*(_QWORD *)v89 + 200LL))(v89);
v69 = *((_QWORD *)a1 + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, v86 * 0.5, *(float *)(v68 + 4) + 30.0);
(*(void (__fastcall **)(__int64, __int64))(v67 + 184))(v69, v70);
if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication() + 209) )
{
v71 = *((_QWORD *)a1 + 73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, v86 * 0.5, v87 * 0.5);
cocos2d::CCNode::convertToNodeSpace(v71, &v88, v72);
v73 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**((_QWORD **)a1 + 73) + 456LL))(
*((_QWORD *)a1 + 73),
v73,
10);
v74 = *((_QWORD *)a1 + 69);
v75 = *((_QWORD *)a1 + 73);
v76 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v63 + 200LL))(v63);
cocos2d::CCNode::convertToWorldSpace(v74, &v83, v76);
cocos2d::CCNode::convertToNodeSpace(v75, &v84, v77);
v78 = *(_QWORD *)v73;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, *(float *)&v88 - 116.0, v85);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v78 + 184))(v73, v79);
if ( v20 )
{
v80 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_X_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**((_QWORD **)a1 + 73) + 456LL))(
*((_QWORD *)a1 + 73),
v80,
10);
v81 = *(_QWORD *)v80;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, *(float *)&v88 + 116.0, v85);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v81 + 184))(v80, v82);
}
}
*((_DWORD *)a1 + 160) = -1;
sub_14003D310(a4);
return 1;
}
else
{
sub_14003D310(a4);
return 0;
}
}