//
// GameManager::encodeDataTo from 0x41db84 to 0x41e3b4 (2096 bytes)
//
// 0 xrefs:
//
// 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:48:00 +0000
//
int __fastcall GameManager::encodeDataTo(GameManager *this, DS_Dictionary *a2)
{
GameManager *v4; // r0
int v5; // r0
int v6; // r8
FMODAudioEngine *v7; // r0
FMODAudioEngine *v8; // r0
int BackgroundMusicVolume; // r0
FMODAudioEngine *v10; // r0
FMODAudioEngine *v11; // r0
int EffectsVolume; // r0
FMODAudioEngine *v13; // r0
int v14; // r0
AchievementManager *v15; // r0
cocos2d::CCDictionary **v16; // r0
GameLevelManager *v17; // r0
GameLevelManager *v18; // r0
GameStatsManager *v19; // r0
GameStatsManager *v20; // r0
MusicDownloadManager *v21; // r0
MusicDownloadManager *v22; // r0
GJAccountManager *v23; // r0
GJAccountManager *v24; // r0
GJMultiplayerManager *v25; // r0
GJMultiplayerManager *v26; // r0
GJKeybindManager *v27; // r0
GJKeybindManager *v28; // r0
EditorSFXManager *v29; // r0
EditorSFXManager *v30; // r0
char *i; // r7
bool v32; // nf
size_t v33; // r0
bool v34; // nf
size_t v35; // r0
int v36; // r3
const char *v37; // r7
size_t v38; // r0
bool v39; // nf
size_t v40; // r0
bool v41; // nf
size_t v42; // r0
bool v43; // nf
size_t v44; // r0
bool v45; // nf
size_t v46; // r0
int v48; // [sp+18h] [bp-34h] BYREF
int v49; // [sp+1Ch] [bp-30h]
int v50; // [sp+20h] [bp-2Ch]
char v51[32]; // [sp+24h] [bp-28h] BYREF
v4 = (GameManager *)GameManager::sharedState(this);
if ( *((_DWORD *)v4 + 101) )
{
v5 = GameManager::sharedState(v4);
PlayLayer::writePersistentSave(*(GameManager **)(v5 + 404));
}
DS_Dictionary::setDictForKey(a2, "valueKeeper", *((cocos2d::CCDictionary **)this + 80));
if ( !*((_BYTE *)this + 328) )
DS_Dictionary::setDictForKey(a2, "localKeeper", *((cocos2d::CCDictionary **)this + 81));
v6 = 0;
DS_Dictionary::setDictForKey(a2, "unlockValueKeeper", *((cocos2d::CCDictionary **)this + 83));
v7 = (FMODAudioEngine *)DS_Dictionary::setDictForKey(a2, "customObjectDict", *((cocos2d::CCDictionary **)this + 84));
v8 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v7);
BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v8);
v10 = (FMODAudioEngine *)DS_Dictionary::setFloatForKey(a2, "bgVolume", *(float *)&BackgroundMusicVolume);
v11 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v10);
EffectsVolume = FMODAudioEngine::getEffectsVolume(v11);
v13 = (FMODAudioEngine *)DS_Dictionary::setFloatForKey(a2, "sfxVolume", *(float *)&EffectsVolume);
v14 = FMODAudioEngine::sharedEngine(v13);
DS_Dictionary::setIntegerForKey(a2, "timeOffset", *(_DWORD *)(v14 + 400));
DS_Dictionary::setStringForKey(a2, "playerUDID", (char *)this + 436);
DS_Dictionary::setStringForKey(a2, "playerName", (char *)this + 448);
DS_Dictionary::setIntegerForKey(a2, "playerUserID", *((_DWORD *)this + 116) - *((_DWORD *)this + 117));
DS_Dictionary::setIntegerForKey(a2, "playerFrame", *((_DWORD *)this + 129) - *((_DWORD *)this + 130));
DS_Dictionary::setIntegerForKey(a2, "playerShip", *((_DWORD *)this + 132) - *((_DWORD *)this + 133));
DS_Dictionary::setIntegerForKey(a2, "playerBall", *((_DWORD *)this + 135) - *((_DWORD *)this + 136));
DS_Dictionary::setIntegerForKey(a2, "playerBird", *((_DWORD *)this + 138) - *((_DWORD *)this + 139));
DS_Dictionary::setIntegerForKey(a2, "playerDart", *((_DWORD *)this + 141) - *((_DWORD *)this + 142));
DS_Dictionary::setIntegerForKey(a2, "playerRobot", *((_DWORD *)this + 144) - *((_DWORD *)this + 145));
DS_Dictionary::setIntegerForKey(a2, "playerSpider", *((_DWORD *)this + 147) - *((_DWORD *)this + 148));
DS_Dictionary::setIntegerForKey(a2, "playerSwing", *((_DWORD *)this + 150) - *((_DWORD *)this + 151));
DS_Dictionary::setIntegerForKey(a2, "playerColor", *((_DWORD *)this + 153) - *((_DWORD *)this + 154));
DS_Dictionary::setIntegerForKey(a2, "playerColor2", *((_DWORD *)this + 156) - *((_DWORD *)this + 157));
DS_Dictionary::setIntegerForKey(a2, "playerColor3", *((_DWORD *)this + 159) - *((_DWORD *)this + 160));
DS_Dictionary::setIntegerForKey(a2, "playerStreak", *((_DWORD *)this + 162) - *((_DWORD *)this + 163));
DS_Dictionary::setIntegerForKey(a2, "playerShipStreak", *((_DWORD *)this + 165) - *((_DWORD *)this + 166));
DS_Dictionary::setIntegerForKey(a2, "playerDeathEffect", *((_DWORD *)this + 168) - *((_DWORD *)this + 169));
DS_Dictionary::setIntegerForKey(a2, "playerJetpack", *((_DWORD *)this + 171) - *((_DWORD *)this + 172));
DS_Dictionary::setIntegerForKey(a2, "playerIconType", *((_DWORD *)this + 179));
DS_Dictionary::setBoolForKey(a2, "playerGlow", *((_BYTE *)this + 712));
DS_Dictionary::setIntegerForKey(a2, "secretNumber", *((_DWORD *)this + 176) - *((_DWORD *)this + 177));
DS_Dictionary::setIntegerForKey(a2, "hasRP", *((_DWORD *)this + 205) - *((_DWORD *)this + 206));
DS_Dictionary::setBoolForKey(a2, "hasDRP", *((_BYTE *)this + 832));
v15 = (AchievementManager *)DS_Dictionary::setIntegerForKey(a2, "specialPermKey", *((_DWORD *)this + 209));
v16 = (cocos2d::CCDictionary **)AchievementManager::sharedState(v15);
v17 = (GameLevelManager *)AchievementManager::encodeDataTo(v16, a2);
v18 = (GameLevelManager *)GameLevelManager::sharedState(v17);
v19 = (GameStatsManager *)GameLevelManager::encodeDataTo(v18, a2);
v20 = (GameStatsManager *)GameStatsManager::sharedState(v19);
v21 = (MusicDownloadManager *)GameStatsManager::encodeDataTo(v20, a2);
v22 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v21);
v23 = (GJAccountManager *)MusicDownloadManager::encodeDataTo(v22, a2);
v24 = (GJAccountManager *)GJAccountManager::sharedState(v23);
v25 = (GJMultiplayerManager *)GJAccountManager::encodeDataTo(v24, a2);
v26 = (GJMultiplayerManager *)GJMultiplayerManager::sharedState(v25);
v27 = (GJKeybindManager *)GJMultiplayerManager::encodeDataTo(v26, a2);
v28 = (GJKeybindManager *)GJKeybindManager::sharedState(v27);
v29 = (EditorSFXManager *)GJKeybindManager::encodeDataTo(v28, a2);
v30 = (EditorSFXManager *)EditorSFXManager::sharedState(v29);
EditorSFXManager::encodeDataTo(v30, a2);
DS_Dictionary::setBoolForKey(a2, "showSongMarkers", *((_BYTE *)this + 721));
DS_Dictionary::setBoolForKey(a2, "showBPMMarkers", *((_BYTE *)this + 722));
DS_Dictionary::setBoolForKey(a2, "recordGameplay", *((_BYTE *)this + 723));
DS_Dictionary::setBoolForKey(a2, "showProgressBar", *((_BYTE *)this + 724));
DS_Dictionary::setBoolForKey(a2, "performanceMode", *((_BYTE *)this + 725));
DS_Dictionary::setBoolForKey(a2, "clickedGarage", *((_BYTE *)this + 727));
DS_Dictionary::setBoolForKey(a2, "clickedEditor", *((_BYTE *)this + 728));
DS_Dictionary::setBoolForKey(a2, "clickedName", *((_BYTE *)this + 729));
DS_Dictionary::setBoolForKey(a2, "clickedPractice", *((_BYTE *)this + 730));
DS_Dictionary::setBoolForKey(a2, "showedEditorGuide", *((_BYTE *)this + 731));
DS_Dictionary::setBoolForKey(a2, "showedRateDiffDialog", *((_BYTE *)this + 732));
DS_Dictionary::setBoolForKey(a2, "showedRateStarDialog", *((_BYTE *)this + 733));
DS_Dictionary::setBoolForKey(a2, "showedLowDetailDialog", *((_BYTE *)this + 734));
DS_Dictionary::setIntegerForKey(a2, "bootups", *((_DWORD *)this + 202));
DS_Dictionary::setBoolForKey(a2, "hasRatedGame", *((_BYTE *)this + 812));
DS_Dictionary::setIntegerForKey(a2, "binaryVersion", 51);
DS_Dictionary::setIntegerForKey(a2, "resolution", *((_DWORD *)this + 211));
DS_Dictionary::setIntegerForKey(a2, "texQuality", *((_DWORD *)this + 212));
DS_Dictionary::setFloatForKey(a2, "customFPSTarget", *((float *)this + 221));
DS_Dictionary::setFloatForKey(a2, "scrollSensitivity", *((float *)this + 222));
for ( i = *((char **)this + 223);
i != (char *)this + 896;
i = (char *)std::__tree_next *>(i) )
{
if ( !i[48] )
{
sub_993B88(v51, 32, "ws_%d_k", v6);
DS_Dictionary::setIntegerForKey(a2, v51, *((_DWORD *)i + 4));
sub_993B88(v51, 32, "ws_%d_cx", v6);
DS_Dictionary::setFloatForKey(a2, v51, *((float *)i + 5));
sub_993B88(v51, 32, "ws_%d_cy", v6);
DS_Dictionary::setFloatForKey(a2, v51, *((float *)i + 6));
sub_993B88(v51, 32, "ws_%d_w", v6);
DS_Dictionary::setFloatForKey(a2, v51, *((float *)i + 7));
sub_993B88(v51, 32, "ws_%d_h", v6);
DS_Dictionary::setFloatForKey(a2, v51, *((float *)i + 8));
sub_993B88(v51, 32, "ws_%d_s", v6);
DS_Dictionary::setFloatForKey(a2, v51, *((float *)i + 9));
sub_993B88(v51, 32, "ws_%d_so", v6);
DS_Dictionary::setFloatForKey(a2, v51, *((float *)i + 10));
sub_993B88(v51, 32, "ws_%d_v", v6);
DS_Dictionary::setIntegerForKey(a2, v51, *((_DWORD *)i + 11));
++v6;
}
}
DS_Dictionary::setIntegerForKey(a2, "winStateCount", v6);
DS_Dictionary::setIntegerForKey(a2, "customMenuSongID", *((_DWORD *)this + 227));
DS_Dictionary::setIntegerForKey(a2, "customPracticeSongID", *((_DWORD *)this + 228));
DS_Dictionary::setIntegerForKey(a2, "idNameSortMode", *((_DWORD *)this + 229));
DS_Dictionary::setIntegerForKey(a2, "newsLastReadID", *((_DWORD *)this + 230));
GameManager::dpadConfigToString((GameManager *)&v48, this, (int)this + 1008);
DS_Dictionary::setStringForKey(a2, "dpad01", &v48);
std::string::~string((int)&v48);
GameManager::dpadConfigToString((GameManager *)&v48, this, (int)this + 1048);
DS_Dictionary::setStringForKey(a2, "dpad02", &v48);
std::string::~string((int)&v48);
GameManager::dpadConfigToString((GameManager *)&v48, this, (int)this + 1088);
DS_Dictionary::setStringForKey(a2, "dpad03", &v48);
std::string::~string((int)&v48);
GameManager::dpadConfigToString((GameManager *)&v48, this, (int)this + 1128);
DS_Dictionary::setStringForKey(a2, "dpad04", &v48);
std::string::~string((int)&v48);
GameManager::dpadConfigToString((GameManager *)&v48, this, (int)this + 1168);
DS_Dictionary::setStringForKey(a2, "dpad05", &v48);
std::string::~string((int)&v48);
v32 = (*((_BYTE *)this + 1208) & 1) != 0;
if ( (*((_BYTE *)this + 1208) & 1) == 0 )
i = (char *)this + 1209;
v48 = 0;
if ( v32 )
i = *((char **)this + 304);
v49 = 0;
v50 = 0;
v33 = strlen(i);
std::string::__init(&v48, i, v33);
DS_Dictionary::setStringForKey(a2, "dpadLayout01", &v48);
std::string::~string((int)&v48);
v34 = (*((_BYTE *)this + 1220) & 1) != 0;
if ( (*((_BYTE *)this + 1220) & 1) == 0 )
i = (char *)this + 1221;
v48 = 0;
if ( v34 )
i = *((char **)this + 307);
v49 = 0;
v50 = 0;
v35 = strlen(i);
std::string::__init(&v48, i, v35);
DS_Dictionary::setStringForKey(a2, "dpadLayout02", &v48);
std::string::~string((int)&v48);
v36 = *((unsigned __int8 *)this + 1232);
v37 = (const char *)(v36 << 31);
if ( (v36 & 1) == 0 )
v37 = (char *)this + 1233;
v48 = 0;
if ( (v36 & 1) != 0 )
v37 = *((const char **)this + 310);
v49 = 0;
v50 = 0;
v38 = strlen(v37);
std::string::__init(&v48, v37, v38);
DS_Dictionary::setStringForKey(a2, "dpadLayout03", &v48);
std::string::~string((int)&v48);
v39 = (*((_BYTE *)this + 1244) & 1) != 0;
if ( (*((_BYTE *)this + 1244) & 1) == 0 )
v37 = (char *)this + 1245;
v48 = 0;
if ( v39 )
v37 = *((const char **)this + 313);
v49 = 0;
v50 = 0;
v40 = strlen(v37);
std::string::__init(&v48, v37, v40);
DS_Dictionary::setStringForKey(a2, "dpadLayoutDual01", &v48);
std::string::~string((int)&v48);
v41 = (*((_BYTE *)this + 1256) & 1) != 0;
if ( (*((_BYTE *)this + 1256) & 1) == 0 )
v37 = (char *)this + 1257;
v48 = 0;
if ( v41 )
v37 = *((const char **)this + 316);
v49 = 0;
v50 = 0;
v42 = strlen(v37);
std::string::__init(&v48, v37, v42);
DS_Dictionary::setStringForKey(a2, "dpadLayoutDual02", &v48);
std::string::~string((int)&v48);
v43 = (*((_BYTE *)this + 1268) & 1) != 0;
if ( (*((_BYTE *)this + 1268) & 1) == 0 )
v37 = (char *)this + 1269;
v48 = 0;
if ( v43 )
v37 = *((const char **)this + 319);
v49 = 0;
v50 = 0;
v44 = strlen(v37);
std::string::__init(&v48, v37, v44);
DS_Dictionary::setStringForKey(a2, "dpadLayoutDual03", &v48);
std::string::~string((int)&v48);
v45 = (*((_BYTE *)this + 1280) & 1) != 0;
if ( (*((_BYTE *)this + 1280) & 1) == 0 )
v37 = (char *)this + 1281;
v48 = 0;
if ( v45 )
v37 = *((const char **)this + 322);
v49 = 0;
v50 = 0;
v46 = strlen(v37);
std::string::__init(&v48, v37, v46);
DS_Dictionary::setStringForKey(a2, "recentEmotes", &v48);
std::string::~string((int)&v48);
DS_Dictionary::setFloatForKey(a2, "practiceOpacity", *((float *)this + 329));
DS_Dictionary::setFloatForKey(a2, "practicePosX", *((float *)this + 327));
return DS_Dictionary::setFloatForKey(a2, "practicePosY", *((float *)this + 328));
}