//
// GameObject::deactivateObject from 0x76d2c0 to 0x76d3bc (252 bytes)
//
// 7 xrefs:
// > EnhancedGameObject::deactivateObject @ 0x76d724
// > ??> @ 0x6fc70
// > ??> @ 0x14337c0
// > ??> @ 0x14345b0
// > ??> @ 0x14355a0
// > ??> @ 0x1447170
// > ??> @ 0x14593f0
//
// 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:11 +0000
//
_BYTE *__fastcall GameObject::deactivateObject(_BYTE *this, char a2)
{
_BYTE *v2; // x19
__int64 v3; // x2
__int64 v4; // x1
__int64 v5; // x0
if ( a2 )
{
*(this + 998) = 1;
}
else if ( !*(this + 998) )
{
*(this + 998) = 1;
return this;
}
if ( *(this + 773) )
{
v2 = this;
v3 = *(_QWORD *)this;
*(this + 773) = 0;
(*(void (__fastcall **)(_BYTE *, _QWORD))(v3 + 344))(this, 0);
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v2 + 528LL))(v2, 0);
v2[1112] = 0;
if ( *((_DWORD *)v2 + 252) != -1 )
{
v4 = *(_QWORD *)v2;
*((_WORD *)v2 + 504) = -1;
*((_WORD *)v2 + 505) = -1;
v2[1016] = 1;
(*(void (__fastcall **)(_BYTE *, float))(v4 + 1440))(v2, 1.0);
(*(void (__fastcall **)(_BYTE *, float))(*(_QWORD *)v2 + 1448LL))(v2, 1.0);
}
v5 = *((_QWORD *)v2 + 94);
if ( v5 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 528LL))(v5, 0);
this = *((_BYTE **)v2 + 111);
if ( this )
{
if ( !v2[652] )
return (_BYTE *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)this + 528LL))(this);
}
}
return this;
}