//
// GJBigSprite::finishedLoadingSpriteAsync from 0x1002543c0 to 0x100254551 (401 bytes)
//
// 2 xrefs:
// > GJBigSprite::updateSpriteVisibility @ 0x100252b03
// > GJBigSprite::loadSpriteAsync @ 0x10025439a
//
// 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:27:25 +0000
//
void __fastcall GJBigSprite::finishedLoadingSpriteAsync(_QWORD *a1, __int64 a2)
{
__int64 v3; // r15
__int128 *v4; // rdi
__int64 v5; // rax
__int64 v6; // r14
__int64 v7; // rdi
int v8; // eax
__int64 v9; // rdi
__int64 v10; // rdi
__int64 v11; // rax
char *v12; // rsi
__int64 v13; // r15
__int64 v14; // rax
__int128 v15; // [rsp+0h] [rbp-30h] BYREF
void *__p; // [rsp+10h] [rbp-20h]
v3 = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v4 = (__int128 *)a1[43];
v5 = sub_1007FEFE0(v4, v3);
v6 = v5;
if ( *(_BYTE *)(v5 + 368) == 1 )
{
v7 = *(_QWORD *)(v5 + 344);
if ( !v7 )
goto LABEL_5;
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 64LL))(v7);
v9 = *(_QWORD *)(v6 + 344);
if ( v8 == -1 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 536LL))(v9);
*(_QWORD *)(v6 + 344) = 0;
if ( (*(_BYTE *)(v6 + 320) & 1) == 0 )
goto LABEL_6;
goto LABEL_17;
}
if ( !v9 )
{
LABEL_5:
if ( (*(_BYTE *)(v6 + 320) & 1) == 0 )
{
LABEL_6:
v10 = v6 + 321;
LABEL_18:
v13 = cocos2d::CCSprite::create_1(v10);
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v13 + 184LL))(v13, v14);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v13);
*(_QWORD *)(v6 + 344) = v13;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v13 + 160LL))(v13, 1.002);
return;
}
LABEL_17:
v10 = *(_QWORD *)(v6 + 336);
goto LABEL_18;
}
}
else
{
if ( (*(_BYTE *)(v5 + 320) & 1) != 0 )
{
v4 = &v15;
sub_10001AD30(&v15, *(const void **)(v5 + 336), *(_QWORD *)(v5 + 328));
}
else
{
__p = *(void **)(v5 + 336);
v15 = *(_OWORD *)(v5 + 320);
}
v11 = cocos2d::CCTextureCache::sharedTextureCache(v4);
if ( (v15 & 1) != 0 )
v12 = (char *)__p;
else
v12 = (char *)&v15 + 1;
cocos2d::CCTextureCache::removeTextureForKey(v11, v12);
*(_QWORD *)(a1[40] + 8 * ((unsigned __int64)(int)v3 >> 6)) &= __ROL8__(-2, v3);
if ( (v15 & 1) != 0 )
operator delete(__p);
}
}