//
// sub_100718720 from 0x100718720 to 0x10071879d (125 bytes)
//
// 5 xrefs:
// > sub_1007186B0 @ 0x1007186db
// > sub_100718A90 @ 0x100718ade
// > sub_1007196F0 @ 0x1007198a1
// > sub_1007196F0 @ 0x10071998b
// > sub_100724E80 @ 0x100725a55
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:36:09 +0000
//
__int64 __fastcall sub_100718720(__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_100724BD0(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;
}