//
// RingObject::powerOnObject from 0x1406439e0 to 0x140643a74 (148 bytes)
//
// 4 xrefs:
// > ??> @ 0x140823598
// > ??> @ 0x140826170
// > ??> @ 0x14082ed58
// > ??> @ 0x140931298
//
// 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:35 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall RingObject::powerOnObject(__int64 a1, int a2)
{
__int64 result; // rax
void *v4; // [rsp+30h] [rbp+8h]
result = *(unsigned __int8 *)(a1 + 760);
*(_BYTE *)(a1 + 1360) = 1;
*(_DWORD *)(a1 + 1364) = a2;
*(_BYTE *)(a1 + 760) = 1;
if ( !(_BYTE)result )
{
result = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v4 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
result = qword_14090BFD0;
}
if ( !*(_BYTE *)(result + 957) && !*(_BYTE *)(result + 738) && !*(_BYTE *)(a1 + 1052) )
return RingObject::spawnCircle(a1);
}
return result;
}