//
// sub_978618 from 0x978618 to 0x97865a (66 bytes)
//
// 0 xrefs:
//
// 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:00 +0000
//
_DWORD *__fastcall sub_978618(_DWORD *a1, int a2, int a3, unsigned __int8 *a4)
{
unsigned int v4; // r2
char *v5; // lr
unsigned __int64 v6; // kr00_8
unsigned int v7; // r5
v4 = a3 - a2;
if ( (*(_BYTE *)a1 & 1) != 0 )
v5 = (char *)a1[2];
else
v5 = (char *)a1 + 1;
v6 = *(_QWORD *)(a4 + 4);
v7 = *a4;
if ( (v7 & 1) == 0 )
v6 = __PAIR64__((unsigned int)(a4 + 1), v7 >> 1);
return std::string::replace(a1, a2 - (_DWORD)v5, v4, (char *)HIDWORD(v6), v6);
}