//
// LevelTools::base64EncodeString from 0x100500b50 to 0x100500b9f (79 bytes)
//
// 29 xrefs:
// > LevelSettingsObject::getSaveString @ 0x1000ba76f
// > EditLevelLayer::textInputClosed @ 0x1001dfd91
// > StartPosLayer::onClose @ 0x10025d9d0
// > LevelListLayer::shareCommentClosed @ 0x10034b99f
// > CreateStartPosPopup::onCreate @ 0x1003c4cf5
// > GameLevelManager::appendModReason @ 0x10055af46
// > GameLevelManager::uploadUserMessage @ 0x1005692c1
// > GameLevelManager::uploadComment @ 0x10056c345
// > GameLevelManager::sendThreadMessage @ 0x1005722e3
// > GameLevelManager::sendThreadMessage @ 0x1005723bc
// > GameLevelManager::sendThreadMessage @ 0x100572476
// > GameLevelManager::sendThreadMessage @ 0x100572530
// > GameLevelManager::sendThreadMessage @ 0x1005725fa
// > GameLevelManager::getThreads @ 0x100572b07
// > sub_100572E00 @ 0x100573137
// > sub_100573460 @ 0x100573713
// > GameLevelManager::updateThread @ 0x1005783d4
// > sub_100578FA0 @ 0x100579107
// > GameLevelManager::getFriendRequests @ 0x100579d63
// > GameLevelManager::uploadFriendRequest @ 0x10057a0bc
// > GJGameLevel::dataLoaded @ 0x10058a7d0
// > MusicDownloadManager::getCustomSFXRawPath @ 0x100652def
// > MusicDownloadManager::getCustomSFXRawPath @ 0x100652ea7
// > MusicDownloadManager::encodeCustomSFX @ 0x10065642e
// > TextGameObject::getSaveString @ 0x1006a37de
// > GJMultiplayerManager::uploadComment @ 0x10073aaaa
// > CreatorSettingsPopup::setTextPopupClosed @ 0x1008b70cd
// > EditorSoundConfigInfoLayer::soundPackDescSaved @ 0x1008f7b7a
// > sub_100923C00 @ 0x100923c20
//
// 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 12:31:30 +0000
//
std::string *__fastcall LevelTools::base64EncodeString(std::string *a1, std::string *a2)
{
unsigned int v2; // eax
v2 = (unsigned int)a2->__r_.__value_.__l.0;
if ( (v2 & 1) != 0 )
{
if ( a2->__r_.__value_.__l.__size_ )
goto LABEL_3;
}
else if ( v2 >> 1 )
{
LABEL_3:
cocos2d::ZipUtils::base64URLEncode(a1, a2);
return a1;
}
a1->__r_.__value_.__r.__words[2] = a2->__r_.__value_.__r.__words[2];
*(_OWORD *)&a1->__r_.__value_.__l.0 = *(_OWORD *)&a2->__r_.__value_.__l.0;
*(_OWORD *)&a2->__r_.__value_.__l.0 = 0;
a2->__r_.__value_.__r.__words[2] = 0;
return a1;
}