//
// UILayer::updateCheckState from 0x100050c2c to 0x100050da4 (376 bytes)
//
// 2 xrefs:
// > UILayer::init @ 0x100050a88
// > UIPOptionsLayer::onClose @ 0x1003810a0
//
// This function is hookable on this platform (idp: arm, 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 10:57:43 +0000
//
__int64 __fastcall UILayer::updateCheckState(__int64 a1)
{
__int64 v2; // x0
_QWORD *WinSize; // x0
__int64 v4; // x0
__int64 v5; // x0
__n128 v6; // q0
float v7; // s8
__int64 v8; // x0
float v9; // s0
__int64 v10; // x0
__int64 result; // x0
__int64 v12; // x20
const void *v13; // x0
const void *v14; // x25
_QWORD *v15; // x0
__int64 v16; // x8
double v17; // [xsp+8h] [xbp-68h] BYREF
__int64 v18; // [xsp+10h] [xbp-60h] BYREF
__int64 v19; // [xsp+18h] [xbp-58h] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
WinSize = cocos2d::CCDirector::getWinSize(&v19, v2);
v4 = GameManager::sharedState(WinSize);
v6.n128_f64[0] = sub_1000262F4(&v18, (double *)(v4 + 1704));
v6.n128_u32[0] = v18;
if ( *(float *)&v18 == 0.0 )
{
v6.n128_u32[0] = HIDWORD(v18);
if ( *((float *)&v18 + 1) == 0.0 )
{
v7 = *(float *)&v19 * 0.5;
v8 = cocos2d::CCDirector::sharedDirector(v5);
v9 = sub_100207EA0(v8);
sub_1000262BC((float *)&v17, v7, v9 + 40.0);
v6.n128_f64[0] = sub_10002630C(&v18, &v17);
}
}
v10 = (*(__int64 (__fastcall **)(_QWORD, __int64 *, __n128))(**(_QWORD **)(a1 + 560) + 184LL))(
*(_QWORD *)(a1 + 560),
&v18,
v6);
GameManager::sharedState(v10);
result = sub_1002E757C(*(_QWORD *)(a1 + 632));
if ( (_DWORD)result )
{
v12 = 0;
do
{
v13 = (const void *)sub_1002E75A0(*(_QWORD *)(a1 + 632), v12);
if ( v13 )
{
v14 = v13;
v15 = __dynamic_cast(
v13,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCSprite,
0);
if ( v15 )
{
v16 = 912;
LABEL_11:
(*(void (**)(void))(*v15 + v16))();
goto LABEL_12;
}
v15 = __dynamic_cast(
v14,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCLabelBMFont,
0);
if ( v15 )
{
v16 = 1024;
goto LABEL_11;
}
}
LABEL_12:
v12 = (unsigned int)(v12 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 632));
}
while ( (unsigned int)v12 < (unsigned int)result );
}
return result;
}