//
// SpriteAnimationManager::storeAnimation from 0x140086ac0 to 0x140086d78 (696 bytes)
//
// 2 xrefs:
// > SpriteAnimationManager::loadAnimations @ 0x140085cea
// > ??> @ 0x14091253c
//
// 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:25:57 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall SpriteAnimationManager::storeAnimation(
_QWORD *a1,
__int64 a2,
__int64 a3,
const char *a4,
unsigned int a5,
unsigned int a6,
__int64 a7)
{
const char *v10; // rdx
cocos2d::CCString *v11; // rax
const char *CString; // rax
size_t v13; // rdi
size_t v14; // r8
void *v15; // rcx
const char *v16; // rdx
size_t v17; // r8
__int64 v18; // rbx
struct cocos2d::CCString *v19; // rax
void *v20; // rcx
const char *v21; // rdx
__int64 v22; // rbx
struct cocos2d::CCString *v23; // rax
void *v24; // rcx
void *Block[2]; // [rsp+38h] [rbp-60h] BYREF
__int128 v26; // [rsp+48h] [rbp-50h]
cocos2d::CCDictionary::setObject(a1[49], a2, a4);
cocos2d::CCDictionary::setObject(a1[50], a3, a4);
v10 = a4;
if ( *((_QWORD *)a4 + 3) > 0xFu )
v10 = *(const char **)a4;
v11 = cocos2d::CCString::createWithFormat("%s_first", v10);
CString = cocos2d::CCString::getCString(v11);
*(_OWORD *)Block = 0;
v26 = 0;
v13 = -1;
v14 = -1;
do
++v14;
while ( CString[v14] );
sub_14003D230(Block, CString, v14);
cocos2d::CCDictionary::setObject(a1[50], a7, Block);
if ( *((_QWORD *)&v26 + 1) > 0xFu )
{
v15 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v26 + 1) + 1LL) >= 0x1000 )
{
v15 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v15 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v15);
}
v16 = a4;
if ( *((_QWORD *)a4 + 3) > 0xFu )
v16 = *(const char **)a4;
*(_OWORD *)Block = 0;
v26 = 0;
v17 = -1;
do
++v17;
while ( v16[v17] );
sub_14003D230(Block, v16, v17);
v18 = a1[42];
v19 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, a6);
cocos2d::CCDictionary::setObject(v18, v19, Block);
if ( *((_QWORD *)&v26 + 1) > 0xFu )
{
v20 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v26 + 1) + 1LL) >= 0x1000 )
{
v20 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v20 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v20);
}
v21 = a4;
if ( *((_QWORD *)a4 + 3) > 0xFu )
v21 = *(const char **)a4;
*(_OWORD *)Block = 0;
v26 = 0;
do
++v13;
while ( v21[v13] );
sub_14003D230(Block, v21, v13);
v22 = a1[41];
v23 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, a5);
cocos2d::CCDictionary::setObject(v22, v23, Block);
if ( *((_QWORD *)&v26 + 1) > 0xFu )
{
v24 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v26 + 1) + 1LL) >= 0x1000 )
{
v24 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v24 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v24);
}
sub_14003D310((__int64)a4);
}