//
// sub_10044E720 from 0x10044e720 to 0x10044e818 (248 bytes)
//
// 1 xrefs:
// > sub_10044E164 @ 0x10044e234
//
// 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_10044E720(__int64 a1, _DWORD *a2)
{
__int64 v4; // x19
int v5; // w9
int v6; // w8
int v7; // w10
__int64 v8; // x9
__int64 v9; // x21
unsigned int v10; // w8
size_t v11; // x2
__int64 v12; // x20
int v13; // w8
v4 = *(_QWORD *)(a1 + 56);
sub_1004B5C70(v4);
if ( !*(_DWORD *)(a1 + 116) )
goto LABEL_16;
v5 = *(_DWORD *)(a1 + 88);
if ( !v5 )
goto LABEL_16;
v6 = a2[3];
v7 = *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4LL * (v6 & (v5 - 1)));
if ( v7 == -1 )
goto LABEL_16;
v8 = *(_QWORD *)(a1 + 96);
while ( *(_DWORD *)(v8 + 16LL * v7) != v6 )
{
v7 = *(_DWORD *)(v8 + 16LL * v7 + 4);
if ( v7 == -1 )
goto LABEL_16;
}
v9 = *(_QWORD *)(v8 + 16LL * v7 + 8);
if ( !v9 )
goto LABEL_16;
v10 = a2[6];
if ( v10 == *(_DWORD *)(v9 + 40) )
{
v11 = (unsigned int)a2[7];
if ( (unsigned int)v11 <= v10 )
{
v13 = a2[4];
if ( v13 )
{
*(_DWORD *)(v9 + 48) = v13;
}
else
{
memcpy(*(void **)(v9 + 32), a2 + 8, v11);
*(_DWORD *)(v9 + 44) = a2[7];
}
sub_1004B5DD4(*(_QWORD *)(v9 + 8));
LABEL_16:
v12 = 0;
goto LABEL_17;
}
}
v12 = 28;
LABEL_17:
sub_1004B5CA0(v4);
return v12;
}