//
// GJEffectManager::registerRotationCommand from 0x140369920 to 0x1403699e7 (199 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::processDynamicObjectActions @ 0x140337012
// > GJEffectManager::prepareMoveActions @ 0x140369f33
// > GJEffectManager::prepareMoveActions @ 0x14036a93c
// > ??> @ 0x140921818
//
// 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:30:56 +0000
//
__int64 __fastcall GJEffectManager::registerRotationCommand(__int64 a1, __int64 a2, char a3)
{
int v3; // r10d
int v5; // r9d
__int64 *v6; // r8
__int64 *v7; // rdx
char v8; // cl
__int64 *v9; // rax
_QWORD *v10; // rax
const void **v11; // rax
int v13; // [rsp+30h] [rbp+8h] BYREF
int v14; // [rsp+34h] [rbp+Ch]
__int64 v15; // [rsp+38h] [rbp+10h] BYREF
v15 = a2;
v3 = *(_DWORD *)(a2 + 44);
v5 = *(_DWORD *)(a2 + 40);
v13 = v5;
v14 = v3;
if ( a3 )
{
v6 = *(__int64 **)(a1 + 2040);
v7 = (__int64 *)v6[1];
if ( !*((_BYTE *)v7 + 25) )
{
do
{
if ( *((_DWORD *)v7 + 8) < v5 || *((_DWORD *)v7 + 8) <= v5 && *((_DWORD *)v7 + 9) < v3 )
{
v8 = 1;
}
else
{
v8 = 0;
v6 = v7;
}
v9 = v7 + 2;
if ( !v8 )
v9 = v7;
v7 = (__int64 *)*v9;
}
while ( !*(_BYTE *)(*v9 + 25) );
}
if ( !*((_BYTE *)v6 + 25) && v5 >= *((_DWORD *)v6 + 8) && (v5 > *((_DWORD *)v6 + 8) || v3 >= *((_DWORD *)v6 + 9)) )
{
v10 = (_QWORD *)sub_140354DF0(a1 + 2040, &v13);
if ( *v10 != v10[1] )
v10[1] = *v10;
}
}
v11 = (const void **)sub_140354DF0(a1 + 2040, &v13);
sub_1400BD3C0(v11, &v15);
return sub_1400BD3C0((const void **)(a1 + 1640), &v15);
}