//
// sub_1005D016C from 0x1005d016c to 0x1005d0234 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x10083aec0
//
// 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
//
__int64 __fastcall sub_1005D016C(__int64 a1, __int64 a2)
{
_BYTE *v4; // x21
__int64 v5; // x8
_BYTE *v6; // x0
_BYTE *v7; // x21
__int64 v8; // x8
_BYTE *v9; // x0
_BYTE *v10; // x20
__int64 v11; // x8
_BYTE *v12; // x0
v4 = sub_1005AAEE0(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 24LL));
if ( !v4 )
return 0;
v5 = *(_QWORD *)(a1 + 32);
v6 = *(_BYTE **)(v5 + 24);
if ( v6 )
{
sub_1005AACD0(v6);
v5 = *(_QWORD *)(a1 + 32);
}
*(_QWORD *)(v5 + 24) = v4;
v7 = sub_1005AAEE0(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 32LL));
if ( !v7 )
return 0;
v8 = *(_QWORD *)(a1 + 32);
v9 = *(_BYTE **)(v8 + 32);
if ( v9 )
{
sub_1005AACD0(v9);
v8 = *(_QWORD *)(a1 + 32);
}
*(_QWORD *)(v8 + 32) = v7;
v10 = sub_1005AAEE0(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 40LL));
if ( !v10 )
return 0;
v11 = *(_QWORD *)(a1 + 32);
v12 = *(_BYTE **)(v11 + 40);
if ( v12 )
{
sub_1005AACD0(v12);
v11 = *(_QWORD *)(a1 + 32);
}
*(_QWORD *)(v11 + 40) = v10;
return 1;
}