//
// cocos2d::extension::AssetsManager::Helper::handleUpdateSucceed from 0x7a6400 to 0x7a64d4 (212 bytes)
//
// 1 xrefs:
// > cocos2d::extension::AssetsManager::Helper::update @ 0x7a6542
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:57 +0000
//
int __fastcall cocos2d::extension::AssetsManager::Helper::handleUpdateSucceed(
cocos2d::CCUserDefault *a1,
int a2,
char *a3,
int a4)
{
int v4; // r5
int v5; // r0
const char *v6; // r7
int v7; // r8
size_t v8; // r0
cocos2d::CCUserDefault *v9; // r0
int v10; // r0
int v11; // r7
cocos2d::CCUserDefault *v12; // r0
cocos2d::CCUserDefault *v13; // r0
char *v14; // r0
cocos2d::CCUserDefault *v16; // [sp+0h] [bp-10h] BYREF
int v17; // [sp+4h] [bp-Ch]
char *filename; // [sp+8h] [bp-8h]
int v19; // [sp+Ch] [bp-4h]
v16 = a1;
v17 = a2;
filename = a3;
v19 = a4;
v4 = *(_DWORD *)(a2 + 4);
v5 = cocos2d::CCUserDefault::sharedUserDefault(a1);
if ( (*(_BYTE *)(v4 + 16) & 1) != 0 )
v6 = *(const char **)(v4 + 24);
else
v6 = (const char *)(v4 + 17);
v16 = nullptr;
v17 = 0;
filename = nullptr;
v7 = v5;
v8 = strlen(v6);
std::string::__init((int *)&v16, v6, v8);
cocos2d::CCUserDefault::setStringForKey(v7, "current-version-code", &v16);
v9 = (cocos2d::CCUserDefault *)std::string::~string((int)&v16);
v10 = cocos2d::CCUserDefault::sharedUserDefault(v9);
v16 = nullptr;
v17 = 0;
filename = nullptr;
v11 = v10;
std::string::__init((int *)&v16, &unk_B6B226, 0);
cocos2d::CCUserDefault::setStringForKey(v11, "downloaded-version-code", &v16);
v12 = (cocos2d::CCUserDefault *)std::string::~string((int)&v16);
v13 = (cocos2d::CCUserDefault *)cocos2d::CCUserDefault::sharedUserDefault(v12);
cocos2d::CCUserDefault::flush(v13);
cocos2d::extension::AssetsManager::setSearchPath((cocos2d::extension::AssetsManager *)v4);
std::operator+((unsigned int *)&v16, (unsigned __int8 *)(v4 + 4), "cocos2dx-update-temp-package.zip");
if ( ((unsigned __int8)v16 & 1) != 0 )
v14 = filename;
else
v14 = (char *)&v16 + 1;
remove(v14);
(*(void (__fastcall **)(_DWORD))(**(_DWORD **)(v4 + 80) + 8))(*(_DWORD *)(v4 + 80));
return std::string::~string((int)&v16);
}