//
// GameObject::deactivateObject from 0x10067b9d0 to 0x10067bac5 (245 bytes)
//
// 5 xrefs:
// > ??> @ 0x100acb440
// > ??> @ 0x100b2bd68
// > ??> @ 0x100b3d800
// > ??> @ 0x100b84390
// > ??> @ 0x100b853a8
//
// This function is hookable on this platform (idp: pc, 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:35:03 +0000
//
__int64 __fastcall GameObject::deactivateObject(__int64 a1, int a2)
{
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // rdi
if ( a2 )
{
*(_BYTE *)(a1 + 998) = 1;
}
else if ( (*(_BYTE *)(a1 + 998) & 1) == 0 )
{
*(_BYTE *)(a1 + 998) = 1;
return result;
}
if ( *(_BYTE *)(a1 + 773) == 1 )
{
*(_BYTE *)(a1 + 773) = 0;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 344LL))(a1, 0);
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 528LL))(a1, 0);
*(_BYTE *)(a1 + 1112) = 0;
if ( *(_WORD *)(a1 + 1008) != 0xFFFF || *(_WORD *)(a1 + 1010) != 0xFFFF )
{
*(_DWORD *)(a1 + 1008) = -1;
*(_BYTE *)(a1 + 1016) = 1;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)a1 + 1440LL))(a1, 1.0);
result = (*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)a1 + 1448LL))(a1, 1.0);
}
v4 = *(_QWORD *)(a1 + 752);
if ( v4 )
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 528LL))(v4, 0);
v5 = *(_QWORD *)(a1 + 888);
if ( v5 )
{
if ( !*(_BYTE *)(a1 + 652) )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 528LL))(v5, 0);
}
}
return result;
}