//
// sub_1404C64E0 from 0x1404c64e0 to 0x1404c6626 (326 bytes)
//
// 2 xrefs:
// > sub_1404C5230 @ 0x1404c553d
// > ??> @ 0x1406dd148
//
// 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
//
// Hidden C++ exception states: #wind=2
__int64 *__fastcall sub_1404C64E0(__int64 *a1, int a2, int a3, int a4)
{
__int64 v5; // rbp
unsigned __int64 v7; // rsi
unsigned __int64 v8; // r15
__int64 v9; // r8
__int64 v10; // rbx
__int64 v11; // r8
__int64 v12; // rbx
v5 = a2;
v7 = 0;
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
a1[3] = 0;
a1[4] = 0;
a1[5] = 0;
sub_1404C7740(a1, a3 + 1);
sub_1404C7740(a1 + 3, a4 + 1);
v8 = 0;
v9 = *a1;
if ( (a1[1] - *a1) / 24 )
{
v10 = 0;
do
{
sub_1404C7840(v10 + v9, v5);
++v8;
v10 += 24;
v9 = *a1;
}
while ( v8 < (a1[1] - *a1) / 24 );
}
v11 = a1[3];
if ( (a1[4] - v11) / 24 )
{
v12 = 0;
do
{
sub_1404C7840(v12 + v11, v5);
++v7;
v12 += 24;
v11 = a1[3];
}
while ( v7 < (a1[4] - v11) / 24 );
}
return a1;
}