//
// sub_10005C280 from 0x10005c280 to 0x10005c331 (177 bytes)
//
// 0 xrefs:
//
// 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 12:19:40 +0000
//
void __fastcall sub_10005C280(__int64 a1, const char *a2, int a3)
{
int v4; // eax
void *v5; // rdi
void *v6; // rdi
size_t v7; // r15
char *v8; // r13
v4 = *(_DWORD *)(a1 + 24);
if ( a3 )
{
if ( (v4 & 0x200) != 0 )
{
v5 = *(void **)(a1 + 32);
if ( v5 )
operator delete[](v5);
}
*(_DWORD *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = 0;
*(_QWORD *)(a1 + 32) = a2;
}
else
{
if ( (v4 & 0x200) != 0 )
{
v6 = *(void **)(a1 + 32);
if ( v6 )
operator delete[](v6);
}
*(_DWORD *)(a1 + 24) = 0;
*(_OWORD *)(a1 + 32) = 0;
v7 = strlen(a2);
v8 = (char *)operator new[](v7 + 1);
*(_QWORD *)(a1 + 32) = v8;
memcpy(v8, a2, v7 + 1);
*(_QWORD *)(a1 + 40) = &v8[v7];
*(_DWORD *)(a1 + 24) = 512;
}
}