//
// sub_1005747AC from 0x1005747ac to 0x10057480c (96 bytes)
//
// 2 xrefs:
// > sub_10054D588 @ 0x10054d684
// > sub_1005879C4 @ 0x100587a6c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_QWORD *__fastcall sub_1005747AC(__int64 a1, __int64 a2)
{
_QWORD *result; // x0
__int64 v5; // x9
__int64 v6; // x8
result = off_10085DEB0(0x10u);
if ( !result )
return nullptr;
*result = a2;
result[1] = 0;
if ( a1 )
{
v5 = a1;
do
{
v6 = v5;
v5 = *(_QWORD *)(v5 + 8);
}
while ( v5 );
*(_QWORD *)(v6 + 8) = result;
return (_QWORD *)a1;
}
return result;
}