//
// sub_D1C3B8 from 0xd1c3b8 to 0xd1c460 (168 bytes)
//
// 0 xrefs:
//
// 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_D1C3B8(const wchar_t **a1, __int64 a2, __int64 a3, unsigned __int64 a4, wchar_t a5)
{
__int64 v5; // x2
__int64 v6; // x19
v5 = (a3 - a2) >> 2;
v6 = a2 - (_QWORD)*a1;
if ( a4 > 0xFFFFFFFFFFFFFFELL - *((_QWORD *)*a1 - 3) + v5 )
sub_D13AF4("basic_string::_M_replace_aux");
sub_D1B4BC(a1, v6 >> 2, v5, a4);
if ( !a4 )
return a1;
if ( a4 != 1 )
{
wmemset((wchar_t *)((char *)*a1 + v6), a5, a4);
return a1;
}
*(const wchar_t *)((char *)*a1 + v6) = a5;
return a1;
}