//
// TabbedPopupLayer::addCloseButton from 0x10063f020 to 0x10063f11b (251 bytes)
//
// 3 xrefs:
// > GameSettingsLayer::init @ 0x1005fe533
// > KeybindingsLayer::init @ 0x1006e174f
// > sub_1008FD5B0 @ 0x1008fd622
//
// 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 12:34:42 +0000
//
void *__fastcall TabbedPopupLayer::addCloseButton(__int64 a1, double a2)
{
__int64 v2; // rsi
char *v3; // r14
void *v4; // r14
__int64 v5; // r15
double v7; // [rsp+8h] [rbp-38h] BYREF
unsigned int v8; // [rsp+10h] [rbp-30h] BYREF
__int64 v9; // [rsp+18h] [rbp-28h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v9, v2);
v3 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_closeBtn_001.png", a2);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v3 + 160LL))(v3, 0.69999999);
v4 = CCMenuItemSpriteExtra::create((__int64)v3, 0, a1, 1369, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v4, 1.2);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v4);
v5 = *(_QWORD *)(a1 + 552);
sub_100278250(
(float *)&v8,
(float)(*(float *)&v9 * 0.5) - (float)(*(float *)(a1 + 732) * 0.5),
(float)(0.5 * *(float *)(a1 + 736)) + (float)(*((float *)&v9 + 1) * 0.5));
cocos2d::CCNode::convertToNodeSpace(&v7, v5, &v8);
(*(void (__fastcall **)(void *, double *))(*(_QWORD *)v4 + 184LL))(v4, &v7);
return v4;
}