//
// sub_14026CF30 from 0x14026cf30 to 0x14026cffc (204 bytes)
//
// 5 xrefs:
// > GJEffectManager::init @ 0x14025adcb
// > GJEffectManager::init @ 0x14025ae30
// > ??> @ 0x140686568
// > ??> @ 0x140686578
// > ??> @ 0x1406d0a1c
//
// 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_14026CF30(__int64 a1)
{
unsigned __int64 v2; // rdx
__int64 v3; // rsi
unsigned __int64 v4; // rcx
unsigned __int64 v5; // rbx
_QWORD *v6; // r14
v2 = (__int64)(*(_QWORD *)(a1 + 16) - *(_QWORD *)a1) >> 3;
v3 = (__int64)(*(_QWORD *)(a1 + 8) - *(_QWORD *)a1) >> 3;
v4 = v2 >> 1;
if ( v2 <= 0x1FFFFFFFFFFFFFFFLL - (v2 >> 1) )
{
v5 = v4 + v2;
if ( v4 + v2 >= 0x44E )
{
if ( v5 > 0x1FFFFFFFFFFFFFFFLL )
sub_140007AB0(v4, v2, 0x1FFFFFFFFFFFFFFFLL);
}
else
{
v5 = 1102;
}
}
else
{
v5 = 0x1FFFFFFFFFFFFFFFLL;
}
v6 = sub_14003AA10(8 * v5);
memset(&v6[v3], 0, 8 * (1102 - v3));
memmove(v6, *(const void **)a1, *(_QWORD *)(a1 + 8) - *(_QWORD *)a1);
return sub_14012D3C0(a1, (__int64)v6, 1102, v5);
}