//
// sub_1004E7B1C from 0x1004e7b1c to 0x1004e7bb0 (148 bytes)
//
// 4 xrefs:
// > sub_1004E6D68 @ 0x1004e77e0
// > sub_1004E6D68 @ 0x1004e77ec
// > sub_1004E7D7C @ 0x1004e7dcc
// > sub_1004E7D7C @ 0x1004e7dd8
//
// 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:40 +0000
//
void *__fastcall sub_1004E7B1C(void *result, int a2)
{
void *v3; // x20
int v4; // w8
__int16 v5; // [xsp+Ch] [xbp-14h] BYREF
char v6; // [xsp+Eh] [xbp-12h]
if ( result )
{
v3 = result;
(*(void (__fastcall **)(void *))(*(_QWORD *)result + 1056LL))(result);
result = (void *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v3 + 1072LL))(v3);
if ( result )
{
result = __dynamic_cast(
result,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&off_1008BD768,
-2);
if ( result )
{
if ( a2 )
v4 = -1;
else
v4 = -5921371;
v5 = v4;
v6 = BYTE2(v4);
return (void *)(**(__int64 (__fastcall ***)(void *, __int16 *))result)(result, &v5);
}
}
}
return result;
}