//
// sub_1800A58C0 from 0x1800a58c0 to 0x1800a59b6 (246 bytes)
//
// 2 xrefs:
// > sub_1800A6260 @ 0x1800a6309
// > ??> @ 0x1801fb784
//
// This function is hookable on this platform (idp: pc, 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 10:53:53 +0000
//
__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;
}