//
// cocos2d::extension::AssetsManager::Helper::handleUpdateSucceed from 0xd0aed0 to 0xd0b05c (396 bytes)
//
// 2 xrefs:
// > cocos2d::extension::AssetsManager::Helper::update @ 0xd0b1dc
// > ??> @ 0xbabb0
//
// This function is hookable on this platform (idp: arm, 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 13:06:59 +0000
//
__int64 __fastcall cocos2d::extension::AssetsManager::Helper::handleUpdateSucceed(__int64 a1, __int64 a2)
{
__int64 v2; // x20
char *v3; // x22
__int64 v4; // x23
size_t v5; // x0
cocos2d::CCUserDefault *v6; // x0
__int64 v7; // x22
cocos2d::CCUserDefault *v8; // x0
cocos2d::CCUserDefault *v9; // x0
char *v10; // x0
cocos2d::CCUserDefault *v12; // [xsp+40h] [xbp+40h] BYREF
__int64 v13; // [xsp+48h] [xbp+48h]
char *filename; // [xsp+50h] [xbp+50h]
v2 = *(_QWORD *)(a2 + 8);
v3 = (char *)(v2 + 33);
v4 = cocos2d::CCUserDefault::sharedUserDefault(_stack_chk_guard);
if ( (*(_BYTE *)(v2 + 32) & 1) != 0 )
v3 = *(char **)(v2 + 48);
v12 = nullptr;
v13 = 0;
filename = nullptr;
v5 = strlen(v3);
std::string::__init((__int64 *)&v12, v3, v5);
cocos2d::CCUserDefault::setStringForKey(v4, "current-version-code", &v12);
v6 = (cocos2d::CCUserDefault *)(unsigned __int8)v12;
if ( ((unsigned __int8)v12 & 1) != 0 )
operator delete(filename);
v7 = cocos2d::CCUserDefault::sharedUserDefault(v6);
v12 = nullptr;
v13 = 0;
filename = nullptr;
std::string::__init((__int64 *)&v12, &byte_11B8890, 0);
cocos2d::CCUserDefault::setStringForKey(v7, "downloaded-version-code", &v12);
v8 = (cocos2d::CCUserDefault *)(unsigned __int8)v12;
if ( ((unsigned __int8)v12 & 1) != 0 )
operator delete(filename);
v9 = (cocos2d::CCUserDefault *)cocos2d::CCUserDefault::sharedUserDefault(v8);
cocos2d::CCUserDefault::flush(v9);
cocos2d::extension::AssetsManager::setSearchPath((cocos2d::extension::AssetsManager *)v2);
std::operator+("cocos2dx-update-temp-package.zip", v2 + 8, (unsigned __int64 *)&v12);
v10 = (char *)&v12 + 1;
if ( ((unsigned __int8)v12 & 1) != 0 )
v10 = filename;
remove(v10);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v2 + 160) + 16LL))(*(_QWORD *)(v2 + 160));
if ( ((unsigned __int8)v12 & 1) != 0 )
operator delete(filename);
return _stack_chk_guard;
}