//
// UILayer::updateCheckState from 0x1004c28e0 to 0x1004c2a64 (388 bytes)
//
// 2 xrefs:
// > UIPOptionsLayer::onClose @ 0x1002a5739
// > UILayer::init @ 0x1004c26a7
//
// 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:31:06 +0000
//
__int64 __fastcall UILayer::updateCheckState(__int64 a1)
{
__int64 v1; // rax
__int64 v2; // rax
__int64 v3; // rax
float v4; // xmm1_4
__int64 result; // rax
unsigned int v6; // r14d
unsigned int v7; // r13d
__int64 v8; // rcx
const void *v9; // rax
const void *v10; // r12
_QWORD *v11; // rax
__int64 v12; // [rsp+Ch] [rbp-44h] BYREF
__int64 v13; // [rsp+14h] [rbp-3Ch] BYREF
__int64 v14; // [rsp+1Ch] [rbp-34h] BYREF
float v15; // [rsp+24h] [rbp-2Ch]
v1 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v13, v1);
v2 = GameManager::sharedState();
sub_1002782D0(&v14, (_QWORD *)(v2 + 1704));
if ( *(float *)&v14 == 0.0 && *((float *)&v14 + 1) == 0.0 )
{
v15 = *(float *)&v13 * 0.5;
v3 = cocos2d::CCDirector::sharedDirector();
v4 = sub_100479750(v3) + 40.0;
sub_100278250((float *)&v12, v15, v4);
sub_100278300(&v14, &v12);
}
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 560) + 184LL))(*(_QWORD *)(a1 + 560), &v14);
v15 = *(float *)(GameManager::sharedState() + 1712);
result = sub_1007FEF90(*(_QWORD *)(a1 + 632));
if ( (_DWORD)result )
{
v6 = 0;
v7 = (unsigned __int8)(int)(float)(v15 * 255.0);
do
{
v9 = (const void *)sub_1007FEFE0(*(_QWORD *)(a1 + 632), v6);
if ( v9 )
{
v10 = v9;
v11 = __dynamic_cast(
v9,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCSprite,
0);
if ( v11 )
{
v8 = 912;
}
else
{
v11 = __dynamic_cast(
v10,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCLabelBMFont,
0);
if ( !v11 )
goto LABEL_8;
v8 = 1024;
}
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v11 + v8))(v11, v7);
}
LABEL_8:
++v6;
result = sub_1007FEF90(*(_QWORD *)(a1 + 632));
}
while ( v6 < (unsigned int)result );
}
return result;
}