//
// GManager::saveGMTo from 0x1004ac310 to 0x1004ac411 (257 bytes)
//
// 1 xrefs:
// > GManager::save @ 0x1004ac2ce
//
// 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
//
void __fastcall GManager::saveGMTo(_BYTE *a1, __int128 *a2, double a3)
{
DS_Dictionary *v3; // rbx
char *v4; // rsi
pugi::xml_node *begin; // rdi
_BYTE v6[16]; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
__int128 v8; // [rsp+20h] [rbp-30h] BYREF
void *v9; // [rsp+30h] [rbp-20h]
v3 = (DS_Dictionary *)operator new(0xF0u);
sub_100179B00(v3);
(*(void (__fastcall **)(_BYTE *, DS_Dictionary *))(*(_QWORD *)a1 + 888LL))(a1, v3);
if ( (*(_BYTE *)a2 & 1) != 0 )
{
sub_100006B70(&v8, *((const void **)a2 + 2), *((_QWORD *)a2 + 1), a3);
}
else
{
v9 = *((void **)a2 + 2);
v8 = *a2;
}
DS_Dictionary::saveRootSubDictToString((__int64)v6, (__int64)v3);
if ( (v8 & 1) != 0 )
v4 = (char *)v9;
else
v4 = (char *)&v8 + 1;
PlatformToolbox::saveAndEncryptStringToFile(v6, v4, "/data/data/com.robtopx.geometryjump/");
if ( (v6[0] & 1) == 0 )
{
if ( (v8 & 1) == 0 )
goto LABEL_9;
LABEL_13:
operator delete(v9);
a1[345] = 0;
begin = v3->dictTree.__begin_;
if ( !begin )
goto LABEL_11;
goto LABEL_10;
}
operator delete(__p);
if ( (v8 & 1) != 0 )
goto LABEL_13;
LABEL_9:
a1[345] = 0;
begin = v3->dictTree.__begin_;
if ( begin )
{
LABEL_10:
v3->dictTree.__end_ = begin;
operator delete(begin);
}
LABEL_11:
pugi::xml_document::dxml_document(v3);
operator delete(v3);
}