//
// sub_1003E1D1C from 0x1003e1d1c to 0x1003e1d98 (124 bytes)
//
// 1 xrefs:
// > sub_1003E0E90 @ 0x1003e189c
//
// 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:23 +0000
//
__int64 __fastcall sub_1003E1D1C(__int64 a1, __int64 a2)
{
int v3; // w0
__int64 v4; // x8
unsigned int v5; // w20
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(a1 + 1040) = v3;
v4 = *(_QWORD *)(a1 + 680);
if ( v4 )
{
*(_DWORD *)(v4 + 1840) = v3;
}
else if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) )
{
v5 = 0;
do
*(_DWORD *)(sub_1002E75A0(*(_QWORD *)(a1 + 688), v5++) + 1840) = *(_DWORD *)(a1 + 1040);
while ( v5 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) );
}
return sub_1003E1D98(a1);
}