//
// sub_3D4220 from 0x3d4220 to 0x3d427c (92 bytes)
//
// 2 xrefs:
// > sub_3D427C @ 0x3d42d4
// > GManager::saveGMTo @ 0x3d441a
//
// 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:42 +0000
//
int __fastcall sub_3D4220(_DWORD *a1, int a2)
{
int v3; // r6
DS_Dictionary *v4; // r0
const char *v5; // r1
int v6; // r0
char **v7; // r5
int v8; // r7
int result; // r0
v3 = *a1;
v4 = (DS_Dictionary *)a1[1];
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 8);
else
v5 = (const char *)(a2 + 1);
v6 = DS_Dictionary::saveRootSubDictToCompressedFile(v4, v5, 1);
v7 = (char **)a1[1];
v8 = v6;
if ( v7 )
{
std::__vector_base
::~__vector_base(v7 + 50);
pugi::xml_document::~xml_document((pugi::xml_document *)v7);
operator delete(v7);
a1[1] = 0;
}
result = (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*a1 + 460))(*a1, v8);
__dmb(0xFu);
*(_BYTE *)(v3 + 277) = 0;
return result;
}