//
// sub_14044BEA0 from 0x14044bea0 to 0x14044c0c9 (553 bytes)
//
// 2 xrefs:
// > KeybindSet::chordsForAction @ 0x1404494bd
// > ??> @ 0x140927488
//
// 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:25 +0000
//
unsigned __int64 __fastcall sub_14044BEA0(_QWORD *a1, unsigned __int64 a2, unsigned __int64 a3)
{
_DWORD *v3; // r9
unsigned __int64 v4; // rdi
unsigned __int64 result; // rax
_DWORD *i; // rdx
__int64 v9; // rcx
unsigned __int64 v10; // rcx
unsigned __int64 v11; // r8
__int64 v12; // rcx
unsigned __int64 v13; // rcx
unsigned __int64 j; // rdi
__int64 v15; // rcx
unsigned __int64 v16; // rcx
__int64 v17; // rcx
unsigned __int64 v18; // rcx
v3 = (_DWORD *)*a1;
v4 = a3;
result = (__int64)(a1[2] - *a1) >> 2;
if ( a3 <= result )
{
i = (_DWORD *)a1[1];
v11 = i - v3;
if ( v4 <= v11 )
{
for ( i = &v3[v4]; v4; --v4 )
{
result = *(unsigned int *)(a2 + 28);
*v3++ = result;
v17 = *(_QWORD *)(a2 + 16);
if ( *(_BYTE *)(v17 + 25) )
{
for ( result = *(_QWORD *)(a2 + 8); !*(_BYTE *)(result + 25); result = *(_QWORD *)(result + 8) )
{
if ( a2 != *(_QWORD *)(result + 16) )
break;
a2 = result;
}
a2 = result;
}
else
{
a2 = *(_QWORD *)(a2 + 16);
v18 = *(_QWORD *)v17;
if ( !*(_BYTE *)(v18 + 25) )
{
do
{
result = *(_QWORD *)v18;
a2 = v18;
v18 = result;
}
while ( !*(_BYTE *)(result + 25) );
}
}
}
}
else
{
for ( ; v3 != i; i = (_DWORD *)a1[1] )
{
result = *(unsigned int *)(a2 + 28);
*v3++ = result;
v12 = *(_QWORD *)(a2 + 16);
if ( *(_BYTE *)(v12 + 25) )
{
for ( result = *(_QWORD *)(a2 + 8); !*(_BYTE *)(result + 25); result = *(_QWORD *)(result + 8) )
{
if ( a2 != *(_QWORD *)(result + 16) )
break;
a2 = result;
}
a2 = result;
}
else
{
a2 = *(_QWORD *)(a2 + 16);
v13 = *(_QWORD *)v12;
if ( !*(_BYTE *)(v13 + 25) )
{
do
{
result = *(_QWORD *)v13;
a2 = v13;
v13 = result;
}
while ( !*(_BYTE *)(result + 25) );
}
}
}
for ( j = v4 - v11; j; --j )
{
result = *(unsigned int *)(a2 + 28);
*i++ = result;
v15 = *(_QWORD *)(a2 + 16);
if ( *(_BYTE *)(v15 + 25) )
{
for ( result = *(_QWORD *)(a2 + 8); !*(_BYTE *)(result + 25); result = *(_QWORD *)(result + 8) )
{
if ( a2 != *(_QWORD *)(result + 16) )
break;
a2 = result;
}
a2 = result;
}
else
{
a2 = *(_QWORD *)(a2 + 16);
v16 = *(_QWORD *)v15;
if ( !*(_BYTE *)(v16 + 25) )
{
do
{
result = *(_QWORD *)v16;
a2 = v16;
v16 = result;
}
while ( !*(_BYTE *)(result + 25) );
}
}
}
}
}
else
{
result = (unsigned __int64)sub_14009A0D0((__int64)a1, a3);
for ( i = (_DWORD *)*a1; v4; --v4 )
{
result = *(unsigned int *)(a2 + 28);
*i++ = result;
v9 = *(_QWORD *)(a2 + 16);
if ( *(_BYTE *)(v9 + 25) )
{
for ( result = *(_QWORD *)(a2 + 8); !*(_BYTE *)(result + 25); result = *(_QWORD *)(result + 8) )
{
if ( a2 != *(_QWORD *)(result + 16) )
break;
a2 = result;
}
a2 = result;
}
else
{
a2 = *(_QWORD *)(a2 + 16);
v10 = *(_QWORD *)v9;
if ( !*(_BYTE *)(v10 + 25) )
{
do
{
result = *(_QWORD *)v10;
a2 = v10;
v10 = result;
}
while ( !*(_BYTE *)(result + 25) );
}
}
}
}
a1[1] = i;
return result;
}