//
// sub_10005AB20 from 0x10005ab20 to 0x10005abc8 (168 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:39 +0000
//
const char *__fastcall sub_10005AB20(__int64 a1, const char *a2, const char *a3, int a4)
{
char v6; // r15
size_t v7; // rbx
char v8; // al
const char *v9; // r13
void *v10; // rdi
int v14; // [rsp+14h] [rbp-2Ch]
v6 = *a3;
v7 = strlen(a3);
v8 = *a2;
if ( !*a2 )
return nullptr;
v14 = a4;
v9 = a2;
while ( v8 != v6 || strncmp(v9, a3, v7) )
{
v8 = *++v9;
if ( !v8 )
return nullptr;
}
if ( (*(_BYTE *)(a1 + 1) & 2) != 0 )
{
v10 = *(void **)(a1 + 8);
if ( v10 )
operator delete[](v10);
}
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = v9;
*(_DWORD *)a1 = v14 | 0x100;
return &v9[v7];
}