//
// sub_1004C37E4 from 0x1004c37e4 to 0x1004c3854 (112 bytes)
//
// 2 xrefs:
// > sub_1004C323C @ 0x1004c3300
// > sub_1004C323C @ 0x1004c342c
//
// 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:21 +0000
//
__int64 __fastcall sub_1004C37E4(__int64 result, __int64 a2)
{
_QWORD *v3; // x19
__int64 v4; // x9
unsigned __int64 v5; // x8
__int64 v6; // x11
_QWORD *v7; // x0
if ( a2 )
{
v3 = (_QWORD *)result;
cocos2d::CCObject::retain(a2);
cocos2d::CCObject::autorelease(a2);
v4 = v3[114];
if ( v4 )
{
v5 = v3[115];
v6 = v3[116];
if ( v6 & 1 | v5 )
{
v7 = (_QWORD *)(v4 + (v6 >> 1));
if ( (v6 & 1) != 0 )
v5 = *(_QWORD *)(*v7 + (unsigned int)v5);
((void (__fastcall *)(_QWORD *, __int64))v5)(v7, a2);
}
}
return sub_1004C38F8(v3);
}
return result;
}