//
// LevelBindingsLayer::setupTabs from 0x14044c730 to 0x14044c8b0 (384 bytes)
//
// 2 xrefs:
// > ??> @ 0x140793c50
// > ??> @ 0x140927500
//
// 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:32:25 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall LevelBindingsLayer::setupTabs(__int64 a1)
{
__int64 v2; // rcx
void *v3; // rcx
__int64 v4; // rax
const char *v5; // rcx
struct cocos2d::CCLabelBMFont *v6; // rdi
__int64 v7; // rbx
__int64 v8; // rax
float v10[2]; // [rsp+30h] [rbp-48h] BYREF
_BYTE v11[8]; // [rsp+38h] [rbp-40h] BYREF
void *Block[2]; // [rsp+40h] [rbp-38h] BYREF
__m128i si128; // [rsp+50h] [rbp-28h]
Block[1] = nullptr;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836590);
Block[0] = (void *)0x73676E69646E6942LL;
TabbedPopupLayer::addTab(a1, Block, 0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v3 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v3);
}
v4 = cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize(v4, v10);
v5 = "Custom Keyboard Controls";
if ( *(_BYTE *)(a1 + 1192) )
v5 = "Custom Controller Controls";
v6 = cocos2d::CCLabelBMFont::create(v5, "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v6 + 160LL))(v6);
v7 = *(_QWORD *)v6;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v11,
v10[0] * 0.5,
(float)((float)(*(float *)(a1 + 736) * 0.5) + (float)(v10[1] * 0.5)) - 22.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v7 + 184))(v6, v8);
return (*(__int64 (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v6);
}