//
// cocos2d::ZipUtils::base64URLEncode from 0x5ef9d0 to 0x5efa66 (150 bytes)
//
// 1 xrefs:
// > LevelTools::base64EncodeString @ 0x32c5fe
//
// 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
//
_DWORD *__fastcall cocos2d::ZipUtils::base64URLEncode(_DWORD *a1, _DWORD *a2, int a3, int a4)
{
cocos2d *v5; // r0
const unsigned __int8 *v6; // r1
signed int v7; // r2
int v8; // r3
void *v10; // [sp+4h] [bp-Ch] BYREF
_DWORD v11[2]; // [sp+8h] [bp-8h] BYREF
v10 = a2;
v11[0] = a3;
v11[1] = a4;
if ( *(_DWORD *)(*a2 - 12) )
{
v5 = (cocos2d *)*a2;
v6 = *(const unsigned __int8 **)(*a2 - 12);
v10 = nullptr;
v7 = base64Encode(v5, v6, &v10, (_BYTE *)&dword_0 + 1);
if ( v7 <= 0 )
{
if ( v10 )
{
operator delete[](v10);
v10 = nullptr;
}
sub_776584((int)a1, (char *)&unk_939830);
}
else
{
v11[0] = &unk_ACDDA8;
sub_774534(v11, v10, v7);
if ( v10 )
{
operator delete[](v10);
v10 = nullptr;
}
v8 = v11[0];
v11[0] = &unk_ACDDA8;
*a1 = v8;
sub_774008(v11);
}
}
else
{
sub_775C20(a1);
}
return a1;
}