//
// PlayerObject::updateGlowColor from 0x752be0 to 0x753100 (1312 bytes)
//
// 5 xrefs:
// > MenuGameLayer::resetPlayer @ 0x7da514
// > MenuGameLayer::init @ 0x7db270
// > GJBaseGameLayer::createPlayer @ 0x9c3288
// > GJBaseGameLayer::createPlayer @ 0x9c3478
// > ??> @ 0x94480
//
// 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:52:56 +0000
//
__int64 __fastcall PlayerObject::updateGlowColor(PlayerObject *this)
{
__int64 v2; // x0
unsigned __int8 *v3; // x0
int v4; // w2
int v5; // w1
int v6; // w0
char *v7; // x22
char *v8; // x21
int v9; // w24
float *v10; // x20
unsigned __int64 v11; // x0
unsigned __int64 v12; // x0
int v13; // w4
float v14; // s4
float v15; // s3
float v16; // s1
float v17; // s2
__int64 v18; // x0
float v19; // s5
void (__fastcall *v20)(__int64, float *); // x2
__int64 v21; // x2
__int64 v22; // x0
__int64 v23; // x5
__int64 v24; // x0
__int64 v26; // x20
void (__fastcall *v27)(__int64, _QWORD); // x25
unsigned __int8 v28; // w0
char v29; // w0
_BYTE v30[3]; // [xsp+58h] [xbp+58h]
__int64 v31; // [xsp+60h] [xbp+60h] BYREF
float v32[4]; // [xsp+68h] [xbp+68h] BYREF
float v33[4]; // [xsp+78h] [xbp+78h] BYREF
__int64 v34; // [xsp+88h] [xbp+88h] BYREF
__int64 v35; // [xsp+90h] [xbp+90h]
v2 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 225) + 944LL))(*((_QWORD *)this + 225));
*(_WORD *)v30 = *(_WORD *)v2;
v30[2] = *(_BYTE *)(v2 + 2);
v3 = (unsigned __int8 *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 226) + 944LL))(*((_QWORD *)this + 226));
v4 = *v3;
v5 = v3[1];
v6 = v3[2];
*((_WORD *)this + 1177) = *(_WORD *)v30;
*((_BYTE *)this + 2356) = v30[2];
*((_BYTE *)this + 2357) = v4;
*((_BYTE *)this + 2358) = v5;
*((_BYTE *)this + 2359) = v6;
if ( v30[0] || *(_WORD *)&v30[1] )
{
if ( v5 | v4 || v6 )
{
v7 = (char *)this + 2602;
*((_WORD *)this + 1301) = *(_WORD *)v30;
v9 = 0;
v8 = (char *)this + 2605;
*((_BYTE *)this + 2604) = v30[2];
*((_BYTE *)this + 2605) = v4;
*((_BYTE *)this + 2606) = v5;
*((_BYTE *)this + 2607) = v6;
}
else
{
v7 = (char *)this + 2602;
v8 = (char *)this + 2605;
*((_WORD *)this + 1301) = *(_WORD *)v30;
v9 = 0;
*((_BYTE *)this + 2604) = v30[2];
*(_WORD *)((char *)this + 2605) = *(_WORD *)v30;
*((_BYTE *)this + 2607) = v30[2];
}
}
else if ( v5 | v4 || v6 )
{
*((_BYTE *)this + 2602) = v4;
v9 = 1;
*((_BYTE *)this + 2603) = v5;
v7 = (char *)this + 2602;
*((_BYTE *)this + 2604) = v6;
v8 = (char *)this + 2605;
*((_BYTE *)this + 2605) = v4;
*((_BYTE *)this + 2606) = v5;
*((_BYTE *)this + 2607) = v6;
}
else
{
v9 = 1;
*((_BYTE *)this + 2602) = -1;
v7 = (char *)this + 2602;
*((_BYTE *)this + 2603) = -1;
v8 = (char *)this + 2605;
*((_BYTE *)this + 2604) = -1;
*((_BYTE *)this + 2605) = -1;
*((_BYTE *)this + 2606) = -1;
*((_BYTE *)this + 2607) = -1;
}
v10 = v32;
v11 = GameToolbox::strongColor(*(_QWORD *)v7);
*((_BYTE *)this + 2602) = v11;
v7[1] = BYTE1(v11);
v7[2] = BYTE2(v11);
v12 = GameToolbox::strongColor(*(_QWORD *)v8);
*((_BYTE *)this + 2605) = v12;
v8[1] = BYTE1(v12);
v8[2] = BYTE2(v12);
v13 = *((unsigned __int8 *)this + 2603);
v14 = (float)*((unsigned __int8 *)this + 2602);
v15 = (float)*((unsigned __int8 *)this + 2606);
v16 = (float)*((unsigned __int8 *)this + 2605);
v17 = (float)*((unsigned __int8 *)this + 2607);
v18 = *((_QWORD *)this + 270);
v19 = (float)*((unsigned __int8 *)this + 2604) / 255.0;
v32[3] = 1.0;
v33[3] = 1.0;
v32[1] = (float)v13 / 255.0;
v32[2] = v19;
v32[0] = v14 / 255.0;
v20 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v18 + 1360LL);
v33[1] = v15 / 255.0;
v33[2] = v17 / 255.0;
v33[0] = v16 / 255.0;
v20(v18, v32);
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 280) + 1360LL))(*((_QWORD *)this + 280), v32);
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 281) + 1360LL))(*((_QWORD *)this + 281), v32);
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 274) + 1360LL))(*((_QWORD *)this + 274), v32);
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 274) + 1392LL))(*((_QWORD *)this + 274), v32);
v21 = *((_QWORD *)this + 276);
if ( !*((_BYTE *)this + 2650) )
v10 = v33;
v22 = *((_QWORD *)this + 276);
v23 = *((_QWORD *)v10 + 1);
v34 = *(_QWORD *)v10;
v35 = v23;
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v21 + 1360LL))(v22, &v34);
v24 = *((_QWORD *)this + 276);
*((float *)&v35 + 1) = *((float *)&v35 + 1) * 0.5;
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 1392LL))(v24, &v34);
if ( !*((_BYTE *)this + 2272) )
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 238) + 960LL))(*((_QWORD *)this + 238), v8);
if ( *((_BYTE *)this + 1972) || *((_BYTE *)this + 2420) )
(*(void (**)(void))(**((_QWORD **)this + 240) + 960LL))();
*((_BYTE *)this + 2041) = v9;
if ( v9 || *((_BYTE *)this + 1786) )
{
if ( !*((_BYTE *)this + 2421) && !*((_BYTE *)this + 2422) )
{
v9 = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 228) + 344LL))(*((_QWORD *)this + 228), 1);
v26 = *((_QWORD *)this + 233);
v27 = *(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v26 + 344LL);
v28 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 229) + 352LL))(*((_QWORD *)this + 229));
v27(v26, v28);
if ( *((_BYTE *)this + 2360) )
goto LABEL_16;
goto LABEL_24;
}
v9 = 1;
}
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 228) + 344LL))(*((_QWORD *)this + 228), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 233) + 344LL))(*((_QWORD *)this + 233), 0);
if ( *((_BYTE *)this + 2360) )
{
LABEL_16:
BYTE2(v31) = *((_BYTE *)this + 2363);
LOWORD(v31) = *(_WORD *)((char *)this + 2361);
goto LABEL_17;
}
LABEL_24:
v29 = v8[2];
LOWORD(v31) = *(_WORD *)v8;
BYTE2(v31) = v29;
LABEL_17:
(*(void (__fastcall **)(_QWORD, __int64 *))(**((_QWORD **)this + 228) + 960LL))(*((_QWORD *)this + 228), &v31);
(*(void (__fastcall **)(_QWORD, __int64 *))(**((_QWORD **)this + 233) + 960LL))(*((_QWORD *)this + 233), &v31);
if ( v9 )
{
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 267) + 352LL))(*((_QWORD *)this + 267)) )
GJRobotSprite::showGlow(*((GJRobotSprite **)this + 267));
else
GJRobotSprite::hideGlow(*((GJRobotSprite **)this + 267));
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 268) + 352LL))(*((_QWORD *)this + 268)) )
{
GJRobotSprite::showGlow(*((GJRobotSprite **)this + 268));
goto LABEL_20;
}
}
else
{
GJRobotSprite::hideGlow(*((GJRobotSprite **)this + 267));
}
GJRobotSprite::hideGlow(*((GJRobotSprite **)this + 268));
LABEL_20:
GJRobotSprite::updateGlowColor(*((_QWORD *)this + 267), v31, 0);
GJRobotSprite::updateGlowColor(*((_QWORD *)this + 268), v31, 0);
(*(void (**)(void))(**((_QWORD **)this + 204) + 960LL))();
return _stack_chk_guard;
}