//
// cocos2d::extension::AssetsManager::update from 0x180001af0 to 0x180001c07 (279 bytes)
//
// 5 xrefs:
// > ??> @ 0x1800259e8
// > ??> @ 0x18002f588
// > ??> @ 0x18002f5bc
// > ??> @ 0x180032408
// > ??> @ 0x18004b0a8
//
// 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
//
void __fastcall cocos2d::extension::AssetsManager::update(cocos2d::extension::AssetsManager *this)
{
char *v2; // rsi
unsigned __int64 v3; // rcx
char *v4; // rbx
__int64 v5; // rax
__int64 v6; // rax
__int64 StringForKey; // rax
_OWORD *v8; // rax
_BYTE v9[32]; // [rsp+20h] [rbp-38h] BYREF
if ( !*((_QWORD *)this + 23) && *((_QWORD *)this + 15) && *((_QWORD *)this + 11) )
{
v2 = (char *)this + 72;
if ( *((_QWORD *)this + 12) > 0xFu )
v2 = *((char **)this + 9);
v3 = *((_QWORD *)this + 11);
if ( v3 >= 4 )
{
v4 = &v2[v3];
v5 = sub_18001F000(v2, &v2[v3], ".zip", 4);
if ( (char *)v5 != v4 && v5 - (_QWORD)v2 != -1 )
{
if ( (*(unsigned __int8 (__fastcall **)(cocos2d::extension::AssetsManager *))(*(_QWORD *)this + 8LL))(this) )
{
v6 = cocos2d::CCUserDefault::sharedUserDefault();
StringForKey = cocos2d::CCUserDefault::getStringForKey(v6, v9, "downloaded-version-code");
sub_180003300((char *)this + 136, StringForKey);
sub_180003700(v9);
v8 = (_OWORD *)sub_18001F040(0x10u);
*v8 = 0;
*((_QWORD *)this + 23) = v8;
pthread_create(v8, 0, sub_1800019C0, this);
}
}
}
}
}