//
// sub_18000CEF0 from 0x18000cef0 to 0x18000cfa8 (184 bytes)
//
// 132 xrefs:
// > cocos2d::CCRectFromString @ 0x18000d499
// > sub_18000E450 @ 0x18000e4ae
// > DS_Dictionary::addBoolValuesToMapForKey @ 0x180018971
// > DS_Dictionary::addBoolValuesToMapForKeySpecial @ 0x180018b13
// > DS_Dictionary::getAllKeys @ 0x180019791
// > DS_Dictionary::getDictForKey @ 0x180019fdd
// > DS_Dictionary::getDictForKey @ 0x18001a059
// > DS_Dictionary::getKey @ 0x18001a765
// > DS_Dictionary::getObjectForKey @ 0x18001aa8d
// > DS_Dictionary::getRectForKey @ 0x18001ade7
// > sub_18001AE70 @ 0x18001aecb
// > sub_18001AE70 @ 0x18001aef8
// > sub_18001AE70 @ 0x18001af1f
// > DS_Dictionary::getStringArrayForKey @ 0x18001b232
// > DS_Dictionary::getStringForKey @ 0x18001b638
// > DS_Dictionary::setDictForKey @ 0x18001eeac
// > DS_Dictionary::setObjectForKey @ 0x18001f55e
// > fmt::BasicWriter::str @ 0x1800218d3
// > fmt::FormatInt::str @ 0x180021a37
// > fmt::internal::UTF16ToUTF8::str @ 0x180021a77
// > cocos2d::CCLabelAtlas::initWithString @ 0x1800475f5
// > cocos2d::FNTConfigLoadFile @ 0x180048d0e
// > cocos2d::FNTConfigLoadFile @ 0x180048dbf
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x18004b00c
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x18004b0fe
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004ba4f
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004c1f5
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004c2af
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004c33f
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004c932
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069514
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069575
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800695d6
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069637
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006970a
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800697df
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069840
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800698a1
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069902
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069963
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800699c4
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069a25
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069a86
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069ae7
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069c43
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069ca4
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069d76
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180069e4a
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a055
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a0b6
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a117
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a178
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a1d9
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a23a
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a2ab
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a30c
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a36a
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a3c0
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a41e
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a46d
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a4ce
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a558
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a597
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a657
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a6e1
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a72b
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a7a2
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006a88a
// > cocos2d::CCParticleSystem::initWithFile @ 0x18006ab64
// > cocos2d::CCParticleSystem::initWithFile @ 0x18006ac36
// > cocos2d::CCFileUtils::addSearchPath @ 0x18006f8fa
// > cocos2d::CCFileUtils::addSearchResolutionsOrder @ 0x18006fbd3
// > sub_180070370 @ 0x18007040a
// > sub_180070370 @ 0x18007063c
// > sub_180070370 @ 0x18007077b
// > sub_180070370 @ 0x180070920
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180070abb
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180070ae3
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180070b0a
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180070b98
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180070bbd
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180071278
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18007133d
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18007167f
// > cocos2d::CCFileUtils::fullPathFromRelativeFile @ 0x1800717ae
// > cocos2d::CCFileUtils::getNewFilename @ 0x1800722e9
// > cocos2d::CCFileUtils::getNewFilename @ 0x1800723bc
// > cocos2d::CCFileUtils::removeFullPath @ 0x180072eb1
// > cocos2d::CCFileUtils::removeSearchPath @ 0x1800730bb
// > sub_180073B90 @ 0x180073be2
// > sub_180073B90 @ 0x180073d4e
// > sub_180073B90 @ 0x18007408b
// > sub_180074280 @ 0x180074303
// > cocos2d::CCFileUtilsWin32::getWritablePath2 @ 0x18007d573
// > cocos2d::CCFileUtilsWin32::utf8Togbk @ 0x18007e411
// > cocos2d::CCImage::saveToFile @ 0x180080428
// > sub_180080A90 @ 0x180080aef
// > sub_180080A90 @ 0x180080e1a
// > sub_180089670 @ 0x18008969e
// > cocos2d::CCTMXMapInfo::endElement @ 0x1800b2a45
// > cocos2d::CCTMXMapInfo::endElement @ 0x1800b2b00
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b37e6
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b388d
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b38c0
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b3d04
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b3d49
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b3fd2
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b4059
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b467b
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b4704
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b4b95
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b4bda
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b4ea3
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b5174
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b528c
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b52d3
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b53df
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b54da
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b5589
// > sub_1800B5B60 @ 0x1800b5ba0
// > cocos2d::CCTMXMapInfo::textHandler @ 0x1800b5c14
// > cocos2d::CCTMXMapInfo::textHandler @ 0x1800b5d62
// > sub_1800B5E70 @ 0x1800b5ed3
// > cocos2d::CCTextFieldTTF::deleteBackward @ 0x1800b90d5
// > cocos2d::CCTextFieldTTF::initWithPlaceHolder @ 0x1800b93e2
// > cocos2d::CCTextFieldTTF::initWithPlaceHolder @ 0x1800b94c3
// > cocos2d::CCTextFieldTTF::insertText @ 0x1800b9571
// > cocos2d::CCTextFieldTTF::setPlaceHolder @ 0x1800b9abf
// > cocos2d::CCTextFieldTTF::setString @ 0x1800b9c2c
// > ??> @ 0x18013ae8c
// > ??> @ 0x18013ae9c
// > ??> @ 0x1801b7edc
//
// This function is hookable on this platform (idp: pc, 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 11:21:20 +0000
//
void *__fastcall sub_18000CEF0(_QWORD *a1, const void *a2, size_t a3)
{
__int64 v3; // rbp
void *result; // rax
_BYTE *v8; // rax
_BYTE *v9; // rbx
v3 = 0x7FFFFFFFFFFFFFFFLL;
if ( a3 > 0x7FFFFFFFFFFFFFFFLL )
std::vector::_Xlen();
if ( a3 > 0xF )
{
if ( (a3 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v3 = a3 | 0xF;
if ( (a3 | 0xF) < 0x16 )
v3 = 22;
}
v8 = (_BYTE *)sub_18000CE80(v3 + 1);
*a1 = v8;
a1[2] = a3;
a1[3] = v3;
v9 = v8;
result = memcpy(v8, a2, a3);
v9[a3] = 0;
}
else
{
a1[2] = a3;
a1[3] = 15;
result = memcpy(a1, a2, a3);
*((_BYTE *)a1 + a3) = 0;
}
return result;
}