//
// sub_777A0C from 0x777a0c to 0x777a5e (82 bytes)
//
// 4 xrefs:
// > sub_765C04 @ 0x765cf4
// > sub_765C04 @ 0x765e54
// > sub_7660F4 @ 0x7661e4
// > sub_7660F4 @ 0x766344
//
// 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_777A0C(wchar_t *a1, size_t a2, int a3, unsigned int a4, wchar_t c)
{
if ( a4 > 268435454 - *(_DWORD *)(*a1 - 12) + a3 )
sub_7731C4("basic_string::_M_replace_aux");
sub_7777D0(a1, a2, a3, a4);
if ( !a4 )
return a1;
if ( a4 != 1 )
{
wmemset((wchar_t *)(*a1 + 4 * a2), c, a4);
return a1;
}
*(_DWORD *)(*a1 + 4 * a2) = c;
return a1;
}