//
// sub_1004F6CB4 from 0x1004f6cb4 to 0x1004f6e14 (352 bytes)
//
// 1 xrefs:
// > sub_1004F6C3C @ 0x1004f6c80
//
// 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 11:06:48 +0000
//
__int64 __fastcall sub_1004F6CB4(_DWORD *a1)
{
__int64 v2; // x0
__int64 v3; // x20
__int64 result; // x0
_QWORD *v5; // x23
__int64 v6; // x21
unsigned __int64 v7; // x24
_DWORD *v8; // x22
v2 = cocos2d::CCDirector::sharedDirector();
v3 = *(_QWORD *)(v2 + 272);
if ( !v3 )
return 0;
result = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v3 + 488LL))(*(_QWORD *)(v2 + 272));
if ( result )
{
if ( (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 512LL))(a1) != v3 )
return 1;
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3);
if ( result )
{
if ( **(_DWORD **)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3) + 56) )
{
v5 = *(_QWORD **)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3) + 56) + 16LL);
v6 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3) + 56) + 16LL);
v7 = v6 + 8LL * **(unsigned int **)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3) + 56) - 8;
if ( (unsigned __int64)v5 <= v7 )
{
while ( 1 )
{
v8 = (_DWORD *)*v5;
if ( !*v5 )
break;
if ( v8 != a1
&& (*(int (__fastcall **)(_QWORD))(*(_QWORD *)v8 + 104LL))(*v5) > a1[148]
&& !__dynamic_cast(
v8,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&off_100936668,
0) )
{
return 1;
}
result = 0;
if ( (unsigned __int64)++v5 > v7 )
return result;
}
}
}
return 0;
}
}
return result;
}