//
// sub_10063C6E0 from 0x10063c6e0 to 0x10063c7c3 (227 bytes)
//
// 0 xrefs:
//
// 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_10063C6E0(__int64 **a1, const char *a2)
{
__int64 v2; // rax
__int64 result; // rax
__int64 *v4; // rcx
__int64 v5; // rax
__int64 v6; // r8
__int64 v8; // rdx
__int64 v9; // rdx
__int64 *v10; // rcx
__int64 v11; // rsi
__int64 *v12; // rdi
const char *v13; // rcx
__int64 v14; // rbx
__int64 v15; // [rsp-20h] [rbp-20h] BYREF
if ( !*a1 )
return 0;
v2 = **a1;
if ( (v2 & 6) != 0 )
return 0;
v4 = *(__int64 **)(v2 & 0xFFFFFFFFFFFFFFE0LL);
v5 = v4[1];
v6 = v5 + 64;
if ( (unsigned __int64)(v5 + 64) < 0x8001 )
{
v8 = *v4;
result = *v4 + v5 + 48;
v4[1] = v6;
}
else
{
result = sub_100647FA0(v4, 64, &v15);
v8 = v15;
}
v9 = v8 | 1;
*(_QWORD *)result = v9;
*(_OWORD *)(result + 8) = 0;
*(_OWORD *)(result + 24) = 0;
*(_OWORD *)(result + 40) = 0;
*(_QWORD *)(result + 56) = 0;
v10 = *a1;
*(_QWORD *)(result + 8) = *a1;
v11 = v10[4];
if ( v11 )
{
v12 = (__int64 *)(v11 + 40);
*(_QWORD *)(result + 40) = *(_QWORD *)(v11 + 40);
}
else
{
v12 = (__int64 *)(result + 40);
}
*v12 = result;
*(_QWORD *)(result + 48) = v11;
v10[4] = result;
if ( (v9 & 3 | 4) == 5 )
{
v13 = a2;
v14 = result;
sub_10063B180((const char **)(result + 16), (__int64 *)result, 16, v13);
return v14;
}
return result;
}