// // FLAlertLayer::init from 0x140051bd0 to 0x140052865 (3221 bytes) // // 18 xrefs: // > FLAlertLayer::create @ 0x140051a66 // > AudioAssetsBrowser::onInfo @ 0x14008458e // > GJUserCell::onCancelFriendRequest @ 0x1400bb880 // > GJUserCell::onRemoveFriend @ 0x1400bba67 // > GJRequestCell::onDeleteRequest @ 0x1400bce82 // > GJMessageCell::onDeleteMessage @ 0x1400be0cf // > FRequestProfilePage::onDeleteSelected @ 0x14013e9e0 // > FriendRequestPopup::onBlock @ 0x140296ee5 // > GJMessagePopup::onRemove @ 0x14029886a // > GJMessagePopup::onBlock @ 0x140298a46 // > GJWriteMessagePopup::onClearBody @ 0x14029a4cd // > LevelBrowserLayer::onDeleteSelected @ 0x1402cf49a // > MessagesProfilePage::onDeleteSelected @ 0x140337630 // > MusicDownloadManager::showTOS @ 0x14033f9c8 // > ProfilePage::onFriend @ 0x1403c40b6 // > ProfilePage::onFriend @ 0x1403c4260 // > ProfilePage::onBlockUser @ 0x1403c4456 // > @ 0x1406c4e24 // // 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 char __fastcall FLAlertLayer::init( __int64 a1, __int64 a2, const char *a3, __int64 a4, const char *a5, const char *a6, float a7, char a8, int a9, float a10) { GameManager *v14; // rcx __int64 v15; // rdx __int64 v16; // rax cocos2d::CCTouchDispatcher *v17; // rax __int64 v18; // rdx __int64 v19; // rdx cocos2d::CCDirector *v20; // rax __int64 v21; // rax CCMenuItemSpriteExtra *v22; // r13 float *v23; // r15 __int64 v24; // rbx float v25; // xmm7_4 __int64 v26; // rbx float *v27; // rdi __int64 v28; // rbx __int64 v29; // rax float v30; // xmm9_4 float v31; // xmm6_4 const struct cocos2d::CCPoint *v32; // rbx const struct cocos2d::CCSize *v33; // rax const struct cocos2d::CCSize *v34; // rdi char *v35; // r14 __int64 v36; // rbx __int64 v37; // rax __int64 v38; // rdi struct cocos2d::CCLayerColor *v39; // rax __int64 v40; // rax __int64 v41; // rax __int64 v42; // rdi __int64 v43; // rbx struct cocos2d::CCLayerColor *v44; // r14 cocos2d::CCLayerColor_vtbl *v45; // rbx const cocos2d::CCPoint *v46; // rax struct cocos2d::CCLayerColor *v47; // rdi cocos2d::CCLayerColor_vtbl *v48; // rbx float y; // xmm6_4 float *v50; // rax const cocos2d::CCPoint *v51; // rax struct cocos2d::CCRect *v52; // rax struct cocos2d::extension::CCScale9Sprite *v53; // rdi cocos2d::extension::CCScale9Sprite_vtbl *v54; // rbx const cocos2d::CCSize *v55; // rax cocos2d::extension::CCScale9Sprite_vtbl *v56; // rbx const cocos2d::CCPoint *v57; // rax struct cocos2d::CCLabelBMFont *v58; // rdi cocos2d::CCLabelBMFont_vtbl *v59; // rbx const cocos2d::CCPoint *v60; // rax cocos2d::CCLabelBMFont_vtbl *v61; // rbx __int64 v62; // rax const cocos2d::CCPoint *v63; // rax __int64 v64; // rbx __int64 v65; // rax __int64 v66; // rbx float v67; // xmm7_4 __int64 v68; // rax __int64 v69; // rax ButtonSprite *v70; // rax CCMenuItemSpriteExtra *v71; // r15 float v72; // xmm6_4 ButtonSprite *v73; // rax cocos2d::CCArray *v74; // rax __int64 v75; // rbx __int64 v76; // rax __int64 v77; // rax __int64 v78; // rdx __int64 v79; // rcx struct cocos2d::CCSprite *v80; // rdi cocos2d::CCSprite_vtbl *v81; // rbx const cocos2d::CCPoint *v82; // rax struct cocos2d::CCSprite *v83; // rdi cocos2d::CCSprite_vtbl *v84; // rbx const cocos2d::CCPoint *v85; // rax int v86; // [rsp+40h] [rbp-C0h] BYREF cocos2d::CCPoint v87; // [rsp+48h] [rbp-B8h] BYREF float v88; // [rsp+50h] [rbp-B0h] float v89; // [rsp+54h] [rbp-ACh] cocos2d::CCSize v90; // [rsp+58h] [rbp-A8h] BYREF cocos2d::CCPoint v91; // [rsp+60h] [rbp-A0h] BYREF char *v92; // [rsp+68h] [rbp-98h] BYREF float *v93; // [rsp+70h] [rbp-90h] const char *v94; // [rsp+78h] [rbp-88h] const char *v95; // [rsp+80h] [rbp-80h] const char *v96; // [rsp+88h] [rbp-78h] cocos2d::CCPoint v97; // [rsp+90h] [rbp-70h] BYREF cocos2d::CCPoint v98; // [rsp+98h] [rbp-68h] BYREF cocos2d::CCSize v99; // [rsp+A0h] [rbp-60h] BYREF cocos2d::CCRect v100; // [rsp+A8h] [rbp-58h] BYREF _BYTE v101[32]; // [rsp+B8h] [rbp-48h] BYREF _BYTE v102[32]; // [rsp+D8h] [rbp-28h] BYREF __int64 v103; // [rsp+F8h] [rbp-8h] v94 = a3; v103 = a4; v95 = a5; v96 = a6; v86 = -1778384896; if ( cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v86) ) { v14 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v93 = (float *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(v93); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = (GameManager *)qword_1406C2ED8; } if ( GameManager::getGameVariable(v14, "0168") ) *(_BYTE *)(a1 + 588) = 1; *(_BYTE *)(a1 + 620) = a8; *(_QWORD *)(a1 + 552) = a2; *(_BYTE *)(a1 + 568) = 0; if ( !*(_BYTE *)(a1 + 628) ) { *(_BYTE *)(a1 + 628) = 1; v16 = cocos2d::CCDirector::sharedDirector(); v17 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 144LL))(v16); cocos2d::CCTouchDispatcher::registerForcePrio(v17, (struct cocos2d::CCObject *)a1, 2); } LOBYTE(v15) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 904LL))(a1, v15); LOBYTE(v18) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 976LL))(a1, v18); LOBYTE(v19) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v19); v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v20); v21 = cocos2d::CCLayer::create(); *(_QWORD *)(a1 + 576) = v21; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 448LL))(a1, v21); v22 = nullptr; v23 = nullptr; if ( *(_BYTE *)(a1 + 620) ) { cocos2d::CCSize::CCSize(&v90, 370.0, 180.0); cocos2d::CCPoint::CCPoint(&v91, v88 * 0.5, v89 * 0.5); v93 = (float *)v102; v26 = sub_14003BDB0((__int64)v102, a4); cocos2d::CCPoint::CCPoint(&v97, 0.5, 1.0); v27 = (float *)TextArea::create(v26, "chatFont.fnt"); v93 = v27; v28 = *(_QWORD *)v27; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v92, 0.5, 0.5); (*(void (__fastcall **)(float *, __int64))(v28 + 272))(v27, v29); (*(void (__fastcall **)(float *))(*(_QWORD *)v27 + 160LL))(v27); (*(void (__fastcall **)(float *, cocos2d::CCPoint *))(*(_QWORD *)v27 + 184LL))(v27, &v91); v25 = 280.0; v30 = (float)((float)(a10 * v27[109]) * 0.5) + 10.0; v31 = fmax(v90.height * 0.5 - 20.0, (float)(v30 * 1.2)); v32 = (const struct cocos2d::CCPoint *)cocos2d::CCPoint::CCPoint(&v98, &v91); cocos2d::CCSize::CCSize(&v99, &v90); v34 = v33; v35 = (char *)operator new(0x260u); v92 = v35; cocos2d::CCLayerColor::CCLayerColor((cocos2d::CCLayerColor *)v35); *(_QWORD *)v35 = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 40) = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 41) = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 42) = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 43) = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 44) = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 51) = &ScrollingLayer::`vftable'; *((_QWORD *)v35 + 54) = &ScrollingLayer::`vftable'; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35 + 68); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v35 + 69); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35 + 70); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35 + 71); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35 + 72); *((_DWORD *)v35 + 146) = 0; *((_DWORD *)v35 + 147) = -1; *((_QWORD *)v35 + 74) = 0; *((_QWORD *)v35 + 75) = 0; v36 = cocos2d::CCPoint::CCPoint(&v100.origin, v32); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v87, v34); v38 = v37; v86 = 0; LODWORD(v92) = 0; if ( cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)v35, (const struct cocos2d::_ccColor4B *)&v92) ) { *((float *)v35 + 146) = v31; cocos2d::CCPoint::operator=(v35 + 544, v36); v86 = 838860800; v39 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v86); (*(void (__fastcall **)(char *, struct cocos2d::CCLayerColor *, __int64))(*(_QWORD *)v35 + 440LL))( v35, v39, 4294967294LL); v40 = cocos2d::CCLayer::create(); *((_QWORD *)v35 + 74) = v40; (*(void (__fastcall **)(char *, __int64, __int64))(*(_QWORD *)v35 + 440LL))(v35, v40, 0xFFFFFFFFLL); cocos2d::CCSize::operator=(v35 + 552, v38); cocos2d::CCObject::autorelease((cocos2d::CCObject *)v35); } else { (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v35 + 8LL))(v35, 1); v35 = nullptr; } *(_QWORD *)(a1 + 608) = v35; (*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v35, 10); *(_QWORD *)(*(_QWORD *)(a1 + 608) + 600LL) = *(_QWORD *)(a1 + 576); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(*(_QWORD *)(a1 + 608) + 592LL) + 448LL))( *(_QWORD *)(*(_QWORD *)(a1 + 608) + 592LL), v93); cocos2d::CCPoint::CCPoint(&v87, 0.0, (float)-v30 * 0.5); v42 = v41; v43 = *(_QWORD *)(a1 + 608); cocos2d::CCPoint::operator=(v43 + 576, v41); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v43 + 592) + 184LL))(*(_QWORD *)(v43 + 592), v42); } else { v93 = (float *)v101; v24 = sub_14003BDB0((__int64)v101, a4); cocos2d::CCPoint::CCPoint(&v91, 0.5, 0.5); v23 = (float *)TextArea::create(v24, "chatFont.fnt"); (*(void (__fastcall **)(_QWORD, float *, __int64))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v23, 3); v25 = fmaxf(140.0, (float)(a10 * v23[109]) + 120.0); if ( a10 != 1.0 ) (*(void (__fastcall **)(float *))(*(_QWORD *)v23 + 160LL))(v23); } v86 = -16777216; LODWORD(v92) = -16777216; v44 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v92, a7, v25); v45 = v44->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v87, (float)(v88 - a7) * 0.5, (float)(v89 - v25) * 0.5); v45->setPosition_0(v44, v46); v44->setVisible(v44, 0); v86 = -6908266; v47 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v86, a7 + 16.0, v25 + 16.0); v48 = v47->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; y = v44->getPosition_0(v44)->y; v50 = (float *)v44->getPosition_0(v44); cocos2d::CCPoint::CCPoint(&v87, *v50 - 8.0, y - 8.0); v48->setPosition_0(v47, v51); v47->setVisible(v47, 0); v52 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect(&v100, 0.0, 0.0, 94.0, 94.0); v53 = cocos2d::extension::CCScale9Sprite::create("square01_001.png", v52); v54 = v53->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v87, a7, v25); v54->setContentSize(v53, v55); (*(void (__fastcall **)(_QWORD, struct cocos2d::extension::CCScale9Sprite *, __int64))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v53, 1); v56 = v53->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v87, v88 * 0.5, v89 * 0.5); v56->setPosition_0(v53, v57); v58 = cocos2d::CCLabelBMFont::create(v94, "goldFont.fnt"); v59 = v58->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v87, 0.5, 1.0); v59->setAnchorPoint(v58, v60); v61 = v58->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v62 = (__int64)v44->getPosition_0(v44); cocos2d::CCPoint::CCPoint(&v87, v88 * 0.5, (float)(v25 + *(float *)(v62 + 4)) - 15.0); v61->setPosition_0(v58, v63); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v58, 3); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v58->setScale_0)(v58); if ( !*(_BYTE *)(a1 + 620) ) { v64 = *(_QWORD *)v23; cocos2d::CCPoint::CCPoint(&v87, 0.5, 0.5); (*(void (__fastcall **)(float *, __int64))(v64 + 272))(v23, v65); v66 = *(_QWORD *)v23; v67 = (float)((float)(v25 * 0.5) + v44->getPosition_0(v44)->y) + 5.0; cocos2d::CCPoint::CCPoint(&v87, v88 * 0.5, v67); (*(void (__fastcall **)(float *, __int64))(v66 + 184))(v23, v68); } v69 = cocos2d::CCMenu::create(); *(_QWORD *)(a1 + 544) = v69; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 576) + 440LL))(*(_QWORD *)(a1 + 576), v69, 2); v70 = ButtonSprite::create_1(v95, 90, 0, 1.0, 0, "goldFont.fnt", "GJ_button_01.png", 0.0); *(_QWORD *)(a1 + 592) = v70; v71 = CCMenuItemSpriteExtra::create( v70, nullptr, (cocos2d::CCObject *)a1, (cocos2d::SEL_MenuHandler *)FLAlertLayer::onBtn1); v72 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 592) + 304LL))(*(_QWORD *)(a1 + 592)) + 0.0; (*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(a1 + 544) + 448LL))( *(_QWORD *)(a1 + 544), v71); if ( v96 ) { v73 = ButtonSprite::create_1(v96, 90, 0, 1.0, 0, "goldFont.fnt", "GJ_button_01.png", 0.0); *(_QWORD *)(a1 + 600) = v73; v22 = CCMenuItemSpriteExtra::create( v73, nullptr, (cocos2d::CCObject *)a1, (cocos2d::SEL_MenuHandler *)FLAlertLayer::onBtn2); v72 = v72 + *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 600) + 304LL))(*(_QWORD *)(a1 + 600)); (*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(a1 + 544) + 448LL))( *(_QWORD *)(a1 + 544), v22); } else { *(_BYTE *)(a1 + 621) = 1; } if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 544) + 464LL))(*(_QWORD *)(a1 + 544)) ) { v74 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 544) + 464LL))(*(_QWORD *)(a1 + 544)); if ( cocos2d::CCArray::count(v74) > 1 ) cocos2d::CCMenu::alignItemsHorizontallyWithPadding( *(cocos2d::CCMenu **)(a1 + 544), fminf(15.0, (float)(a7 - v72) * 0.5)); } v75 = **(_QWORD **)(a1 + 544); v76 = (__int64)v44->getPosition_0(v44); cocos2d::CCPoint::CCPoint(&v87, v88 * 0.5, *(float *)(v76 + 4) + 30.0); (*(void (__fastcall **)(_QWORD, __int64))(v75 + 184))(*(_QWORD *)(a1 + 544), v77); if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v79, v78) + 197) ) { cocos2d::CCPoint::CCPoint(&v87, v88 * 0.5, v89 * 0.5); cocos2d::CCNode::convertToNodeSpace(*(cocos2d::CCNode **)(a1 + 576), &v91); v80 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v80, 10); v71->getPosition_0(v71); cocos2d::CCNode::convertToWorldSpace(*(cocos2d::CCNode **)(a1 + 544), &v87); cocos2d::CCNode::convertToNodeSpace(*(cocos2d::CCNode **)(a1 + 576), (const struct cocos2d::CCPoint *)&v90); v81 = v80->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v87, v91.x - 116.0, v90.height); v81->setPosition_0(v80, v82); if ( v22 ) { v83 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_X_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 440LL))( *(_QWORD *)(a1 + 576), v83, 10); v84 = v83->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v87, v91.x + 116.0, v90.height); v84->setPosition_0(v83, v85); } } *(_DWORD *)(a1 + 624) = -1; sub_14003A830(a4); return 1; } else { sub_14003A830(a4); return 0; } }