//
// sub_D7044 from 0xd7044 to 0xd70e8 (164 bytes)
//
// 2 xrefs:
// > sub_D6DF4 @ 0xd6f8c
// > sub_D6DF4 @ 0xd6f94
//
// 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_D7044(__int64 a1, void *a2, __int64 a3, _DWORD *a4, _DWORD *a5)
{
__int64 result; // x0
__int64 v9; // x22
__int64 v10; // x8
int v11; // w20
__int64 v12; // [xsp+8h] [xbp-28h]
v12 = 0;
result = (*(__int64 (**)(void))(*(_QWORD *)(a1 + 40) + 88LL))();
if ( !(_DWORD)result )
{
v9 = v12;
v10 = *(_QWORD *)(v12 + 32);
if ( v10 )
{
v11 = *a4 * *a5;
memcpy(a2, (const void *)(v10 + *(unsigned int *)(v12 + 72)), (unsigned int)(4 * v11));
*(_DWORD *)(v9 + 72) += 4 * v11;
}
else
{
result = sub_7DFC4(*(_QWORD *)(v12 + 16), (__int64)a2, (unsigned int)*a4);
if ( (_DWORD)result )
return result;
}
return 0;
}
return result;
}