//
// UILayer::updateCheckState from 0x3fc504 to 0x3fc622 (286 bytes)
//
// 2 xrefs:
// > UILayer::init @ 0x3fdc30
// > UIPOptionsLayer::onClose @ 0x5d3fd8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:21 +0000
//
unsigned int __fastcall UILayer::updateCheckState(cocos2d::CCArray **this)
{
GameManager *WinSize; // r0
int v3; // r0
cocos2d::CCDirector *v4; // r0
float v5; // s16
cocos2d::CCDirector *v6; // r0
float v7; // r0
unsigned int v8; // r4
GameManager *v9; // r0
unsigned int result; // r0
const void *v11; // r0
const void *v12; // r8
void *v13; // r0
void (*v14)(void); // r3
void *v15; // r0
float v16[2]; // [sp+4h] [bp-1Ch] BYREF
float v17[2]; // [sp+Ch] [bp-14h] BYREF
_BYTE v18[8]; // [sp+14h] [bp-Ch] BYREF
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
WinSize = (GameManager *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v16);
v3 = GameManager::sharedState(WinSize);
v4 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const cocos2d::CCPoint *)(v3 + 1308));
if ( v17[0] == 0.0 && v17[1] == 0.0 )
{
v5 = v16[0] * 0.5;
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);
v7 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v6));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v5, v7 + 40.0);
cocos2d::CCPoint::operator=(v17, v18);
}
v8 = 0;
v9 = (GameManager *)(*(int (__fastcall **)(_DWORD, float *))(*(_DWORD *)*(this + 112) + 92))(*(this + 112), v17);
GameManager::sharedState(v9);
while ( 1 )
{
result = cocos2d::CCArray::count(*(this + 124));
if ( v8 >= result )
return result;
v11 = (const void *)cocos2d::CCArray::objectAtIndex(*(this + 124), v8);
v12 = v11;
if ( !v11 )
goto LABEL_12;
v13 = _dynamic_cast(
v11,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCSprite,
0);
if ( v13 )
{
v14 = *(void (**)(void))(*(_DWORD *)v13 + 456);
}
else
{
v15 = _dynamic_cast(
v12,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCLabelBMFont,
0);
if ( !v15 )
goto LABEL_12;
v14 = *(void (**)(void))(*(_DWORD *)v15 + 512);
}
v14();
LABEL_12:
++v8;
}
}