//
// sub_14007C700 from 0x14007c700 to 0x14007c894 (404 bytes)
//
// 2 xrefs:
// > ObjectManager::loadCopiedAnimations @ 0x14007c57f
// > ??> @ 0x140911e10
//
// 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:53 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall sub_14007C700(__int64 a1, _BYTE *a2)
{
__int64 v4; // rbx
void *v5; // r8
size_t v6; // r8
__int64 v7; // rbx
void *v8; // r8
void *Block[2]; // [rsp+30h] [rbp-58h] BYREF
__m128i si128; // [rsp+40h] [rbp-48h]
void *v12[2]; // [rsp+50h] [rbp-38h] BYREF
__int128 v13; // [rsp+60h] [rbp-28h]
*(_OWORD *)Block = 0;
Block[0] = sub_14003D460(0x20u);
si128 = _mm_load_si128((const __m128i *)&xmmword_140836610);
strcpy((char *)Block[0], "GlobalAnimations");
v4 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 320), Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v5 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v5);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
*(_OWORD *)v12 = 0;
v13 = 0;
v6 = -1;
do
++v6;
while ( a2[v6] );
sub_14003D230(v12, a2, v6);
v7 = cocos2d::CCDictionary::objectForKey(v4, v12);
if ( *((_QWORD *)&v13 + 1) > 0xFu )
{
v8 = v12[0];
if ( (unsigned __int64)(*((_QWORD *)&v13 + 1) + 1LL) >= 0x1000 )
{
v8 = *((void **)v12[0] - 1);
if ( (unsigned __int64)((char *)v12[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
return v7;
}