//
// sub_10057FE1C from 0x10057fe1c to 0x10057fea4 (136 bytes)
//
// 2 xrefs:
// > sub_10057FE1C @ 0x10057fe80
// > sub_10058050C @ 0x10058069c
//
// 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:08:29 +0000
//
__int64 __fastcall sub_10057FE1C(__int64 a1, _OWORD *a2)
{
__int64 *v3; // x8
__int64 v4; // x9
__int64 v5; // t1
_QWORD *v6; // x20
_QWORD *v7; // x21
v3 = *(__int64 **)(a1 + 16);
if ( v3 )
{
v4 = *(unsigned int *)(a1 + 24);
if ( (int)v4 >= 1 )
{
do
{
v5 = *v3++;
*(_OWORD *)(v5 + 8) = *a2;
--v4;
}
while ( v4 );
}
}
else
{
*(_OWORD *)(*(_QWORD *)(a1 + 96) + 8LL) = *a2;
}
v6 = (_QWORD *)(a1 + 400);
v7 = *(_QWORD **)(a1 + 400);
if ( v7 != (_QWORD *)(a1 + 400) )
{
do
{
sub_10057FE1C(v7[2], a2);
v7 = (_QWORD *)*v7;
}
while ( v7 != v6 );
}
return 0;
}