//
// sub_D1BD98 from 0xd1bd98 to 0xd1bde4 (76 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_D1BD98(
const wchar_t **a1,
size_t a2,
__int64 *a3,
unsigned __int64 a4,
unsigned __int64 a5)
{
__int64 v5; // x2
unsigned __int64 v6; // x5
unsigned __int64 v7; // x5
const wchar_t *v8; // x2
unsigned __int64 v9; // x3
v5 = *a3;
v6 = *(_QWORD *)(v5 - 24);
if ( a4 > v6 )
sub_D13C5C("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::insert", a4, v6);
v7 = v6 - a4;
v8 = (const wchar_t *)(v5 + 4 * a4);
if ( v7 > a5 )
v9 = a5;
else
v9 = v7;
return sub_D1BB9C(a1, a2, v8, v9);
}