//
// sub_D17AD8 from 0xd17ad8 to 0xd17b24 (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_D17AD8(int **a1, __int64 *a2, unsigned __int64 a3, size_t a4)
{
__int64 v4; // x5
unsigned __int64 v6; // x4
size_t v7; // x2
const char *v8; // x1
v4 = *a2;
v6 = *(_QWORD *)(v4 - 24);
if ( a3 > v6 )
sub_D13C5C(
"%s: __pos (which is %zu) > this->size() (which is %zu)",
"basic_string::assign",
a3,
*(_QWORD *)(v4 - 24));
v7 = v6 - a3;
v8 = (const char *)(v4 + a3);
if ( v7 > a4 )
v7 = a4;
return sub_D1798C(a1, v8, v7);
}