// // DS_Dictionary::saveRootSubDictToCompressedFile from 0xdb98bc to 0xdb9e74 (1464 bytes) // // 3 xrefs: // > sub_6A89C0 @ 0x6a8a70 // > GManager::saveGMTo @ 0x6a8f28 // > @ 0x6c688 // // This function is hookable on this platform (idp: arm, 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 13:08:43 +0000 // __int64 __fastcall DS_Dictionary::saveRootSubDictToCompressedFile(DS_Dictionary *this, char *a2, unsigned __int8 a3) { size_t v6; // x0 char *v7; // x1 char *v8; // x0 char *v9; // x0 const char *v10; // x0 const char *v11; // x0 const char *v12; // x1 const char *v13; // x0 const char *v14; // x1 const char *v15; // x0 const char *v16; // x0 FILE *v17; // x19 char *v18; // x0 size_t v19; // x2 size_t v20; // x20 int v21; // w0 unsigned int v22; // w21 char *v23; // x21 char *v24; // x21 _QWORD *v25; // x21 _QWORD *v26; // x20 unsigned __int8 *v27; // x0 unsigned __int8 v28; // w1 unsigned __int8 *v29; // x0 __int64 v30; // x0 const char *v32; // x0 const char *v33; // x1 __int64 v34[2]; // [xsp+70h] [xbp+70h] BYREF char *v35; // [xsp+80h] [xbp+80h] _QWORD v36[2]; // [xsp+88h] [xbp+88h] BYREF char *v37; // [xsp+98h] [xbp+98h] __int64 v38[2]; // [xsp+A0h] [xbp+A0h] BYREF char *v39; // [xsp+B0h] [xbp+B0h] __int64 v40[2]; // [xsp+B8h] [xbp+B8h] BYREF char *v41; // [xsp+C8h] [xbp+C8h] __int64 v42[2]; // [xsp+D0h] [xbp+D0h] BYREF _BYTE *v43; // [xsp+E0h] [xbp+E0h] __int64 v44; // [xsp+E8h] [xbp+E8h] BYREF size_t v45; // [xsp+F0h] [xbp+F0h] char *v46; // [xsp+F8h] [xbp+F8h] __int64 (__fastcall **v47)(); // [xsp+100h] [xbp+100h] _BYTE v48[168]; // [xsp+108h] [xbp+108h] BYREF _QWORD v49[4]; // [xsp+1B0h] [xbp+1B0h] BYREF int v50; // [xsp+1D0h] [xbp+1D0h] __int64 v51; // [xsp+238h] [xbp+238h] int v52; // [xsp+240h] [xbp+240h] __int64 (__fastcall **v53)(); // [xsp+248h] [xbp+248h] __int64 v54; // [xsp+250h] [xbp+250h] _BYTE v55[168]; // [xsp+258h] [xbp+258h] BYREF _QWORD v56[4]; // [xsp+300h] [xbp+300h] BYREF int v57; // [xsp+320h] [xbp+320h] __int64 v58; // [xsp+388h] [xbp+388h] int v59; // [xsp+390h] [xbp+390h] v34[0] = 0; v34[1] = 0; v35 = nullptr; std::string::__init(v34, &byte_11B8890, 0); FileOperation::getFilePath(v36); v6 = strlen(a2); std::string::append((__int64)v36, a2, v6); v7 = (char *)v36 + 1; if ( (v36[0] & 1) != 0 ) v7 = v37; std::string::assign(v34, v7); v8 = (char *)v34 + 1; if ( (v34[0] & 1) != 0 ) v8 = v35; sub_DB96D8(v8, "2.dat", v38); v9 = (char *)v34 + 1; if ( (v34[0] & 1) != 0 ) v9 = v35; sub_DB96D8(v9, "3.dat", v40); v10 = (char *)v40 + 1; if ( (v40[0] & 1) != 0 ) v10 = v41; remove(v10); v11 = (char *)v38 + 1; if ( (v38[0] & 1) != 0 ) v11 = v39; v12 = (char *)v40 + 1; if ( (v40[0] & 1) != 0 ) v12 = v41; rename(v11, v12); v13 = (char *)v34 + 1; if ( (v34[0] & 1) != 0 ) v13 = v35; v14 = (char *)v38 + 1; if ( (v38[0] & 1) != 0 ) v14 = v39; if ( rename(v13, v14) ) { v32 = (char *)v40 + 1; if ( (v40[0] & 1) != 0 ) v32 = v41; v33 = (char *)v38 + 1; if ( (v38[0] & 1) != 0 ) v33 = v39; rename(v32, v33); } else { v15 = (char *)v40 + 1; if ( (v40[0] & 1) != 0 ) v15 = v41; remove(v15); } DS_Dictionary::saveRootSubDictToString(v42, this); cocos2d::ZipUtils::compressString(&v44, (__int64)v42, a3, 1u, 11); if ( (v42[0] & 1) != 0 ) { *v43 = 0; v42[1] = 0; } else { LOWORD(v42[0]) = 0; } v16 = (char *)v34 + 1; if ( (v34[0] & 1) != 0 ) v16 = v35; v17 = fopen(v16, "wb"); if ( v17 ) { if ( (v44 & 1) != 0 ) { v18 = v46; v19 = v45; } else { v19 = (unsigned __int8)v44 >> 1; v18 = (char *)&v44 + 1; } v20 = fwrite(v18, 1u, v19, v17); v21 = fclose(v17); if ( (v44 & 1) != 0 ) { if ( v20 == v45 ) { v22 = 1; if ( !v21 ) goto LABEL_31; } } else if ( v20 == (unsigned __int8)v44 >> 1 ) { v22 = 1; if ( !v21 ) { LABEL_57: if ( (v42[0] & 1) != 0 ) goto LABEL_32; goto LABEL_58; } } } v23 = (char *)v38 + 1; if ( (v38[0] & 1) != 0 ) v23 = v39; v53 = (__int64 (__fastcall **)())&unk_1531F78; v56[0] = &unk_1531FA0; v54 = 0; std::ios_base::init((std::ios_base *)v56, v55); v58 = 0; v59 = -1; v53 = off_1531FE8; v56[0] = off_1532010; std::filebuf::basic_filebuf((__int64)v55); if ( !std::filebuf::open((__int64)v55, v23, 8) ) std::ios_base::clear((std::ios_base *)v56, v57 | 4); v24 = (char *)v34 + 1; if ( (v34[0] & 1) != 0 ) v24 = v35; v49[0] = &unk_1532060; v47 = (__int64 (__fastcall **)())&unk_1532038; std::ios_base::init((std::ios_base *)v49, v48); v51 = 0; v47 = off_15320A8; v49[0] = off_15320D0; v52 = -1; std::filebuf::basic_filebuf((__int64)v48); if ( !std::filebuf::open((__int64)v48, v24, 16) ) std::ios_base::clear((std::ios_base *)v49, v50 | 4); v25 = *(_QWORD **)&v55[(_QWORD)*(v53 - 3) + 24]; v26 = *(_QWORD **)&v48[(_QWORD)*(v47 - 3) + 32]; while ( v25 ) { v27 = (unsigned __int8 *)v25[3]; if ( v27 != (unsigned __int8 *)v25[4] ) goto LABEL_49; if ( (*(unsigned int (__fastcall **)(_QWORD *))(*v25 + 72LL))(v25) == -1 ) break; v27 = (unsigned __int8 *)v25[3]; if ( (unsigned __int8 *)v25[4] == v27 ) v28 = (*(__int64 (__fastcall **)(_QWORD *))(*v25 + 72LL))(v25); else LABEL_49: v28 = *v27; if ( v26 ) { v29 = (unsigned __int8 *)v26[6]; if ( v29 != (unsigned __int8 *)v26[7] ) { v26[6] = v29 + 1; *v29 = v28; goto LABEL_53; } if ( (*(unsigned int (__fastcall **)(_QWORD *, _QWORD))(*v26 + 104LL))(v26, v28) == -1 ) v26 = nullptr; v30 = v25[3]; if ( v30 == v25[4] ) goto LABEL_67; LABEL_54: v25[3] = v30 + 1; } else { LABEL_53: v30 = v25[3]; if ( v30 != v25[4] ) goto LABEL_54; LABEL_67: (*(void (__fastcall **)(_QWORD *))(*v25 + 80LL))(v25); } } v22 = 0; v49[0] = off_15320D0; v47 = off_15320A8; std::filebuf::~filebuf((__int64)v48); v49[0] = off_143EED0; std::ios_base::~ios_base((std::ios_base *)v49); v53 = off_1531FE8; v56[0] = off_1532010; std::filebuf::~filebuf((__int64)v55); v56[0] = off_143EED0; std::ios_base::~ios_base((std::ios_base *)v56); if ( (v44 & 1) == 0 ) goto LABEL_57; LABEL_31: operator delete(v46); if ( (v42[0] & 1) != 0 ) { LABEL_32: operator delete(v43); if ( (v40[0] & 1) != 0 ) goto LABEL_33; LABEL_59: if ( (v38[0] & 1) == 0 ) goto LABEL_60; LABEL_34: operator delete(v39); if ( (v36[0] & 1) != 0 ) goto LABEL_35; goto LABEL_61; } LABEL_58: if ( (v40[0] & 1) == 0 ) goto LABEL_59; LABEL_33: operator delete(v41); if ( (v38[0] & 1) != 0 ) goto LABEL_34; LABEL_60: if ( (v36[0] & 1) != 0 ) LABEL_35: operator delete(v37); LABEL_61: if ( (v34[0] & 1) != 0 ) operator delete(v35); return v22; }
GD Web Decomp Icon

GD Web Decomp

Raw Source