//
// sub_96700 from 0x96700 to 0x96748 (72 bytes)
//
// 3 xrefs:
// > sub_966A8 @ 0x966c0
// > sub_966E2 @ 0x966f4
// > sub_967E2 @ 0x967fe
//
// 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
//
int __fastcall sub_96700(int a1, int a2, int a3, void *a4)
{
int result; // r0
int v7; // r0
void *v8; // r0
void *v9; // [sp+4h] [bp-Ch] BYREF
v9 = a4;
if ( *(_DWORD *)(a1 + 4) > a2 )
return 28;
v9 = nullptr;
if ( a2 )
{
result = sub_96748(a2, &v9);
if ( result )
return result;
v7 = *(_DWORD *)(a1 + 4);
if ( v7 )
qmemcpy(v9, *(const void **)a1, 4 * v7);
}
if ( *(int *)(a1 + 8) >= 1 )
sub_53214(*(_DWORD *)a1);
v8 = v9;
*(_DWORD *)(a1 + 8) = a2;
*(_DWORD *)a1 = v8;
return 0;
}