//
// sub_10013F3AC from 0x10013f3ac to 0x10013f4c8 (284 bytes)
//
// 1 xrefs:
// > sub_100139A34 @ 0x100139bbc
//
// 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
//
void __fastcall sub_10013F3AC(_QWORD *a1, __int64 *a2, __int64 *a3)
{
__int64 *v4; // x21
__int64 v6; // x8
__int64 i; // x9
void **v8; // x22
bool v9; // zf
void **v10; // x23
__int128 v11; // q1
__int128 v12; // q0
__int128 v13; // q1
__int128 v14; // q3
__int128 v15; // q0
__int128 v16; // q1
__int128 v17; // q2
unsigned __int64 v18; // x1
_QWORD *v19; // x0
v4 = a2;
v6 = a1[1];
if ( v6 )
{
for ( i = 0; i != v6; ++i )
*(_QWORD *)(*a1 + 8 * i) = 0;
v8 = (void **)a1[2];
a1[2] = 0;
a1[3] = 0;
if ( v8 )
v9 = a2 == a3;
else
v9 = 1;
if ( v9 )
{
v10 = v8;
}
else
{
do
{
*((_DWORD *)v8 + 4) = *((_DWORD *)v4 + 4);
std::string::operator=((std::string *)v8 + 1, (const std::string *)v4 + 1);
v11 = *((_OWORD *)v4 + 4);
*((_OWORD *)v8 + 3) = *((_OWORD *)v4 + 3);
*((_OWORD *)v8 + 4) = v11;
v12 = *((_OWORD *)v4 + 5);
v13 = *((_OWORD *)v4 + 6);
v14 = *((_OWORD *)v4 + 8);
*((_OWORD *)v8 + 7) = *((_OWORD *)v4 + 7);
*((_OWORD *)v8 + 8) = v14;
*((_OWORD *)v8 + 5) = v12;
*((_OWORD *)v8 + 6) = v13;
v15 = *((_OWORD *)v4 + 9);
v16 = *((_OWORD *)v4 + 10);
v17 = *((_OWORD *)v4 + 11);
*(_OWORD *)((char *)v8 + 189) = *(_OWORD *)((char *)v4 + 189);
*((_OWORD *)v8 + 10) = v16;
*((_OWORD *)v8 + 11) = v17;
*((_OWORD *)v8 + 9) = v15;
v10 = (void **)*v8;
v18 = *((int *)v8 + 4);
v8[1] = (void *)v18;
v19 = (_QWORD *)sub_10001ABFC((__int64)a1, v18, (_DWORD *)v8 + 4);
sub_10001AD58(a1, v8, v19);
v4 = (__int64 *)*v4;
if ( !v10 )
break;
v8 = v10;
}
while ( v4 != a3 );
}
sub_1001275D8((int)a1, v10);
}
while ( v4 != a3 )
{
sub_10013F4F8(a1, v4 + 2);
v4 = (__int64 *)*v4;
}
}