//
// GameObject::resetObject from 0x7700bc to 0x7702fc (576 bytes)
//
// 6 xrefs:
// > EnhancedGameObject::resetObject @ 0x770314
// > ??> @ 0x46510
// > ??> @ 0x1434598
// > ??> @ 0x1435588
// > ??> @ 0x1447158
// > ??> @ 0x14593d8
//
// 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:12 +0000
//
__int64 __fastcall GameObject::resetObject(GameObject *this)
{
__int64 v2; // x2
__int64 v3; // x4
float v4; // s0
float v5; // s0
__int64 v6; // x1
float v7; // s0
double v8; // d1
double v9; // d0
float v10; // s2
double v11; // d2
__int64 v12; // x2
_QWORD v14[2]; // [xsp+30h] [xbp+30h] BYREF
v2 = 214013 * qword_155C680;
*((_BYTE *)this + 842) = 1;
v3 = _stack_chk_guard;
*((_BYTE *)this + 970) = 0;
*((_BYTE *)this + 774) = 0;
*((_BYTE *)this + 1291) = 0;
qword_155C680 = v2 + 2531011;
v14[1] = v3;
*((_WORD *)this + 502) = (int)(float)((float)((float)(((unsigned __int64)(v2 + 2531011) >> 16) & 0x7FFF) / 32767.0)
* 1900.0);
GameObject::resetGroupDisabled((__int64)this);
(*(void (__fastcall **)(GameObject *, _QWORD))(*(_QWORD *)this + 1240LL))(this, *((unsigned __int8 *)this + 996));
(*(void (__fastcall **)(GameObject *, _QWORD))(*(_QWORD *)this + 1248LL))(this, *((unsigned __int8 *)this + 997));
v4 = *((float *)this + 245);
if ( *((float *)this + 288) != v4 )
GameObject::updateCustomScaleX(this, v4);
v5 = *((float *)this + 246);
if ( *((float *)this + 289) != v5 )
GameObject::updateCustomScaleY(this, v5);
v6 = *(_QWORD *)this;
if ( *((float *)this + 243) == *((float *)this + 244) )
{
(*(void (__fastcall **)(GameObject *))(v6 + 360))(this);
}
else
{
(*(void (__fastcall **)(GameObject *))(v6 + 376))(this);
(*(void (__fastcall **)(GameObject *, float))(*(_QWORD *)this + 392LL))(this, *((float *)this + 244));
}
v7 = *((float *)this + 240);
v8 = *((double *)this + 118);
*((_WORD *)this + 504) = -1;
v9 = v7;
*((_WORD *)this + 505) = -1;
*((_BYTE *)this + 1016) = 1;
*((_DWORD *)this + 310) = -1;
v10 = *((float *)this + 241);
if ( v8 != v9 )
{
v11 = v10;
LABEL_9:
*((_BYTE *)this + 840) = 1;
*((_BYTE *)this + 864) = 1;
*((double *)this + 118) = v9;
*((_DWORD *)this + 173) = 0;
*((_DWORD *)this + 174) = 0;
*((double *)this + 119) = v11;
*((_DWORD *)this + 169) = 0;
*((_DWORD *)this + 171) = 0;
goto LABEL_10;
}
v11 = v10;
if ( *((double *)this + 119) != v11
|| *((float *)this + 169) != 0.0
|| *((float *)this + 171) != 0.0
|| *((float *)this + 173) != 0.0
|| *((float *)this + 174) != 0.0 )
{
goto LABEL_9;
}
LABEL_10:
v12 = *(_QWORD *)this;
*((_DWORD *)this + 167) = 0;
*((_DWORD *)this + 168) = 0;
*((_DWORD *)this + 170) = 0;
*((_DWORD *)this + 172) = 0;
*((_DWORD *)this + 175) = 0;
*((_DWORD *)this + 176) = 0;
*((_DWORD *)this + 233) = 0;
*((_DWORD *)this + 234) = 0;
(*(void (__fastcall **)(_QWORD *__return_ptr, GameObject *))(v12 + 1360))(v14, this);
cocos2d::CCPoint::operator=((char *)this + 1224, v14);
*(_QWORD *)((char *)this + 988) = *((_QWORD *)this + 144);
return _stack_chk_guard;
}