//
// sub_10063BAF0 from 0x10063baf0 to 0x10063bb6d (125 bytes)
//
// 5 xrefs:
// > sub_10063BA80 @ 0x10063baab
// > sub_10063BE60 @ 0x10063beae
// > sub_10063CAC0 @ 0x10063cc71
// > sub_10063CAC0 @ 0x10063cd5b
// > sub_100648250 @ 0x100648e25
//
// 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_10063BAF0(__int64 a1, __int64 *a2)
{
__int64 v2; // rax
__int64 v4; // rax
__int64 v5; // rsi
__int64 result; // rax
__int64 v7; // rdx
__int64 v8; // rcx
__int64 v9; // rdx
__int64 *v10; // rcx
__int64 v11; // [rsp+0h] [rbp-10h] BYREF
v11 = v2;
v4 = a2[1];
v5 = v4 + 40;
if ( (unsigned __int64)(v4 + 40) < 0x8001 )
{
v7 = *a2;
result = *a2 + v4 + 48;
a2[1] = v5;
}
else
{
result = sub_100647FA0(a2, 40, &v11);
v7 = v11;
}
*(_QWORD *)result = v7;
*(_OWORD *)(result + 8) = 0;
*(_OWORD *)(result + 24) = 0;
v8 = *(_QWORD *)(a1 + 56);
if ( v8 )
{
v9 = *(_QWORD *)(v8 + 24);
v10 = (__int64 *)(v8 + 24);
*(_QWORD *)(v9 + 32) = result;
*(_QWORD *)(result + 24) = v9;
}
else
{
*(_QWORD *)(a1 + 56) = result;
v10 = (__int64 *)(result + 24);
}
*v10 = result;
return result;
}