//
// GJBaseGameLayer::claimRotationAction from 0x1001253a0 to 0x100125510 (368 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processTransformActions @ 0x10012378f
// > GJBaseGameLayer::processRotationActions @ 0x1001243c7
//
// 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:24:40 +0000
//
__int64 __fastcall GJBaseGameLayer::claimRotationAction(
__int64 a1,
signed int a2,
__int64 a3,
float *a4,
float *a5,
char a6)
{
__int64 result; // rax
__int64 v7; // rdi
__int64 v8; // r10
__int64 v9; // rdi
__int64 *v10; // rax
__int64 *v11; // rdx
__int64 v12; // rsi
float v13; // xmm0_4
__int64 v14; // rsi
float v15; // xmm0_4
__int64 v16; // [rsp+8h] [rbp-8h] BYREF
result = a3 << 32;
v16 = (a3 << 32) | (unsigned int)a2;
v7 = *(_QWORD *)(a1 + 2152);
v8 = *(_QWORD *)(v7 + 1608);
if ( !v8 )
return result;
v9 = v7 + 1600;
result = v8;
while ( 1 )
{
if ( *(_DWORD *)(result + 32) > a2 )
goto LABEL_4;
if ( *(_DWORD *)(result + 32) >= a2 )
{
if ( *(_DWORD *)(result + 36) > (int)a3 )
goto LABEL_4;
if ( *(_DWORD *)(result + 36) >= (int)a3 )
break;
}
result += 8;
LABEL_4:
result = *(_QWORD *)result;
if ( !result )
return result;
}
while ( 1 )
{
while ( *(_DWORD *)(v8 + 32) > a2 )
{
LABEL_10:
v8 = *(_QWORD *)v8;
if ( !v8 )
goto LABEL_16;
}
if ( *(_DWORD *)(v8 + 32) >= a2 )
break;
LABEL_15:
v8 = *(_QWORD *)(v8 + 8);
if ( !v8 )
LABEL_16:
sub_100056820((__int64)"map::at: key not found");
}
if ( *(_DWORD *)(v8 + 36) > (int)a3 )
goto LABEL_10;
if ( *(_DWORD *)(v8 + 36) < (int)a3 )
goto LABEL_15;
v10 = *(__int64 **)(v8 + 40);
v11 = *(__int64 **)(v8 + 48);
if ( v10 != v11 )
{
if ( a6 )
{
do
{
v12 = *v10;
if ( !*(_BYTE *)(*v10 + 424) )
{
*(_BYTE *)(v12 + 424) = 1;
v13 = *(double *)(v12 + 168) - *(double *)(v12 + 280);
*a4 = *a4 + v13;
if ( !*(_BYTE *)(v12 + 184) )
*a5 = v13 + *a5;
}
++v10;
}
while ( v10 != v11 );
}
else
{
do
{
v14 = *v10;
if ( !*(_BYTE *)(*v10 + 424) )
{
*(_BYTE *)(v14 + 424) = 1;
v15 = *(double *)(v14 + 160) - *(double *)(v14 + 272);
*a4 = *a4 + v15;
if ( !*(_BYTE *)(v14 + 184) )
*a5 = v15 + *a5;
}
++v10;
}
while ( v10 != v11 );
}
}
return sub_10014E590(v9, &v16);
}