//
// cocos2d::ZipUtils::base64URLEncode from 0x1002db33c to 0x1002db410 (212 bytes)
//
// 1 xrefs:
// > LevelTools::base64EncodeString @ 0x10023e1c8
//
// This function is hookable on this platform (idp: arm, 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:02:44 +0000
//
void __usercall cocos2d::ZipUtils::base64URLEncode(_QWORD *a1@, std::string *a2@)
{
__int64 v3; // x1
int v4; // w0
std::string::value_type *__s; // [xsp+8h] [xbp-18h] BYREF
v3 = *((char *)a1 + 23);
if ( v3 < 0 )
{
v3 = a1[1];
if ( !v3 )
{
sub_1000097D0(a2, (void *)*a1, 0);
return;
}
__s = nullptr;
a1 = (_QWORD *)*a1;
}
else
{
if ( !*((_BYTE *)a1 + 23) )
{
*(_OWORD *)&a2->__r_.__value_.__l.__data_ = *(_OWORD *)a1;
a2->__r_.__value_.__r.__words[2] = a1[2];
return;
}
__s = nullptr;
}
v4 = sub_1002DD990(a1, v3, &__s, 1);
if ( v4 < 1 )
{
if ( __s )
{
operator delete[](__s);
__s = nullptr;
}
sub_100009900(a2, "");
}
else
{
a2->__r_.__value_.__r.__words[0] = 0;
a2->__r_.__value_.__l.__size_ = 0;
a2->__r_.__value_.__r.__words[2] = 0;
std::string::append(a2, __s, (unsigned int)v4);
if ( __s )
operator delete[](__s);
}
}