//
// EnhancedGameObject::deactivateObject from 0x1006a0ed0 to 0x1006a1001 (305 bytes)
//
// 43 xrefs:
// > ParticleGameObject::deactivateObject @ 0x100193172
// > AnimatedGameObject::deactivateObject @ 0x100197956
// > ??> @ 0x100ac8410
// > ??> @ 0x100ac8c18
// > ??> @ 0x100ac9420
// > ??> @ 0x100ac9c28
// > ??> @ 0x100aca430
// > ??> @ 0x100acac38
// > ??> @ 0x100acc458
// > ??> @ 0x100accce0
// > ??> @ 0x100acd500
// > ??> @ 0x100acdd20
// > ??> @ 0x100ace540
// > ??> @ 0x100aced60
// > ??> @ 0x100acf580
// > ??> @ 0x100acfda0
// > ??> @ 0x100ad05c0
// > ??> @ 0x100ad0de0
// > ??> @ 0x100ad1600
// > ??> @ 0x100ad1e38
// > ??> @ 0x100ad26a0
// > ??> @ 0x100ad2ed8
// > ??> @ 0x100ad3710
// > ??> @ 0x100ad3f48
// > ??> @ 0x100ad4780
// > ??> @ 0x100ad4fa0
// > ??> @ 0x100ad57c0
// > ??> @ 0x100ad5fe0
// > ??> @ 0x100ad6800
// > ??> @ 0x100ad7020
// > ??> @ 0x100ad7840
// > ??> @ 0x100ad8060
// > ??> @ 0x100ad8880
// > ??> @ 0x100ad90a0
// > ??> @ 0x100ad98c0
// > ??> @ 0x100ada0e0
// > ??> @ 0x100ada900
// > ??> @ 0x100adb120
// > ??> @ 0x100adb940
// > ??> @ 0x100adc160
// > ??> @ 0x100adc980
// > ??> @ 0x100add1a0
// > ??> @ 0x100b84b88
//
// 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:17 +0000
//
__int64 __fastcall EnhancedGameObject::deactivateObject(__int64 a1, int a2)
{
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // rdi
result = *(unsigned __int8 *)(a1 + 773);
if ( a2 )
{
*(_BYTE *)(a1 + 998) = 1;
}
else if ( (*(_BYTE *)(a1 + 998) & 1) == 0 )
{
*(_BYTE *)(a1 + 998) = 1;
if ( !(_BYTE)result )
return result;
goto LABEL_14;
}
if ( !(_BYTE)result )
return result;
*(_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 && !*(_BYTE *)(a1 + 652) )
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 528LL))(v5, 0);
LABEL_14:
if ( !*(_BYTE *)(a1 + 773) && *(_BYTE *)(a1 + 1417) == 1 && *(_BYTE *)(a1 + 1386) == 1 )
{
(*(void (__fastcall **)(__int64, __int64, double))(*(_QWORD *)a1 + 1848LL))(a1, 0xFFFFFFFFLL, 0.0);
return EnhancedGameObject::waitForAnimationTrigger(a1);
}
return result;
}