//
// sub_18000CE60 from 0x18000ce60 to 0x18000cf6f (271 bytes)
//
// 183 xrefs:
// > cocos2d::CCRectFromString @ 0x18000d581
// > cocos2d::CCRectFromString @ 0x18000d6a9
// > cocos2d::CCRectFromString @ 0x18000d7f6
// > cocos2d::CCRectFromString @ 0x18000d847
// > sub_18000E0B0 @ 0x18000e208
// > sub_18000E0B0 @ 0x18000e2f7
// > sub_18000E400 @ 0x18000e462
// > sub_18000E400 @ 0x18000e5a5
// > DS_Dictionary::addBoolValuesToMapForKey @ 0x180018c85
// > DS_Dictionary::addBoolValuesToMapForKeySpecial @ 0x180018e11
// > DS_Dictionary::getAllKeys @ 0x180019c47
// > DS_Dictionary::getDictForKey @ 0x18001a242
// > DS_Dictionary::getDictForKey @ 0x18001a2d1
// > DS_Dictionary::getKey @ 0x18001a9af
// > DS_Dictionary::getObjectForKey @ 0x18001ad11
// > DS_Dictionary::getRectForKey @ 0x18001b032
// > sub_18001B0B0 @ 0x18001b10b
// > sub_18001B0B0 @ 0x18001b142
// > sub_18001B0B0 @ 0x18001b174
// > DS_Dictionary::getStringArrayForKey @ 0x18001b4d1
// > DS_Dictionary::getStringForKey @ 0x18001b71f
// > DS_Dictionary::rectFromString @ 0x18001ca23
// > DS_Dictionary::rectFromString @ 0x18001cb3b
// > DS_Dictionary::rectFromString @ 0x18001cb8a
// > DS_Dictionary::setDictForKey @ 0x18001ed22
// > DS_Dictionary::setObjectForKey @ 0x18001f3b1
// > DS_Dictionary::split @ 0x180020dea
// > DS_Dictionary::split @ 0x180020ed0
// > DS_Dictionary::splitWithForm @ 0x18002108e
// > fmt::BasicWriter::str @ 0x180021463
// > fmt::FormatInt::str @ 0x1800215d7
// > fmt::internal::UTF16ToUTF8::str @ 0x180021616
// > cocos2d::CCLabelAtlas::initWithString @ 0x180045ec9
// > cocos2d::FNTConfigLoadFile @ 0x180047812
// > cocos2d::FNTConfigLoadFile @ 0x1800478b4
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x18004904d
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x180049166
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x1800492df
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x18004946a
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x1800495e0
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x180049760
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x1800498e0
// > cocos2d::CCBMFontConfiguration::parseCharacterDefinition @ 0x180049a60
// > cocos2d::CCBMFontConfiguration::parseCommonArguments @ 0x180049ce8
// > cocos2d::CCBMFontConfiguration::parseCommonArguments @ 0x180049e15
// > cocos2d::CCBMFontConfiguration::parseCommonArguments @ 0x180049f95
// > cocos2d::CCBMFontConfiguration::parseCommonArguments @ 0x18004a13e
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004a3d6
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004a467
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004a4ff
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004a6c9
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004a86d
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004aa11
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004aad5
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004ab83
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x18004b0ba
// > cocos2d::CCBMFontConfiguration::parseImageFileName @ 0x18004b379
// > cocos2d::CCBMFontConfiguration::parseImageFileName @ 0x18004b444
// > cocos2d::CCBMFontConfiguration::parseInfoArguments @ 0x18004b6ed
// > cocos2d::CCBMFontConfiguration::parseKerningEntry @ 0x18004b949
// > cocos2d::CCBMFontConfiguration::parseKerningEntry @ 0x18004ba70
// > cocos2d::CCBMFontConfiguration::parseKerningEntry @ 0x18004bbf0
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067274
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800672f5
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067376
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800673f7
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067513
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006763c
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006769d
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800676fe
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006775f
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800677c0
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067821
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067882
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800678e3
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067944
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067ab6
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067b17
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067bec
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067cc3
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067e09
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067e6a
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067ecb
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067f2c
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067f8d
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180067fee
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006804f
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800680b0
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x18006811f
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068180
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800681de
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068234
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068292
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800682e1
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068342
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800683cc
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068411
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800684c5
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068553
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800685a2
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068622
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x180068759
// > cocos2d::CCParticleSystem::initWithFile @ 0x180068a20
// > cocos2d::CCParticleSystem::initWithFile @ 0x180068ada
// > cocos2d::CCFileUtils::addSearchPath @ 0x18006d70e
// > cocos2d::CCFileUtils::addSearchResolutionsOrder @ 0x18006da5f
// > sub_18006E2F0 @ 0x18006e390
// > sub_18006E2F0 @ 0x18006e557
// > sub_18006E2F0 @ 0x18006e661
// > sub_18006E2F0 @ 0x18006e7b0
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006ea32
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006ea60
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006ea91
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006eb13
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006ebb1
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006f33e
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006f42e
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x18006f609
// > cocos2d::CCFileUtils::fullPathFromRelativeFile @ 0x18006f762
// > cocos2d::CCFileUtils::fullPathFromRelativeFile @ 0x18006f854
// > cocos2d::CCFileUtils::getNewFilename @ 0x180070241
// > cocos2d::CCFileUtils::getNewFilename @ 0x180070304
// > cocos2d::CCFileUtils::getPathForFilename @ 0x1800703f0
// > cocos2d::CCFileUtils::getPathForFilename @ 0x180070448
// > cocos2d::CCFileUtils::removeFullPath @ 0x180070b80
// > cocos2d::CCFileUtils::removeSearchPath @ 0x180070d4e
// > sub_1800719C0 @ 0x180071a20
// > sub_1800719C0 @ 0x180071b60
// > sub_1800719C0 @ 0x180071e20
// > sub_180071FE0 @ 0x180072062
// > sub_180071FE0 @ 0x1800720a5
// > cocos2d::CCFileUtilsWin32::getWritablePath2 @ 0x18007a591
// > cocos2d::CCFileUtilsWin32::getWritablePath2 @ 0x18007a618
// > cocos2d::CCFileUtilsWin32::getWritablePath @ 0x18007a7b5
// > cocos2d::CCFileUtilsWin32::getWritablePath @ 0x18007a8aa
// > cocos2d::CCFileUtilsWin32::getWritablePath @ 0x18007aa03
// > cocos2d::CCFileUtilsWin32::getWritablePath @ 0x18007aa8d
// > cocos2d::CCFileUtilsWin32::utf8Togbk @ 0x18007b203
// > cocos2d::CCImage::saveToFile @ 0x18007d1c1
// > sub_18007D8A0 @ 0x18007d901
// > sub_18007D8A0 @ 0x18007dc9a
// > sub_1800864F0 @ 0x18008651e
// > cocos2d::ZipUtils::urlDecode @ 0x1800a47a2
// > cocos2d::CCTMXMapInfo::endElement @ 0x1800af290
// > cocos2d::CCTMXMapInfo::endElement @ 0x1800af330
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800afeb8
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800aff59
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800aff91
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b0284
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b02d6
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b0543
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b0727
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b0cb6
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b0d38
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1028
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1283
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b12c6
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1523
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1814
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1859
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1944
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1989
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1a96
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1b8c
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1c56
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1d36
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b20fd
// > sub_1800B2260 @ 0x1800b22a0
// > cocos2d::CCTMXMapInfo::textHandler @ 0x1800b2320
// > cocos2d::CCTMXMapInfo::textHandler @ 0x1800b2353
// > cocos2d::CCTMXMapInfo::textHandler @ 0x1800b23de
// > sub_1800B2520 @ 0x1800b2586
// > cocos2d::CCTextFieldTTF::deleteBackward @ 0x1800b53c4
// > cocos2d::CCTextFieldTTF::deleteBackward @ 0x1800b54ad
// > cocos2d::CCTextFieldTTF::initWithPlaceHolder @ 0x1800b5766
// > cocos2d::CCTextFieldTTF::initWithPlaceHolder @ 0x1800b5890
// > cocos2d::CCTextFieldTTF::insertText @ 0x1800b594a
// > cocos2d::CCTextFieldTTF::setPlaceHolder @ 0x1800b5e72
// > cocos2d::CCTextFieldTTF::setString @ 0x1800b6030
// > ??> @ 0x180131ff0
// > ??> @ 0x180132000
// > ??> @ 0x180132014
// > ??> @ 0x1801ade7c
//
// 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
//
void *__fastcall sub_18000CE60(_QWORD *a1, const void *a2, size_t a3)
{
__int64 v3; // rdi
void *result; // rax
size_t v8; // rax
void *v9; // rax
_QWORD *v10; // rsi
v3 = 0x7FFFFFFFFFFFFFFFLL;
if ( a3 > 0x7FFFFFFFFFFFFFFFLL )
std::vector::_Xlen();
a1[3] = 15;
if ( a3 <= 0xF )
{
a1[2] = a3;
result = memcpy(a1, a2, a3);
*((_BYTE *)a1 + a3) = 0;
return result;
}
if ( (a3 | 0xF) > 0x7FFFFFFFFFFFFFFFLL )
{
v8 = 0x8000000000000027uLL;
LABEL_6:
v9 = operator new(v8);
if ( !v9 )
invalid_parameter_noinfo_noreturn();
v10 = (_QWORD *)(((unsigned __int64)v9 + 39) & 0xFFFFFFFFFFFFFFE0uLL);
*(v10 - 1) = v9;
goto LABEL_17;
}
v3 = a3 | 0xF;
if ( (a3 | 0xF) < 0x16 )
v3 = 22;
if ( (unsigned __int64)(v3 + 1) >= 0x1000 )
{
v8 = v3 + 40;
if ( v3 + 40 < (unsigned __int64)(v3 + 1) )
Concurrency::cancel_current_task();
goto LABEL_6;
}
if ( v3 == -1 )
v10 = nullptr;
else
v10 = operator new(v3 + 1);
LABEL_17:
*a1 = v10;
a1[2] = a3;
a1[3] = v3;
result = memcpy(v10, a2, a3);
*((_BYTE *)v10 + a3) = 0;
return result;
}