//
// sub_D17D78 from 0xd17d78 to 0xd17dc4 (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
//
int **__fastcall sub_D17D78(int **a1, size_t a2, __int64 *a3, unsigned __int64 a4, unsigned __int64 a5)
{
__int64 v5; // x2
unsigned __int64 v6; // x5
unsigned __int64 v7; // x5
int *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 = (int *)(v5 + a4);
if ( v7 > a5 )
v9 = a5;
else
v9 = v7;
return sub_D17B90(a1, a2, v8, v9);
}