//
// TeleportPortalObject::addToGroup from 0x140653ad0 to 0x140653b82 (178 bytes)
//
// 2 xrefs:
// > ??> @ 0x1408234b8
// > ??> @ 0x1409315ec
//
// 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 11:35:44 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall TeleportPortalObject::addToGroup(__int64 a1, unsigned int a2)
{
__int64 v4; // rax
__int64 result; // rax
unsigned int v6; // edi
__int64 v7; // rcx
void *v8; // [rsp+40h] [rbp+18h]
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v8 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
if ( *(_BYTE *)(v4 + 738) && *(_DWORD *)(a1 + 1036) == 749 )
return 0;
result = GameObject::addToGroup(a1, a2);
v6 = result;
v7 = *(_QWORD *)(a1 + 1864);
if ( v7 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1720LL))(v7, a2);
return v6;
}
return result;
}