//
// sub_775DC0 from 0x775dc0 to 0x776058 (664 bytes)
//
// 14 xrefs:
// > GameObject::addGlow @ 0x776154
// > GameObject::getColorFrame @ 0x77671c
// > GameObject::addColorSprite @ 0x776a88
// > GameObject::addColorSprite @ 0x776b40
// > GameObject::addColorSprite @ 0x776c08
// > GameObject::addColorSprite @ 0x776f30
// > GameObject::addColorSprite @ 0x776fe8
// > GameObject::addColorSprite @ 0x7770a0
// > GameObject::getGlowFrame @ 0x777f20
// > GameObject::playShineEffect @ 0x778414
// > GameObject::playShineEffect @ 0x77896c
// > GameObject::playShineEffect @ 0x7789f0
// > GameObject::playShineEffect @ 0x778b94
// > GameObject::playShineEffect @ 0x778be8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:53:14 +0000
//
__int64 *__usercall sub_775DC0@(char *a1@, char *a2@, char *a3@, __int64 *a4@)
{
__int64 v8; // x1
size_t v9; // x0
size_t v10; // x0
size_t v11; // x0
unsigned __int8 v12; // w1
size_t v13; // x0
unsigned __int8 v14; // w4
unsigned __int8 v15; // w2
char *v16; // x7
unsigned __int64 v17; // x1
int v18; // w5
unsigned __int8 *v19; // x8
unsigned __int64 v20; // x3
size_t v21; // x24
size_t v22; // x2
char *v23; // x3
size_t v24; // x4
size_t v25; // x2
char *v27; // x0
char *v28; // x1
char *v29; // x12
char *v30; // x0
unsigned __int8 *v31; // x3
char *v32; // x24
char *v33; // x13
unsigned __int8 *v34; // x6
char *v35; // x9
int v36; // t1
__int64 v37; // [xsp+48h] [xbp+48h] BYREF
size_t v38; // [xsp+50h] [xbp+50h]
void *v39; // [xsp+58h] [xbp+58h]
__int64 v40; // [xsp+60h] [xbp+60h] BYREF
size_t v41; // [xsp+68h] [xbp+68h]
void *v42; // [xsp+70h] [xbp+70h]
__int64 v43; // [xsp+78h] [xbp+78h]
a4[1] = 0;
a4[2] = 0;
v8 = _stack_chk_guard;
*a4 = 0;
v43 = v8;
v9 = strlen(a1);
std::string::__init(a4, a1, v9);
v37 = 0;
v38 = 0;
v39 = nullptr;
v10 = strlen(a2);
std::string::__init(&v37, a2, v10);
v40 = 0;
v41 = 0;
v42 = nullptr;
v11 = strlen(a3);
std::string::__init(&v40, a3, v11);
v12 = *(_BYTE *)a4;
v13 = 0;
v14 = v40;
if ( (*(_BYTE *)a4 & 1) == 0 )
goto LABEL_14;
LABEL_2:
v15 = v37;
v16 = (char *)a4[2];
v17 = a4[1];
v18 = v37 & 1;
if ( v18 )
{
LABEL_3:
v19 = (unsigned __int8 *)v39;
v20 = v38;
if ( v13 <= v17 )
goto LABEL_4;
}
else
{
while ( 1 )
{
v20 = v15 >> 1;
v19 = (unsigned __int8 *)&v37 + 1;
if ( v13 > v17 )
break;
LABEL_4:
if ( v17 - v13 < v20 )
break;
v21 = v13;
if ( v20 )
{
v27 = &v16[v13];
v28 = &v16[v17];
if ( (__int64)v20 > v28 - v27 )
break;
v29 = &v28[1 - v20];
if ( v27 == v29 )
break;
v30 = v27 + 1;
v31 = &v19[v20];
do
{
v32 = v30 - 1;
v33 = v30;
if ( (unsigned __int8)*(v30 - 1) == *v19 )
{
v34 = v19;
v35 = v30 - 1;
while ( ++v34 != v31 )
{
v36 = (unsigned __int8)*++v35;
if ( v36 != *v34 )
goto LABEL_31;
}
if ( v28 != v32 )
{
v21 = v32 - v16;
goto LABEL_6;
}
goto LABEL_16;
}
LABEL_31:
++v30;
}
while ( v29 != v33 );
if ( (v14 & 1) == 0 )
goto LABEL_17;
goto LABEL_30;
}
LABEL_6:
if ( v21 == -1 )
break;
v22 = v15 >> 1;
if ( v18 )
v22 = v38;
if ( (v14 & 1) != 0 )
{
v23 = (char *)v42;
v24 = v41;
}
else
{
v24 = v14 >> 1;
v23 = (char *)&v40 + 1;
}
std::string::replace(a4, v21, v22, v23, v24);
v14 = v40;
v25 = (unsigned __int8)v40 >> 1;
if ( (v40 & 1) != 0 )
v25 = v41;
v12 = *(_BYTE *)a4;
v13 = v25 + v21;
if ( (*(_BYTE *)a4 & 1) != 0 )
goto LABEL_2;
LABEL_14:
v15 = v37;
v16 = (char *)a4 + 1;
v17 = v12 >> 1;
v18 = v37 & 1;
if ( v18 )
goto LABEL_3;
}
}
LABEL_16:
if ( (v14 & 1) != 0 )
{
LABEL_30:
operator delete(v42);
v18 = v37 & 1;
}
LABEL_17:
if ( v18 )
operator delete(v39);
return a4;
}