//
// sub_100314A00 from 0x100314a00 to 0x100314a90 (144 bytes)
//
// 8 xrefs:
// > cocos2d::ZipUtils::decompressString2 @ 0x1001e876d
// > cocos2d::ZipUtils::decompressString2 @ 0x1001e8809
// > cocos2d::ZipUtils::decompressString @ 0x1001e8b18
// > cocos2d::ZipUtils::decompressString @ 0x1001e8b2e
// > cocos2d::ZipUtils::base64DecodeEnc @ 0x1001e8cda
// > cocos2d::ZipUtils::base64URLDecode @ 0x1001e914c
// > cocos2d::CCTMXMapInfo::endElement @ 0x1004ccb2b
// > cocos2d::CCParticleSystem::initWithDictionary @ 0x1008afdd4
//
// 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:28:40 +0000
//
__int64 __fastcall sub_100314A00(__int64 a1, unsigned int a2, void **a3, unsigned __int8 a4)
{
void *v6; // rax
unsigned int v7; // r14d
unsigned int v9[9]; // [rsp+Ch] [rbp-24h] BYREF
v9[0] = 0;
v6 = malloc(3 * (a2 >> 2) + 4LL);
*a3 = v6;
if ( v6 )
{
if ( (unsigned int)sub_100314620(a1, a2, (__int64)v6, v9, a4) )
{
v7 = 0;
printf("Base64Utils: error decoding");
free(*a3);
*a3 = nullptr;
}
else
{
return v9[0];
}
}
else
{
return 0;
}
return v7;
}