//
// SelectFontLayer::updateFontLabel from 0x1002856e0 to 0x1002857fb (283 bytes)
//
// 2 xrefs:
// > SelectFontLayer::init @ 0x1002855b1
// > SelectFontLayer::onChangeFont @ 0x1002856ce
//
// 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:27:45 +0000
//
__int64 __fastcall SelectFontLayer::updateFontLabel(__int64 a1)
{
__int64 result; // rax
int v2; // r14d
__int64 v4; // rdi
__int64 v5; // rsi
__int64 v6; // rdi
__int64 CString; // r14
__int64 v8; // rdx
double v9; // xmm0_8
__int64 v10; // rsi
__int64 v11; // rax
__int64 v12; // rdi
__int64 v13; // rdx
__int64 v14; // rax
__int64 v15; // r15
__int64 v16; // rdx
double v17; // xmm0_8
__int64 v18; // rax
__int64 FontFile; // rax
__int64 v20; // rax
__int64 v21; // rsi
__int64 v22; // rax
__int64 v23; // rbx
char v24; // [rsp+0h] [rbp-30h]
float v25; // [rsp+8h] [rbp-28h] BYREF
float v26[8]; // [rsp+10h] [rbp-20h] BYREF
result = *(_QWORD *)(*(_QWORD *)(a1 + 664) + 3272LL);
v2 = *(_DWORD *)(result + 360);
if ( *(_DWORD *)(a1 + 660) != v2 )
{
v4 = *(_QWORD *)(a1 + 672);
if ( v4 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);
*(_QWORD *)(a1 + 672) = 0;
}
*(_DWORD *)(a1 + 660) = v2;
v5 = (unsigned int)(v2 + 1);
v6 = sub_10088E820("Font %i", v24);
CString = cocos2d::CCString::getCString(v6);
*(_QWORD *)&v9 = GameManager::sharedState(v6, v5, v8).u64[0];
v10 = *(unsigned int *)(a1 + 660);
v12 = v11;
GameManager::loadFont(v11, v10, v9);
GameManager::sharedState(v12, v10, v13);
v15 = v14;
*(_QWORD *)&v17 = GameManager::sharedState(v12, v10, v16).u64[0];
FontFile = GameManager::getFontFile(v15, *(unsigned int *)(v18 + 992), v17);
v20 = cocos2d::CCLabelBMFont::create_3(CString, FontFile);
*(_QWORD *)(a1 + 672) = v20;
v21 = v20;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v20);
v22 = cocos2d::CCDirector::sharedDirector(a1, v21);
cocos2d::CCDirector::getWinSize(v26, v22);
v23 = *(_QWORD *)(a1 + 672);
sub_100278250(&v25, v26[0] * 0.5, 0.5 * v26[1]);
return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v23 + 184LL))(v23, &v25);
}
return result;
}