//
// cocos2d::extension::AssetsManager::setSearchPath from 0xd0aad0 to 0xd0ac8c (444 bytes)
//
// 3 xrefs:
// > cocos2d::extension::AssetsManager::checkUpdate @ 0xd0ae28
// > cocos2d::extension::AssetsManager::Helper::handleUpdateSucceed @ 0xd0afa4
// > ??> @ 0xee150
//
// 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::setSearchPath(cocos2d::extension::AssetsManager *this)
{
__int64 v2; // x0
_QWORD *v3; // x22
__int64 *v4; // x1
signed __int64 v5; // x19
unsigned __int64 v6; // x0
__int64 *v7; // x0
__int64 v8; // x0
void **v9; // x19
void **v10; // x0
void **v12; // x0
_QWORD *v13; // x19
_QWORD *v14; // x22
void *v15; // [xsp+30h] [xbp+30h] BYREF
void **v16; // [xsp+38h] [xbp+38h]
char *v17; // [xsp+40h] [xbp+40h]
v2 = cocos2d::CCFileUtils::sharedFileUtils(_stack_chk_guard);
v3 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 136LL))(v2);
v16 = nullptr;
v17 = nullptr;
v4 = nullptr;
v15 = nullptr;
v5 = v3[1] - *v3;
v6 = 0xAAAAAAAAAAAAAAABLL * (v5 >> 3);
if ( v6 )
{
if ( v6 > 0xAAAAAAAAAAAAAAALL )
sub_631A18();
v12 = (void **)operator new(v5);
v16 = v12;
v15 = v12;
v17 = (char *)v12 + v5;
v13 = (_QWORD *)*v3;
v14 = (_QWORD *)v3[1];
if ( v13 == v14 )
{
v4 = (__int64 *)v12;
}
else
{
do
{
if ( v12 )
{
std::string::basic_string((unsigned __int64)v12, v13);
v12 = v16;
}
v13 += 3;
v12 += 3;
v16 = v12;
}
while ( v14 != v13 );
v4 = (__int64 *)v15;
}
}
v7 = std::vector::insert((unsigned __int64 *)&v15, v4, (__int64 *)this + 1);
v8 = cocos2d::CCFileUtils::sharedFileUtils((cocos2d::CCFileUtils *)v7);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v8 + 112LL))(v8, &v15);
v9 = (void **)v15;
if ( v15 )
{
v10 = v16;
if ( v15 != v16 )
{
do
{
v16 = v10 - 3;
if ( (*(_BYTE *)(v10 - 3) & 1) != 0 )
operator delete(*(v10 - 1));
v10 = v16;
}
while ( v9 != v16 );
v10 = (void **)v15;
}
operator delete(v10);
}
return _stack_chk_guard;
}