//
// base64Encode from 0xb20838 to 0xb208d4 (156 bytes)
//
// 4 xrefs:
// > cocos2d::ZipUtils::base64EncodeEnc @ 0xb29470
// > cocos2d::ZipUtils::base64URLEncode @ 0xb296ec
// > cocos2d::ZipUtils::compressString @ 0xb2a7bc
// > ??> @ 0x44f58
//
// 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
//
__int64 __fastcall base64Encode(__int64 a1, const unsigned __int8 *a2, _QWORD *a3, unsigned __int8 a4)
{
unsigned int v5; // w4
unsigned int v6; // w19
unsigned int v7; // w20
void *v8; // x4
v5 = (unsigned int)a2 % 3;
if ( (unsigned int)a2 % 3 )
v5 = 4;
v6 = 4 * (int)a2 / 3u + v5;
v7 = a4;
v8 = malloc(v6 + 1);
*a3 = v8;
if ( v8 )
cocos2d::_base64Encode(a1, a2, (__int64)v8, (char *)v7);
return v6;
}