//
// sub_777D2C from 0x777d2c to 0x777d60 (52 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
//
wchar_t *__fastcall sub_777D2C(wchar_t *a1, size_t a2, int *a3, unsigned int a4, unsigned int a5)
{
int v5; // r2
unsigned int v6; // r4
const wchar_t *v7; // r2
unsigned int v8; // r3
v5 = *a3;
v6 = *(_DWORD *)(v5 - 12);
if ( a4 > v6 )
sub_7732C4("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::insert", a4, v6);
v7 = (const wchar_t *)(v5 + 4 * a4);
v8 = v6 - a4;
if ( v8 >= a5 )
v8 = a5;
return sub_777BE4(a1, a2, v7, v8);
}