//
// cocos2d::ZipUtils::base64DecodeEnc from 0x5ef7a8 to 0x5ef864 (188 bytes)
//
// 7 xrefs:
// > GameLevelManager::onGetGJSecretRewardCompleted @ 0x3c36cc
// > GameLevelManager::onGetGJRewardsCompleted @ 0x3c3a0a
// > GameLevelManager::onGetGJChallengesCompleted @ 0x3c3e10
// > GameLevelManager::onGetGJDailyLevelStateCompleted @ 0x3c4390
// > GJGameLevel::create @ 0x3c5bdc
// > GJUserMessage::create @ 0x3cc084
// > MusicDownloadManager::generateCustomContentURL @ 0x4588a8
//
// 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::base64DecodeEnc(_DWORD *a1, cocos2d **a2)
{
cocos2d *v3; // r0
const unsigned __int8 *v4; // r1
int v5; // r2
void *v6; // r3
void *v8; // [sp+4h] [bp-14h] BYREF
void *v9; // [sp+8h] [bp-10h] BYREF
void *v10; // [sp+Ch] [bp-Ch] BYREF
int v11; // [sp+10h] [bp-8h] BYREF
v3 = *a2;
v4 = *((const unsigned __int8 **)*a2 - 3);
if ( !v4 )
{
LABEL_2:
sub_775C20(a1);
return a1;
}
v8 = nullptr;
v5 = base64Decode(v3, v4, &v8, (unsigned int *)((char *)&dword_0 + 1));
if ( v5 <= 0 )
{
if ( v8 )
{
operator delete[](v8);
v8 = nullptr;
}
goto LABEL_2;
}
v9 = &unk_ACDDA8;
sub_774534(&v9, v8, v5);
sub_775C20(&v11);
cocos2d::ZipUtils::encryptDecryptWKey(&v10, &v9, &v11);
sub_774008(&v11);
if ( v8 )
{
operator delete[](v8);
v8 = nullptr;
}
v6 = v10;
v10 = &unk_ACDDA8;
*a1 = v6;
sub_774008(&v10);
sub_774008(&v9);
return a1;
}