//
// sub_1800A58C0 from 0x1800a58c0 to 0x1800a59b6 (246 bytes)
//
// 2 xrefs:
// > sub_1800A6260 @ 0x1800a6309
// > ??> @ 0x1801fb784
//
// 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_1800A58C0(__int64 a1, __int64 a2, __int64 a3)
{
int v6; // [rsp+38h] [rbp+10h] BYREF
void *v7; // [rsp+40h] [rbp+18h] BYREF
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) < 0 )
return 49;
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) < 0 )
return 49;
v7 = nullptr;
v6 = 0;
if ( (*(int (__fastcall **)(__int64, void **, int *))(*(_QWORD *)a2 + 24LL))(a2, &v7, &v6) < 0 )
return 49;
memmove(v7, *(const void **)a3, 4LL * *(unsigned int *)(a3 + 8));
return 0;
}