//
// sub_D176A8 from 0xd176a8 to 0xd17704 (92 bytes)
//
// 157 xrefs:
// > GameToolbox::pointsToString @ 0x5879ec
// > MultilineBitmapFont::stringWithMaxWidth @ 0x589a8c
// > MultilineBitmapFont::stringWithMaxWidth @ 0x589b04
// > MultilineBitmapFont::stringWithMaxWidth @ 0x589b34
// > MultilineBitmapFont::stringWithMaxWidth @ 0x589d18
// > MultilineBitmapFont::readColorInfo @ 0x58a254
// > CCTextInputNode::onTextFieldDetachWithIME @ 0x5a3e5c
// > CCTextInputNode::onTextFieldDetachWithIME @ 0x5a3e70
// > CCTextInputNode::onTextFieldDetachWithIME @ 0x5a3e8c
// > CCTextInputNode::onTextFieldInsertText @ 0x5a4588
// > FMODAudioEngine::createStream @ 0x5abe4c
// > FMODAudioEngine::preloadEffectAsync @ 0x5b2254
// > FMODAudioEngine::preloadEffect @ 0x5b4ba8
// > GameObject::loadGroupsFromString @ 0x6474a0
// > GameObject::loadGroupsFromString @ 0x6474b4
// > LevelEditorLayer::breakApartTextObject @ 0x672254
// > EditorUI::createPrefab @ 0x6c070c
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x6e9724
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x6e9740
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x6e9828
// > LevelBrowserLayer::getItemsMatchingSearch @ 0x6e9840
// > GameLevelManager::getNextLevelName @ 0x6f0900
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x705430
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x70549c
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x7077ec
// > GameLevelManager::onGetMapPacksCompleted @ 0x70d4d0
// > GameLevelManager::onGetMapPacksCompleted @ 0x70d53c
// > GameLevelManager::removeDelimiterChars @ 0x71b484
// > GameLevelManager::removeDelimiterChars @ 0x71b49c
// > GameLevelManager::removeDelimiterChars @ 0x71b4d0
// > GameLevelManager::removeDelimiterChars @ 0x71b554
// > GameLevelManager::removeDelimiterChars @ 0x71b56c
// > GameLevelManager::removeDelimiterChars @ 0x71b5a0
// > GameLevelManager::uploadLevel @ 0x71c348
// > GameLevelManager::getOnlineLevels @ 0x72bf54
// > GameLevelManager::getOnlineLevels @ 0x72bf70
// > GameLevelManager::getOnlineLevels @ 0x72bfb0
// > GameLevelManager::uploadLevelList @ 0x72d4a0
// > ColorSelectPopup::hexToColor @ 0x740b04
// > ColorSelectPopup::hexToColor @ 0x740b20
// > ColorSelectPopup::hexToColor @ 0x741894
// > EditorPauseLayer::init @ 0x78b518
// > EditorPauseLayer::init @ 0x78b52c
// > EditorPauseLayer::init @ 0x78b888
// > EditorPauseLayer::init @ 0x78b89c
// > sub_8267DC @ 0x826820
// > sub_8267DC @ 0x826834
// > sub_8267DC @ 0x826850
// > SFXInfoObject::getLowerCaseName @ 0x82e1d4
// > SFXInfoObject::getLowerCaseName @ 0x82e1ec
// > MusicSearchResult::getFilesMatchingSearch @ 0x82e6d0
// > MusicSearchResult::getFilesMatchingSearch @ 0x82e6e8
// > MusicSearchResult::getFilesMatchingSearch @ 0x82e7b8
// > MusicSearchResult::getFilesMatchingSearch @ 0x82e7d0
// > SFXSearchResult::updateObjects @ 0x832364
// > SFXSearchResult::updateObjects @ 0x832378
// > SFXSearchResult::updateObjects @ 0x8326b0
// > SFXSearchResult::updateObjects @ 0x8326c8
// > SecretLayer::onSubmit @ 0x904150
// > SecretLayer::onSubmit @ 0x904168
// > SecretLayer::onSubmit @ 0x9041dc
// > SecretLayer::onSubmit @ 0x9041f8
// > SecretLayer2::onSubmit @ 0x9431ec
// > SecretLayer2::onSubmit @ 0x943208
// > SecretLayer4::onSubmit @ 0x94921c
// > SecretLayer4::onSubmit @ 0x949238
// > GJSmartTemplate::getVerySimplifiedKey @ 0x9d0b20
// > GJSmartTemplate::getVerySimplifiedKey @ 0x9d0b48
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1e48
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1e70
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1e98
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1ec0
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1ee8
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1f10
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1f38
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1f60
// > GJSmartTemplate::getSimplifiedKey @ 0x9d1f90
// > GJSmartTemplate::rotateKey @ 0x9d4bc8
// > GJSmartTemplate::rotateKey @ 0x9d4bec
// > GJSmartTemplate::rotateKey @ 0x9d4c10
// > GJSmartTemplate::rotateKey @ 0x9d4c34
// > GJSmartTemplate::rotateKey @ 0x9d4c58
// > GJSmartTemplate::rotateKey @ 0x9d4c7c
// > GJSmartTemplate::rotateKey @ 0x9d4ca0
// > GJSmartTemplate::rotateKey @ 0x9d4cc4
// > GJSmartTemplate::rotateKey @ 0x9d4cec
// > GJSmartTemplate::flipKey @ 0x9d4fd8
// > GJSmartTemplate::flipKey @ 0x9d5000
// > GJSmartTemplate::flipKey @ 0x9d5024
// > GJSmartTemplate::flipKey @ 0x9d5048
// > GJSmartTemplate::flipKey @ 0x9d506c
// > GJSmartTemplate::flipKey @ 0x9d5090
// > GJSmartTemplate::flipKey @ 0x9d50b4
// > GJSmartTemplate::flipKey @ 0x9d50d8
// > GJSmartTemplate::flipKey @ 0x9d5100
// > GJSmartTemplate::isUnrequired @ 0x9d53e4
// > GJSmartTemplate::isUnrequired @ 0x9d5410
// > GJSmartTemplate::isUnrequired @ 0x9d5434
// > GJSmartTemplate::isUnrequired @ 0x9d5460
// > GJSmartTemplate::isUnrequired @ 0x9d5484
// > GJSmartTemplate::isUnrequired @ 0x9d54a8
// > GJSmartTemplate::isUnrequired @ 0x9d54cc
// > GJSmartTemplate::isUnrequired @ 0x9d54f0
// > GJSmartBlockPreview::addPreview @ 0x9d6174
// > GJSmartBlockPreview::addTemplateGuide @ 0x9d6834
// > GJSmartBlockPreview::addTemplateGuide @ 0x9d699c
// > GJSmartBlockPreview::addTemplateGuide @ 0x9d6abc
// > GJSmartTemplate::generateRemapDict @ 0x9db4b8
// > GJSmartTemplate::generateRemapDict @ 0x9db4e4
// > GJSmartTemplate::generateRemapDict @ 0x9db510
// > GJSmartTemplate::generateRemapDict @ 0x9db540
// > GJSmartTemplate::generateRemapDict @ 0x9db56c
// > GJSmartTemplate::generateRemapDict @ 0x9db598
// > GJSmartTemplate::generateRemapDict @ 0x9db5bc
// > GJSmartTemplate::generateRemapDict @ 0x9db5e8
// > cocos2d::extension::AssetsManager::checkStoragePath @ 0xa977e0
// > cocos2d::CCFileUtils::setSearchPaths @ 0xb06554
// > cocos2d::CCFileUtils::addSearchPath @ 0xb0688c
// > cocos2d::CCFileUtils::setSearchResolutionsOrder @ 0xb09300
// > cocos2d::CCFileUtils::removeSearchPath @ 0xb098e4
// > cocos2d::CCFileUtilsAndroid::doGetFileData @ 0xb0b638
// > cocos2d::CCImage::saveToFile @ 0xb0d198
// > cocos2d::CCImage::saveToFile @ 0xb0d1b4
// > llvm::convertUTF16ToUTF8String @ 0xb1d8cc
// > llvm::convertUTF16ToUTF8String @ 0xb1d90c
// > cocos2d::ZipUtils::base64DecodeEnc @ 0xb291d0
// > cocos2d::ZipUtils::base64DecodeEnc @ 0xb29200
// > cocos2d::ZipUtils::base64EncodeEnc @ 0xb293f0
// > cocos2d::ZipUtils::base64EncodeEnc @ 0xb29420
// > cocos2d::ZipUtils::decompressString2 @ 0xb2a1bc
// > cocos2d::ZipUtils::decompressString @ 0xb2a538
// > cocos2d::ZipUtils::compressString @ 0xb2a838
// > cocos2d::CCTextFieldTTF::deleteBackward @ 0xb3085c
// > cocos2d::CCTextureCache::addImage @ 0xb350a8
// > cocos2d::CCTextureCache::addImage @ 0xb350c4
// > cocos2d::VolatileTexture::reloadAllTextures @ 0xb35bc4
// > cocos2d::VolatileTexture::reloadAllTextures @ 0xb35be0
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0xb37c10
// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0xb37c2c
// > DS_Dictionary::cleanStringWhiteSpace @ 0xb48644
// > DS_Dictionary::cleanStringWhiteSpace @ 0xb48658
// > DS_Dictionary::cleanStringWhiteSpace @ 0xb486c8
// > sub_B4CEA4 @ 0xb4cf50
// > sub_CDE33C @ 0xcde47c
// > sub_CDE33C @ 0xcde4b0
// > sub_CDE8E0 @ 0xcdea20
// > sub_CDE8E0 @ 0xcdea54
// > sub_CDEE84 @ 0xcdef4c
// > sub_CE2BCC @ 0xce31bc
// > sub_CE2BCC @ 0xce31dc
// > sub_CE3958 @ 0xce3f48
// > sub_CE3958 @ 0xce3f68
// > sub_CE4804 @ 0xce4918
// > sub_D04EC0 @ 0xd054e8
// > sub_D04EC0 @ 0xd05508
// > sub_D05C8C @ 0xd062b4
// > sub_D05C8C @ 0xd062d4
//
// 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_D176A8(int **result)
{
int *v1; // x1
int **v2; // x19
v1 = *result;
if ( *result - 6 != (int *)&qword_124B6B0 )
{
if ( *(v1 - 2) > 0 )
{
v2 = result;
sub_D174B8(result, 0, 0, 0);
v1 = *v2;
}
*(v1 - 2) = -1;
return (int **)0xFFFFFFFFLL;
}
return result;
}