//
// sub_100510254 from 0x100510254 to 0x1005102d8 (132 bytes)
//
// 0 xrefs:
//
// 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_100510254(__int64 a1, __int64 a2, void *__dst, int a4, __int64 a5, _DWORD *a6)
{
int v6; // w8
__int64 v8; // x9
const void *v9; // x1
const void *v10; // x10
if ( a2 )
{
*a6 = *(_DWORD *)(a1 + 564);
v6 = *(_DWORD *)(a1 + 564) * a4;
if ( v6 > *(_DWORD *)(a1 + 568) )
return 28;
v8 = *(_QWORD *)(a1 + 8);
v9 = *(const void **)(a1 + 544);
if ( v8 != *(_QWORD *)(a1 + 576) )
{
v10 = *(const void **)(a1 + 552);
*(_QWORD *)(a1 + 544) = v10;
*(_QWORD *)(a1 + 552) = v9;
*(_WORD *)(a1 + 584) = *(unsigned __int8 *)(a1 + 585);
*(_QWORD *)(a1 + 576) = v8;
v9 = v10;
}
memcpy(__dst, v9, 4LL * v6);
}
return 0;
}