//
// SpriteAnimationManager::callAnimationFinished from 0x1008030d0 to 0x1008031b8 (232 bytes)
//
// 1 xrefs:
// > SpriteAnimationManager::animationFinished @ 0x100801e5f
//
// 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:36:38 +0000
//
void __fastcall SpriteAnimationManager::callAnimationFinished(__int64 a1)
{
__int128 *v2; // r14
unsigned int v3; // eax
unsigned __int64 v4; // rax
const void *v5; // rdi
size_t v6; // rdx
__int64 v7; // rdi
char *v8; // rsi
_QWORD __s2[2]; // [rsp+9h] [rbp-47h] BYREF
__int128 v10; // [rsp+20h] [rbp-30h] BYREF
void *__p; // [rsp+30h] [rbp-20h]
v2 = (__int128 *)(a1 + 400);
strcpy((char *)__s2, "not_used");
v3 = *(unsigned __int8 *)(a1 + 400);
if ( (v3 & 1) != 0 )
{
v4 = *(_QWORD *)(a1 + 408);
v5 = *(const void **)(a1 + 416);
}
else
{
v4 = v3 >> 1;
v5 = (const void *)(a1 + 401);
}
v6 = 8;
if ( v4 < 8 )
v6 = v4;
if ( ((v4 == 8) & (memcmp(v5, __s2, v6) == 0)) != 0 )
v2 = (__int128 *)(a1 + 424);
if ( (*(_BYTE *)v2 & 1) != 0 )
{
sub_10001AD30(&v10, *((const void **)v2 + 2), *((_QWORD *)v2 + 1));
v7 = *(_QWORD *)(a1 + 320);
if ( (v10 & 1) == 0 )
goto LABEL_10;
}
else
{
__p = *((void **)v2 + 2);
v10 = *v2;
v7 = *(_QWORD *)(a1 + 320);
if ( (v10 & 1) == 0 )
{
LABEL_10:
v8 = (char *)&v10 + 1;
goto LABEL_13;
}
}
v8 = (char *)__p;
LABEL_13:
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v7 + 1240LL))(v7, v8);
if ( (v10 & 1) != 0 )
operator delete(__p);
}