//
// sub_1005DE2D4 from 0x1005de2d4 to 0x1005de37c (168 bytes)
//
// 1 xrefs:
// > sub_1005DE02C @ 0x1005de200
//
// This function is hookable on this platform (idp: arm, 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:09:38 +0000
//
__int64 __fastcall sub_1005DE2D4(__int64 a1, void *a2, __int64 a3, _DWORD *a4, _DWORD *a5)
{
__int64 result; // x0
__int64 v9; // x22
__int64 v10; // x8
size_t v11; // x20
__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 = (unsigned int)(4 * *a4 * *a5);
memcpy(a2, (const void *)(v10 + *(unsigned int *)(v12 + 72)), v11);
*(_DWORD *)(v9 + 72) += v11;
}
else
{
result = sub_10056CB10(*(_QWORD *)(v12 + 16), a2);
if ( (_DWORD)result )
return result;
}
return 0;
}
return result;
}