//
// sub_1003F5F00 from 0x1003f5f00 to 0x1003f5faa (170 bytes)
//
// 1 xrefs:
// > ??> @ 0x100933090
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_QWORD *__fastcall sub_1003F5F00(__int64 a1, char a2)
{
_QWORD *result; // rax
__int64 v4; // rdi
const void **v5; // r12
unsigned __int64 v6; // r13
v4 = *(_QWORD *)(a1 + 112);
if ( v4 )
{
*(_BYTE *)(a1 + 192) = a2;
result = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 472LL))(v4);
if ( result )
{
result = (_QWORD *)result[7];
if ( *(_DWORD *)result )
{
v5 = (const void **)result[2];
v6 = (unsigned __int64)&v5[*(unsigned int *)result - 1];
do
{
if ( !*v5 )
break;
result = __dynamic_cast(
*v5,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( result )
result = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD *, _QWORD))(*result + 48LL))(
result,
*(unsigned __int8 *)(a1 + 192));
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
}
}
}
return result;
}