//
// sub_775170 from 0x775170 to 0x7751a2 (50 bytes)
//
// 53 xrefs:
// > GameToolbox::pointsToString @ 0x2efeae
// > FMODAudioEngine::createStream @ 0x2ff2da
// > FMODAudioEngine::preloadEffectAsync @ 0x30481c
// > FMODAudioEngine::preloadEffect @ 0x304cc0
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x3bb7d8
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x3bb7e0
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x3bb87e
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x3bb888
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x3c66fe
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x3c7536
// > GameLevelManager::onGetMapPacksCompleted @ 0x3ca01e
// > GameLevelManager::uploadLevel @ 0x3cf8c4
// > GameLevelManager::uploadLevelList @ 0x3d5004
// > ColorSelectPopup::hexToColor @ 0x3dcdba
// > ColorSelectPopup::hexToColor @ 0x3dcdc2
// > ColorSelectPopup::hexToColor @ 0x3dcf2c
// > SFXInfoObject::getLowerCaseName @ 0x458f9c
// > SFXInfoObject::getLowerCaseName @ 0x458fa4
// > MusicSearchResult::getFilesMatchingSearch @ 0x45919e
// > MusicSearchResult::getFilesMatchingSearch @ 0x4591a6
// > MusicSearchResult::getFilesMatchingSearch @ 0x45922a
// > MusicSearchResult::getFilesMatchingSearch @ 0x459234
// > SFXSearchResult::updateObjects @ 0x45d95a
// > SFXSearchResult::updateObjects @ 0x45d964
// > SecretLayer::onSubmit @ 0x4ca83e
// > SecretLayer::onSubmit @ 0x4ca846
// > SecretLayer::onSubmit @ 0x4ca878
// > SecretLayer::onSubmit @ 0x4ca880
// > SecretLayer2::onSubmit @ 0x4ed3be
// > SecretLayer2::onSubmit @ 0x4ed3c6
// > SecretLayer4::onSubmit @ 0x4f1120
// > SecretLayer4::onSubmit @ 0x4f1128
// > GJSmartTemplate::getVerySimplifiedKey @ 0x53996e
// > cocos2d::extension::AssetsManager::checkStoragePath @ 0x59fd44
// > cocos2d::CCFileUtils::removeSearchPath @ 0x5dee7e
// > cocos2d::CCFileUtils::setSearchPaths @ 0x5dffa6
// > cocos2d::CCFileUtils::addSearchPath @ 0x5e0082
// > cocos2d::CCFileUtils::setSearchResolutionsOrder @ 0x5e0186
// > cocos2d::CCFileUtilsAndroid::doGetFileData @ 0x5e165c
// > cocos2d::CCImage::saveToFile @ 0x5e2424
// > cocos2d::CCImage::saveToFile @ 0x5e242e
// > llvm::convertUTF16ToUTF8String @ 0x5ea7fe
// > llvm::convertUTF16ToUTF8String @ 0x5ea826
// > cocos2d::ZipUtils::encryptDecrypt @ 0x5ef724
// > cocos2d::ZipUtils::encryptDecryptWKey @ 0x5ef76e
// > cocos2d::ZipUtils::encryptDecryptWKey @ 0x5ef788
// > cocos2d::CCTextureCache::addImage @ 0x5f53dc
// > cocos2d::CCTextureCache::addImage @ 0x5f53e6
// > cocos2d::VolatileTexture::reloadAllTextures @ 0x5f5858
// > cocos2d::VolatileTexture::reloadAllTextures @ 0x5f5860
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x5f69e0
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x5f69ea
// > sub_602140 @ 0x60216a
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int *__fastcall sub_775170(int *result)
{
int v1; // r3
int v2; // r4
int *v3; // r4
v1 = *result;
v2 = *(_DWORD *)(*result - 4);
if ( v2 >= 0 && (int *)(v1 - 12) != &dword_ACDD9C )
{
if ( v2 )
{
v3 = result;
result = sub_77500C(result, 0, nullptr, nullptr);
v1 = *v3;
}
*(_DWORD *)(v1 - 4) = -1;
}
return result;
}