//
// sub_1404A0A80 from 0x1404a0a80 to 0x1404a0b25 (165 bytes)
//
// 3 xrefs:
// > sub_1404A08F0 @ 0x1404a09b6
// > sub_1404A08F0 @ 0x1404a0a16
// > ??> @ 0x140929450
//
// 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 11:32:56 +0000
//
__int64 __fastcall sub_1404A0A80(__int64 a1, __int64 a2)
{
__int64 v2; // r8
void **v4; // rcx
void *v6; // rdx
void *v7; // rdx
__int64 v8; // r9
v2 = a2 + 8;
*(_DWORD *)a1 = *(_DWORD *)a2;
v4 = (void **)(a1 + 8);
if ( v4 != (void **)(a2 + 8) )
{
v6 = (void *)(a2 + 8);
if ( *(_QWORD *)(v2 + 24) > 0xFu )
v6 = *(void **)v2;
sub_1400405A0(v4, v6, *(_QWORD *)(v2 + 16));
}
if ( a1 + 40 != a2 + 40 )
{
v7 = (void *)(a2 + 40);
if ( *(_QWORD *)(a2 + 64) > 0xFu )
v7 = *(void **)(a2 + 40);
sub_1400405A0((void **)(a1 + 40), v7, *(_QWORD *)(a2 + 56));
}
if ( a1 + 72 != a2 + 72 )
{
v8 = *(_QWORD *)(a2 + 80) - *(_QWORD *)(a2 + 72);
sub_1404A0CB0(a1 + 72, *(_QWORD *)(a2 + 72), v8 / 120 + v8);
}
return a1;
}