//
// sub_D1C2FC from 0xd1c2fc to 0xd1c3b8 (188 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_D1C2FC(const wchar_t **a1, size_t a2, unsigned __int64 a3, wchar_t a4)
{
size_t v7; // x3
v7 = *((_QWORD *)*a1 - 3);
if ( a2 > v7 )
sub_D13C5C("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::insert", a2, v7);
if ( a3 > 0xFFFFFFFFFFFFFFELL - v7 )
sub_D13AF4("basic_string::_M_replace_aux");
sub_D1B4BC(a1, a2, 0, a3);
if ( !a3 )
return a1;
if ( a3 != 1 )
{
wmemset((wchar_t *)&(*a1)[a2], a4, a3);
return a1;
}
(*a1)[a2] = a4;
return a1;
}