//
// FLAlertLayer::addCloseButton from 0x14005b3a0 to 0x14005b4bd (285 bytes)
//
// 3 xrefs:
// > EditLevelLayer::onPlay @ 0x14017b277
// > LevelInfoLayer::onPlay @ 0x140421a59
// > ??> @ 0x1409106f4
//
// 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
//
cocos2d::CCObject *__fastcall FLAlertLayer::addCloseButton(__int64 a1)
{
__int64 v2; // rax
struct cocos2d::CCSprite *v3; // rax
int v4; // ebx
cocos2d::CCObject *v5; // r14
__int64 v6; // rdi
__int64 v7; // rbx
__int64 v8; // rax
__int64 v9; // rax
float v11; // [rsp+40h] [rbp+8h] BYREF
float v12; // [rsp+44h] [rbp+Ch]
char v13; // [rsp+48h] [rbp+10h] BYREF
char v14; // [rsp+50h] [rbp+18h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v2, &v11);
v3 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v4 = (int)v3;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v3 + 160LL))(v3);
v5 = CCMenuItemSpriteExtra::create(v4, 0, a1, (__int64)FLAlertLayer::onButton);
*((_DWORD *)v5 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v5);
v6 = *(_QWORD *)v5;
v7 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v13,
(float)((float)(v11 * 0.5) - (float)(*(float *)(a1 + 648) * 0.5)) + 5.0,
(float)((float)(*(float *)(a1 + 652) * 0.5) + (float)(v12 * 0.5)) - 5.0);
cocos2d::CCNode::convertToNodeSpace(v7, &v14, v8);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v6 + 184))(v5, v9);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 64LL))(v5, 2);
return v5;
}