//
// _ZNSt6__ndk112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceIPKwEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_ from 0x97aa4c to 0x97aaf4 (168 bytes)
//
// 1 xrefs:
// > sub_97AA30 @ 0x97aa42
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:06:02 +0000
//
unsigned int *__fastcall std::wstring::replace(unsigned int *a1, int a2, int a3, char *a4, char *a5)
{
unsigned int *v8; // r0
unsigned int v9; // r1
unsigned int *v10; // r3
int v11; // r0
unsigned int *v12; // r4
unsigned int v14; // [sp+8h] [bp-20h] BYREF
unsigned int v15; // [sp+Ch] [bp-1Ch] BYREF
void *v16; // [sp+10h] [bp-18h]
v15 = 0;
v16 = nullptr;
v14 = 0;
std::wstring::__init(&v14, a4, a5);
if ( (*(_BYTE *)a1 & 1) != 0 )
v8 = (unsigned int *)a1[2];
else
v8 = a1 + 1;
v9 = v15;
v10 = (unsigned int *)v16;
if ( (v14 & 1) == 0 )
v9 = (unsigned __int8)v14 >> 1;
v11 = a2 - (_DWORD)v8;
if ( (v14 & 1) == 0 )
v10 = &v15;
v12 = std::wstring::replace(a1, v11 >> 2, (a3 - a2) >> 2, (unsigned int)v10, v9);
if ( (v14 & 1) != 0 )
operator delete(v16);
return v12;
}