//
// sub_1003F8E30 from 0x1003f8e30 to 0x1003f8eb0 (128 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::init @ 0x1003f7300
// > LevelEditorLayer::onPlaytest @ 0x1004048a0
// > LevelEditorLayer::onStopPlaytest @ 0x100405554
//
// 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:04:35 +0000
//
__int64 __fastcall sub_1003F8E30(__int64 result, __int64 a2)
{
__int64 v2; // x8
unsigned int *v3; // x9
__int64 v4; // x8
_QWORD *v6; // x21
unsigned __int64 v7; // x22
__int64 v8; // x20
v2 = *(_QWORD *)(result + 3280);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v6 = *((_QWORD **)v3 + 2);
v7 = (unsigned __int64)&v6[v4 - 1];
do
{
v8 = *v6;
if ( !*v6 )
break;
result = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v8 + 1728LL))(*v6);
if ( (_DWORD)result )
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1856LL))(v8, a2);
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
}
}
return result;
}