//
// sub_D1B888 from 0xd1b888 to 0xd1b924 (156 bytes)
//
// 4 xrefs:
// > sub_D004F0 @ 0xd0062c
// > sub_D004F0 @ 0xd00858
// > sub_D00C0C @ 0xd00d48
// > sub_D00C0C @ 0xd00f74
//
// 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
//
const wchar_t **__fastcall sub_D1B888(const wchar_t **a1, size_t a2, __int64 a3, unsigned __int64 a4, wchar_t a5)
{
if ( a4 > 0xFFFFFFFFFFFFFFELL - *((_QWORD *)*a1 - 3) + a3 )
sub_D13AF4("basic_string::_M_replace_aux");
sub_D1B4BC(a1, a2, a3, a4);
if ( !a4 )
return a1;
if ( a4 != 1 )
{
wmemset((wchar_t *)&(*a1)[a2], a5, a4);
return a1;
}
(*a1)[a2] = a5;
return a1;
}