//
// sub_1003E30E0 from 0x1003e30e0 to 0x1003e318a (170 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b3cc50
//
// 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:29:46 +0000
//
_QWORD *__fastcall sub_1003E30E0(__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 + 488LL))(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;
}