//
// sub_10063F6F0 from 0x10063f6f0 to 0x10063fb3f (1103 bytes)
//
// 1 xrefs:
// > TabbedPopupLayer::createTabButtons @ 0x10063f6da
//
// 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
//
__int64 __fastcall sub_10063F6F0(__int64 a1, float a2, float a3, float a4, float a5, float a6, float a7)
{
__int64 v7; // rbx
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // r15
unsigned __int64 v11; // r12
__int64 v12; // rdi
char *v13; // r14
void *v14; // r14
__int64 v15; // rdi
double v16; // xmm0_8
char *v17; // r13
__int64 v18; // rcx
unsigned int v19; // eax
_QWORD *v20; // rsi
__int64 v21; // rax
__int64 v22; // r14
char *v23; // rax
void *v24; // rax
__int64 v25; // r12
__int64 v26; // r13
double v27; // xmm0_8
unsigned __int8 *v28; // r14
void *v29; // rax
__int64 v30; // r14
__int64 v31; // rbx
unsigned int v34; // [rsp+10h] [rbp-60h] BYREF
float v35; // [rsp+18h] [rbp-58h]
float v36; // [rsp+1Ch] [rbp-54h]
float v37; // [rsp+20h] [rbp-50h]
__int64 v38; // [rsp+24h] [rbp-4Ch] BYREF
unsigned __int64 v39; // [rsp+2Ch] [rbp-44h] BYREF
float v40; // [rsp+34h] [rbp-3Ch]
__int64 v41; // [rsp+38h] [rbp-38h]
float v42; // [rsp+40h] [rbp-30h]
float v43; // [rsp+44h] [rbp-2Ch]
v40 = a7;
v35 = a6;
v43 = a5;
v36 = a4;
v42 = a3;
v37 = a2;
v7 = a1;
v8 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v38, v8);
v41 = sub_1007FE900(&v38);
v9 = *(_QWORD *)(a1 + 1016);
if ( *(_QWORD *)(a1 + 1024) != v9 )
{
LODWORD(v42) = (int)v42;
v10 = 32;
v11 = 0;
do
{
if ( (*(_BYTE *)(v9 + v10 - 32) & 1) != 0 )
v15 = *(_QWORD *)(v9 + v10 - 16);
else
v15 = v9 + v10 - 31;
*(_QWORD *)&v16 = LODWORD(v43);
v17 = ButtonSprite::create_1(
v15,
LODWORD(v42),
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_05.png",
v43,
25.0);
*((_DWORD *)v17 + 154) = 1066611507;
*((_DWORD *)v17 + 164) = 1050253722;
v18 = *(_QWORD *)(v7 + 1016);
v19 = *(unsigned __int8 *)(v18 + v10 - 8);
if ( (v19 & 1) != 0 )
{
if ( *(_QWORD *)(v18 + v10) )
{
LABEL_13:
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)v17 + 78) + 344LL))(*((_QWORD *)v17 + 78), 0);
v20 = (_QWORD *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v17 + 328LL))(v17);
sub_100278630(&v39, v20);
v21 = *(_QWORD *)(v7 + 1016);
if ( (*(_BYTE *)(v21 + v10 - 8) & 1) != 0 )
v12 = *(_QWORD *)(v21 + v10 + 8);
else
v12 = v21 + v10 - 7;
v13 = cocos2d::CCSprite::createWithSpriteFrameName(v12, v16);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v13 + 160LL))(v13, 0.69999999);
sub_100278250(
(float *)&v34,
*(float *)&v39 * 0.5,
(float)((float)(*((float *)&v39 + 1) * 0.5) + *((float *)v17 + 165)) + -1.0);
(*(void (__fastcall **)(char *, unsigned int *))(*(_QWORD *)v13 + 184LL))(v13, &v34);
(*(void (__fastcall **)(char *, char *, __int64))(*(_QWORD *)v17 + 464LL))(v17, v13, 1);
v7 = a1;
}
}
else if ( v19 >> 1 )
{
goto LABEL_13;
}
v14 = CCMenuItemSpriteExtra::create((__int64)v17, 0, v7, (__int64)sub_10063FB40, 0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v14 + 72LL))(v14, (unsigned int)v11);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v7 + 552) + 456LL))(*(_QWORD *)(v7 + 552), v14);
*(_QWORD *)(*(_QWORD *)(v7 + 1016) + v10 + 32) = v14;
sub_1007FEBF0(v41, v14);
++v11;
v9 = *(_QWORD *)(v7 + 1016);
v10 += 72;
}
while ( v11 < 0x8E38E38E38E38E39LL * ((*(_QWORD *)(v7 + 1024) - v9) >> 3) );
}
v22 = *(_QWORD *)(v7 + 552);
sub_100278250((float *)&v34, *(float *)&v38 * 0.5, v37);
cocos2d::CCNode::convertToNodeSpace((double *)&v39, v22, &v34);
GameToolbox::alignItemsHorisontally(v41, &v39, 0, (__m128)LODWORD(v36));
*(float *)&v41 = *((float *)&v38 + 1) * 0.5;
v43 = (float)(*(float *)(v7 + 732) * 0.5) + v35;
v23 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png", COERCE_DOUBLE(1056964608));
v24 = CCMenuItemSpriteExtra::create((__int64)v23, 0, v7, (__int64)sub_10063FB70, 0);
*(_QWORD *)(v7 + 1072) = v24;
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v24 + 72LL))(v24, 0xFFFFFFFFLL);
CCMenuItemSpriteExtra::setSizeMult(*(_QWORD *)(v7 + 1072), v40);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v7 + 552) + 456LL))(
*(_QWORD *)(v7 + 552),
*(_QWORD *)(v7 + 1072));
v25 = *(_QWORD *)(v7 + 1072);
v26 = *(_QWORD *)(v7 + 552);
sub_100278250((float *)&v34, (float)(*(float *)&v38 * 0.5) - v43, *(float *)&v41);
cocos2d::CCNode::convertToNodeSpace((double *)&v39, v26, &v34);
v27 = (*(double (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v25 + 184LL))(v25, &v39);
v28 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png", v27);
cocos2d::CCSprite::setFlipX(v28, 1u);
v29 = CCMenuItemSpriteExtra::create((__int64)v28, 0, v7, (__int64)sub_10063FB70, 0);
*(_QWORD *)(v7 + 1080) = v29;
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v29 + 72LL))(v29, 1);
CCMenuItemSpriteExtra::setSizeMult(*(_QWORD *)(v7 + 1080), v40);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v7 + 552) + 456LL))(
*(_QWORD *)(v7 + 552),
*(_QWORD *)(v7 + 1080));
v30 = *(_QWORD *)(v7 + 1080);
v31 = *(_QWORD *)(v7 + 552);
sub_100278250((float *)&v34, (float)(0.5 * *(float *)&v38) + v43, *(float *)&v41);
cocos2d::CCNode::convertToNodeSpace((double *)&v39, v31, &v34);
return (*(__int64 (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v30 + 184LL))(v30, &v39);
}