//
// sub_1800019C0 from 0x1800019c0 to 0x180001aee (302 bytes)
//
// 4 xrefs:
// > cocos2d::extension::AssetsManager::update @ 0x180001bd0
// > ??> @ 0x18002f554
// > ??> @ 0x18002f564
// > ??> @ 0x18004b084
//
// 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:15:34 +0000
//
__int64 __fastcall sub_1800019C0(cocos2d::extension::AssetsManager *this)
{
char *v1; // rdx
char *v3; // rcx
size_t v4; // r8
__int64 v5; // rbx
_QWORD *v6; // rax
void *v7; // rcx
__int64 v9; // [rsp+30h] [rbp+8h]
__int64 v10; // [rsp+30h] [rbp+8h]
v1 = (char *)this + 40;
if ( *((_QWORD *)this + 8) > 0xFu )
v1 = *((char **)this + 5);
v3 = (char *)this + 136;
if ( *((_QWORD *)this + 20) > 0xFu )
v3 = *((char **)this + 17);
v4 = *((_QWORD *)this + 19);
if ( v4 != *((_QWORD *)this + 7) || v4 && memcmp(v3, v1, v4) )
{
if ( !cocos2d::extension::AssetsManager::downLoad(this) )
goto LABEL_13;
v9 = sub_18001F040(0x10u);
*(_DWORD *)v9 = 1;
*(_QWORD *)(v9 + 8) = this;
sub_180002890(*((_QWORD *)this + 22), v9);
}
if ( cocos2d::extension::AssetsManager::uncompress(this) )
{
v10 = sub_18001F040(0x10u);
*(_DWORD *)v10 = 0;
*(_QWORD *)(v10 + 8) = this;
sub_180002890(*((_QWORD *)this + 22), v10);
}
else
{
v5 = sub_18001F040(0x10u);
*(_QWORD *)(v5 + 8) = 0;
*(_DWORD *)v5 = 3;
v6 = (_QWORD *)sub_18001F040(0x10u);
*v6 = 3;
v6[1] = this;
*(_QWORD *)(v5 + 8) = v6;
sub_180002890(*((_QWORD *)this + 22), v5);
}
LABEL_13:
v7 = *((void **)this + 23);
if ( v7 )
{
j_j_free(v7);
*((_QWORD *)this + 23) = 0;
}
return 0;
}