//
// base64Decode from 0x180092d60 to 0x180092e37 (215 bytes)
//
// 10 xrefs:
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1800687c2
// > cocos2d::ZipUtils::base64DecodeEnc @ 0x1800a2cbc
// > cocos2d::ZipUtils::base64URLDecode @ 0x1800a30eb
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a3ebd
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a3f18
// > cocos2d::ZipUtils::decompressString @ 0x1800a418b
// > cocos2d::ZipUtils::decompressString @ 0x1800a41bb
// > cocos2d::CCTMXMapInfo::endElement @ 0x1800af34e
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6438
//
// 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 base64Decode(unsigned __int8 *a1, signed int a2, void **a3, char a4)
{
unsigned __int64 v5; // rax
float v9; // xmm0_4
void *v10; // rax
unsigned int v12; // [rsp+48h] [rbp+10h] BYREF
v5 = 0;
v12 = 0;
v9 = (float)((float)((float)a2 * 3.0) * 0.25) + 4.0;
if ( v9 >= 9.223372e18 )
{
v9 = v9 - 9.223372e18;
if ( v9 < 9.223372e18 )
v5 = 0x8000000000000000uLL;
}
v10 = malloc(v5 + (unsigned int)(int)v9);
*a3 = v10;
if ( !v10 )
return 0;
if ( (int)sub_1800929B0(a1, a2, (__int64)v10, &v12, a4) > 0 )
{
sub_180074CB0("Base64Utils: error decoding");
free(*a3);
*a3 = nullptr;
return 0;
}
return v12;
}