//
// GameToolbox::showSaveFileDialog from 0x3d03a0 to 0x3d045e (190 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::exportCustomSFXToFile @ 0x575aea
// > GJKeybindManager::exportBindingsToFile @ 0x7169f4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:46:40 +0000
//
int __fastcall GameToolbox::showSaveFileDialog(
cocos2d::CCFileUtils *a1,
int a2,
_BYTE *a3,
unsigned __int8 *a4,
int a5)
{
int v6; // r3
bool v7; // zf
int v8; // r0
int v9; // r2
const void *v10; // r1
size_t v11; // r2
int *v12; // r3
int v13; // r1
int v14; // r2
int v15; // r0
int v16; // r1
int v17; // r2
_DWORD v19[3]; // [sp+4h] [bp+0h] BYREF
int v20; // [sp+10h] [bp+Ch] BYREF
int v21; // [sp+14h] [bp+10h]
int v22; // [sp+18h] [bp+14h]
int v23; // [sp+1Ch] [bp+18h]
v6 = _stack_chk_guard;
v7 = (*(_BYTE *)a5 & 1) == 0;
if ( (*(_BYTE *)a5 & 1) != 0 )
{
a3 = *(_BYTE **)(a5 + 8);
}
else
{
*(_BYTE *)(a5 + 1) = 0;
*(_BYTE *)a5 = 0;
}
v23 = v6;
if ( !v7 )
{
*a3 = 0;
*(_DWORD *)(a5 + 4) = 0;
}
v8 = cocos2d::CCFileUtils::sharedFileUtils(a1);
(*(void (__fastcall **)(_DWORD *, int))(*(_DWORD *)v8 + 72))(v19, v8);
v9 = *a4;
if ( (v9 & 1) != 0 )
{
v10 = *((const void **)a4 + 2);
v11 = *((_DWORD *)a4 + 1);
}
else
{
v10 = a4 + 1;
v11 = v9 >> 1;
}
v12 = std::string::append(v19, v10, v11);
v13 = v12[1];
v14 = v12[2];
v20 = *v12;
v21 = v13;
v22 = v14;
*v12 = 0;
v12[1] = 0;
v12[2] = 0;
if ( (*(_BYTE *)a5 & 1) != 0 )
{
**(_BYTE **)(a5 + 8) = 0;
*(_DWORD *)(a5 + 4) = 0;
}
else
{
*(_BYTE *)(a5 + 1) = 0;
*(_BYTE *)a5 = 0;
}
std::string::reserve((int *)a5, 0);
v15 = v20;
v16 = v21;
v17 = v22;
v20 = 0;
v21 = 0;
v22 = 0;
*(_DWORD *)a5 = v15;
*(_DWORD *)(a5 + 4) = v16;
*(_DWORD *)(a5 + 8) = v17;
std::string::~string((int)&v20);
std::string::~string((int)v19);
return 1;
}