#include "classes.h" // 006841d0 uint8_t OptionsConfig::read_bool(uint8_t *key, uint8_t isDefault) { uint8_t ch; uint32_t uVar1; int ****ppppiVar2; int intValue; uint8_t ****textCursor; uint8_t ****ppppbVar3; bool isLess; uint8_t ****rawValue [4]; int rawValueSize; uint32_t rawValueCapacity; int ****value [4]; int valueSize; uint32_t valueCapacity; uint32_t local_14; void *local_10; uint8_t *puStack_c; int ***local_8; local_8 = GHIDRA_CAST(0xffffffff); puStack_c = &LAB_00af824d; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((value + 10)); ExceptionList = &local_10; FUN_00684590(rawValue,key,this); local_8 = GHIDRA_CAST(0x0); if (rawValueSize == 0) goto LAB_00684346; value[0] = GHIDRA_CAST(0x0); ppppbVar3 = GHIDRA_CAST(rawValue); if (0xf < rawValueCapacity) { ppppbVar3 = rawValue[0]; } valueSize = 0; valueCapacity = 0xf; textCursor = ppppbVar3; do { ch = *GHIDRA_CAST(textCursor); textCursor = GHIDRA_CAST((GHIDRA_INT(textCursor) + 1)); } while (ch != 0); (GHIDRA_CAST((GHIDRA_CAST(value))))->msvc::string::assign(GHIDRA_CAST(ppppbVar3),GHIDRA_INT(textCursor) - GHIDRA_INT((GHIDRA_INT(ppppbVar3) + 1))); if (valueSize == 0) { LAB_00684309: isDefault = 0; } else { ppppiVar2 = GHIDRA_CAST(value); if (0xf < valueCapacity) { ppppiVar2 = value[0]; } if (valueSize == 4) { if ((*ppppiVar2 == GHIDRA_CAST(0x65757274)) || ((((ch = (uint8_t)*ppppiVar2, isLess = ch < 0x74, ch == 0x74 && (isLess = *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 1)) < 0x72, *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 1)) == 0x72)) && (isLess = *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 2)) < 0x75, *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 2)) == 0x75) ) && (isLess = *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 3)) < 0x65, *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 3)) == 0x65)))) { uVar1 = 0; } else { uVar1 = -GHIDRA_UINT(isLess) | 1; } if (uVar1 != 0) goto LAB_006842a6; } else { LAB_006842a6: ppppiVar2 = GHIDRA_CAST(value); if (0xf < valueCapacity) { ppppiVar2 = value[0]; } if (valueSize == 4) { if ((*ppppiVar2 == GHIDRA_CAST(0x65757254)) || (((ch = (uint8_t)*ppppiVar2, isLess = ch < 0x54, ch == 0x54 && (isLess = *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 1)) < 0x72, *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 1)) == 0x72)) && ((isLess = *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 2)) < 0x75, *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 2)) == 0x75 && (isLess = *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 3)) < 0x65, *GHIDRA_CAST((GHIDRA_CAST(ppppiVar2) + 3)) == 0x65)))))) { uVar1 = 0; } else { uVar1 = -GHIDRA_UINT(isLess) | 1; } if (uVar1 == 0) goto LAB_00684305; } ppppiVar2 = GHIDRA_CAST(value); if (0xf < valueCapacity) { ppppiVar2 = value[0]; } intValue = atoi(GHIDRA_CAST(ppppiVar2)); if (intValue == 0) goto LAB_00684309; } LAB_00684305: isDefault = 1; } if (0xf < valueCapacity) { uVar1 = valueCapacity + 1; ppppiVar2 = value[0]; if (0xfff < uVar1) { ppppiVar2 = GHIDRA_CAST(value[0][-1]); uVar1 = valueCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(value[0]) + (-4 - GHIDRA_INT(ppppiVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ppppiVar2,uVar1); } LAB_00684346: if (0xf < rawValueCapacity) { uVar1 = rawValueCapacity + 1; ppppbVar3 = rawValue[0]; if (0xfff < uVar1) { ppppbVar3 = GHIDRA_CAST(rawValue[0][-1]); uVar1 = rawValueCapacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(rawValue[0]) + (-4 - GHIDRA_INT(ppppbVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ppppbVar3,uVar1); } ExceptionList = local_10; return isDefault; } // 00924000 void OptionsConfig::reset_defaults() { int *sizeResult; int unused; int windowSize [2]; this->_musicVolume = 0.3; this->_sfxVolume = 0.3; this->_mapOpacity = 0.3; this->_isFullscreen = 0; this->_filterEnabled = 0; this->_exposure = 1.0; this->_brightness = 0.0; this->_gamma = 1.0; this->_contrast = 1.0; this->_controlHotplugEnabled = 1; this->_popupsMode = 1; this->_cameraStyle = 1; this->_historyHudMode = 0; this->_hudOffset = 1.0; this->_tryImportSave = 0; this->_enableMods = 1; this->_enableRumble = 1; this->_enableChargeBars = 0; this->_bossHpOnBottom = 1; this->_enableFoundHUD = 0; this->_enableBulletVisibility = 0; this->_enableAimLock = 1; this->_touchMode = 1; this->_ascentVoiceover = 1; this->_onlineHud = 0; this->_streamerMode = 0; this->_onlinePlayerVolume = 6; this->_onlinePlayerOpacity = 10; this->_onlineChatEnabled = 1; this->_onlineFilterEnabled = 1; this->_onlineColorSet = 0; this->_onlineInputDelay = 3; this->_itemInfoDisplayEnabled = 0; this->_announcerVoiceMode = 0; this->_enableDebugConsole = 0; this->_maxScale = 99; this->_maxRenderScale = 2; this->_enableVSync = 1; this->_enableSteamCloud = 1; this->_enablePauseOnFocusLost = 1; this->_enableMouseControl = 0; sizeResult = glfw_get_window_size(windowSize,GHIDRA_INT(this)); this->_windowWidth = *sizeResult; sizeResult = glfw_get_window_size(windowSize,unused); this->_windowHeight = sizeResult[1]; this->_windowPosX = 8; this->_windowPosY = 0x20; this->_consoleFont = 0; this->_enableFadedConsoleDisplay = 0; this->_enableSaveCommandHistory = 1; this->_enableBorderlessFullscreen = 0; this->_enableEpicOverlay = 1; this->_eosCrossplay = 0; this->_acceptedPublicBeta_VERSION = 0; this->_acceptedDataCollectionDisclaimer = 0; if ((this->_optionsIniFilePath)._capacity < 0x10) { (this->_optionsIniFilePath)._size = 0; (this->_optionsIniFilePath)._buf[0] = '\0'; return; } (this->_optionsIniFilePath)._size = 0; **GHIDRA_CAST((this->_optionsIniFilePath)._buf) = 0; return; } // 00924180 void OptionsConfig::load_config_ini() { uint8_t isEnabled; uint32_t uVar1; uint8_t *extraout_EAX; uint8_t *pathText; int *file; int fileSize; void *pvVar2; uint32_t uVar3; void *keyValues [2]; void *redirectedPath [4]; float local_34; float local_30; std_string configName; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; Manager *manager; manager = g_manager; puStack_c = &LAB_00b0a77d; local_10 = ExceptionList; uVar1 = __security_cookie ^ GHIDRA_UINT(&(&configName)[1]._size); ExceptionList = &local_10; this->_enableColorCorrection = 1; this->_enableLighting = 1; this->_enableShockwave = 1; this->_enableCaustics = 1; this->_enableFilter = 1; this->_enablePixelation = 1; this->_enableBloom = 1; this->_enableWaterSurface = 1; this->_enableInterpolation = 1; this->_getsSetToEnableWaterSurface = 1; this->_enableColorModifier = 1; configName._capacity = 0xf; configName._size = 10; builtin_strncpy(configName._buf,"config.ini",0xb); local_8 = 0; local_14 = uVar1; ModManager::TryRedirectPath (GHIDRA_CAST(&manager->_modManager),GHIDRA_CAST(redirectedPath),&configName); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; pathText = extraout_EAX; if (0xf < *GHIDRA_CAST((extraout_EAX + 0x14))) { pathText = *GHIDRA_CAST(extraout_EAX); } file = (GHIDRA_CAST((&PTR_vftable_00c37a10)))->FileSystem::Open(pathText,GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; if (0xf < GHIDRA_UINT(local_30)) { uVar3 = GHIDRA_INT(local_30) + 1; pvVar2 = redirectedPath[0]; if (0xfff < uVar3) { pvVar2 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4); uVar3 = GHIDRA_INT(local_30) + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_009242ab; } operator_delete(pvVar2,uVar3); } local_8 = -1; local_34 = 0.0; local_30 = 2.10195e-44; redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00); if (0xf < configName._capacity) { uVar3 = configName._capacity + 1; pvVar2 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)configName._buf)) + 0x0))); if (0xfff < uVar3) { pvVar2 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(configName._buf)) + 0x0))) + -4); uVar3 = configName._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(configName._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar2))))) { LAB_009242ab: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar2,uVar3); } if (file != GHIDRA_CAST(0x0)) { fileSize = (**(code **)(*file + 4))(uVar1); pvVar2 = operator_new_tracked(fileSize + 1); *GHIDRA_CAST((GHIDRA_CAST(pvVar2) + fileSize)) = 0; (**(code **)(*file + 0x14))(pvVar2,1,fileSize); (**(code **)*file)(1); keyvalue_map_parse(pvVar2); local_8 = 3; tracked_alloc(1,pvVar2,0); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),2); isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableColorCorrection"),1); this->_enableColorCorrection = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableCaustics"),1); this->_enableCaustics = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableShockwave"),1); this->_enableShockwave = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableLighting"),1); this->_enableLighting = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableFilter"),1); this->_enableFilter = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnablePixelation"),1); this->_enablePixelation = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableBloom"),1); this->_enableBloom = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableWaterSurface"),1); this->_enableWaterSurface = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableInterpolation"),1); this->_enableInterpolation = isEnabled; isEnabled = read_bool(GHIDRA_CAST(keyValues),GHIDRA_CAST("EnableColorModifier"),1); this->_enableColorModifier = isEnabled; this->_getsSetToEnableWaterSurface = this->_enableWaterSurface; FUN_00431200(keyValues,*GHIDRA_CAST((GHIDRA_INT(keyValues[0]) + 4))); operator_delete(keyValues[0],0x40); } ExceptionList = local_10; return; } // 00924440 void OptionsConfig::Load(uint8_t *path) { OptionsConfig *this_00; uint8_t isMusicEnabled; int *piVar1; int iVar2; void *fileText; int iVar3; uint8_t *pbVar4; uint8_t *******compareCursor; int unused; int unused_00; int unused_01; uint32_t uVar5; uint8_t *******pppppppbVar6; bool isLess; float in_XMM0_Da; int windowSize; uint8_t *******local_7c; OptionsConfig *config; uint8_t *local_74; uint8_t isLegacyPath; uint8_t *******local_6c [2]; uint8_t *searchText; float searchTextSize; float searchTextCapacity; uint8_t *******legacyPath [4]; int *legacyPathSize; float legacyPathCapacity; uint8_t betaKey [32]; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; Manager *manager; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xff; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))) = 0xff; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x2))) = 0xff; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x3))) = 0xff; puStack_c = &LAB_00b0a7cd; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((betaKey + 0x30)); ExceptionList = &local_10; local_74 = path; config = this; reset_defaults(this,local_14); pbVar4 = path; do { isMusicEnabled = *pbVar4; pbVar4 = pbVar4 + 1; } while (isMusicEnabled != 0); (GHIDRA_CAST((GHIDRA_CAST(this))))->msvc::string::assign(path,GHIDRA_INT(pbVar4) - GHIDRA_INT((path + 1))); piVar1 = (GHIDRA_CAST((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_read(path); isLegacyPath = 0; local_7c = GHIDRA_CAST(piVar1); if (piVar1 == GHIDRA_CAST(0x0)) { legacyPathCapacity = 2.10195e-44; legacyPath[0] = GHIDRA_CAST(0x0); pbVar4 = local_74; do { isMusicEnabled = *pbVar4; pbVar4 = pbVar4 + 1; } while (isMusicEnabled != 0); legacyPathSize = piVar1; (GHIDRA_CAST((GHIDRA_CAST(legacyPath))))->msvc::string::assign(local_74,GHIDRA_INT(pbVar4) - GHIDRA_INT((local_74 + 1))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x2))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x3))) = 0; local_74 = msvc::_Allocate(0x20); searchTextSize = 3.92364e-44; searchTextCapacity = 4.34403e-44; local_74[0] = 'B'; local_74[1] = 'i'; local_74[2] = 'n'; local_74[3] = 'd'; local_74[4] = 'i'; local_74[5] = 'n'; local_74[6] = 'g'; local_74[7] = ' '; local_74[8] = 'o'; local_74[9] = 'f'; local_74[10] = ' '; local_74[0xb] = 'I'; local_74[0xc] = 's'; local_74[0xd] = 'a'; local_74[0xe] = 'a'; local_74[0xf] = 'c'; in_XMM0_Da = 2.838854e+29; local_74[0x10] = 0x20; local_74[0x11] = 0x52; local_74[0x12] = 0x65; local_74[0x13] = 0x70; local_74[0x14] = 0x65; local_74[0x15] = 0x6e; local_74[0x16] = 0x74; local_74[0x17] = 0x61; local_74[0x18] = 'n'; local_74[0x19] = 'c'; local_74[0x1a] = 'e'; local_74[0x1b] = '+'; local_74[0x1c] = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; local_7c = GHIDRA_CAST(legacyPath); if (0xf < GHIDRA_UINT(legacyPathCapacity)) { local_7c = legacyPath[0]; } searchText = local_74; if (GHIDRA_CAST(0x1b) < legacyPathSize) { piVar1 = GHIDRA_CAST(0xffffffff); if (legacyPathSize + -7 != GHIDRA_CAST(0xffffffff)) { piVar1 = legacyPathSize + -7; } isLegacyPath = *local_74; pppppppbVar6 = GHIDRA_CAST((GHIDRA_INT(piVar1) + GHIDRA_INT(local_7c))); LAB_00924554: if (*GHIDRA_CAST(pppppppbVar6) != isLegacyPath) { LAB_009245a7: if (pppppppbVar6 == local_7c) goto LAB_009245c8; pppppppbVar6 = GHIDRA_CAST((GHIDRA_INT(pppppppbVar6) + -1)); goto LAB_00924554; } uVar5 = 0x18; compareCursor = pppppppbVar6; pbVar4 = local_74; do { if (*compareCursor != *GHIDRA_CAST(pbVar4)) { isMusicEnabled = (uint8_t)*compareCursor; isLess = isMusicEnabled < *pbVar4; if ((((isMusicEnabled == *pbVar4) && (isLess = *GHIDRA_CAST((GHIDRA_CAST(compareCursor) + 1)) < pbVar4[1], *GHIDRA_CAST((GHIDRA_CAST(compareCursor) + 1)) == pbVar4[1])) && (isLess = *GHIDRA_CAST((GHIDRA_CAST(compareCursor) + 2)) < pbVar4[2], *GHIDRA_CAST((GHIDRA_CAST(compareCursor) + 2)) == pbVar4[2])) && (isLess = *GHIDRA_CAST((GHIDRA_CAST(compareCursor) + 3)) < pbVar4[3], *GHIDRA_CAST((GHIDRA_CAST(compareCursor) + 3)) == pbVar4[3])) { uVar5 = 0; } else { uVar5 = -GHIDRA_UINT(isLess) | 1; } goto LAB_0092459a; } compareCursor = compareCursor + 1; pbVar4 = pbVar4 + 4; isLess = 3 < uVar5; uVar5 = uVar5 - 4; } while (isLess); uVar5 = 0; LAB_0092459a: if (uVar5 != 0) goto LAB_009245a7; if (GHIDRA_INT(pppppppbVar6) - GHIDRA_INT(local_7c) != 0xffffffff) { msvc::string::replace (GHIDRA_CAST(legacyPath),GHIDRA_INT(pppppppbVar6) - GHIDRA_INT(local_7c),0x1c, GHIDRA_CAST("Binding of Isaac Afterbirth+"),0x1c); } LAB_009245c8: this = config; } pppppppbVar6 = GHIDRA_CAST(legacyPath); if (0xf < GHIDRA_UINT(legacyPathCapacity)) { pppppppbVar6 = legacyPath[0]; } piVar1 = (GHIDRA_CAST((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_read(GHIDRA_CAST(pppppppbVar6)); local_7c = GHIDRA_CAST(piVar1); if (piVar1 == GHIDRA_CAST(0x0)) { Save(this); operator_delete(local_74,0x20); if (GHIDRA_UINT(legacyPathCapacity) < 0x10) { ExceptionList = local_10; return; } uVar5 = GHIDRA_INT(legacyPathCapacity) + 1; local_6c[0] = legacyPath[0]; if (0xfff < uVar5) { local_6c[0] = GHIDRA_CAST(legacyPath[0][-1]); uVar5 = GHIDRA_INT(legacyPathCapacity) + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(legacyPath[0]) + (-4 - GHIDRA_INT(local_6c[0]))))) { LAB_0092466d: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } goto LAB_00924ce7; } isLegacyPath = 1; operator_delete(local_74,0x20); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xff; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))) = 0xff; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x2))) = 0xff; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x3))) = 0xff; if (0xf < GHIDRA_UINT(legacyPathCapacity)) { uVar5 = GHIDRA_INT(legacyPathCapacity) + 1; pppppppbVar6 = legacyPath[0]; if (0xfff < uVar5) { pppppppbVar6 = GHIDRA_CAST(legacyPath[0][-1]); uVar5 = GHIDRA_INT(legacyPathCapacity) + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(legacyPath[0]) + (-4 - GHIDRA_INT(pppppppbVar6))))) goto LAB_0092466d; } operator_delete(pppppppbVar6,uVar5); } legacyPathSize = GHIDRA_CAST(0x0); legacyPathCapacity = 2.10195e-44; legacyPath[0] = GHIDRA_CAST((GHIDRA_UINT(legacyPath[0]) & 0xffffff00)); } iVar2 = (**(code **)(*piVar1 + 4))(); fileText = operator_new_tracked(iVar2 + 1); pppppppbVar6 = local_7c; *GHIDRA_CAST((GHIDRA_CAST(fileText) + iVar2)) = 0; (**(code **)(GHIDRA_INT(*local_7c) + 0x14))(fileText,1,iVar2); (*(code *)**pppppppbVar6)(1); keyvalue_map_parse(fileText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 3; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x2))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x3))) = 0; tracked_alloc(1,fileText,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 2; FUN_00684130("Language",0); (GHIDRA_CAST((g_manager)))->Manager::validate_language(unused); FUN_006843a0("MusicVolume"); this_00 = config; manager = g_manager; config->_musicVolume = in_XMM0_Da; (manager->_musicManager)._isEnabled = 0.0 < in_XMM0_Da; (manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._volume = (manager->_optionsConfig)._musicVolume; (manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._targetVolume = (manager->_optionsConfig)._musicVolume; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("MusicEnabled"),1); if (isMusicEnabled == 0) { (g_manager->_musicManager)._isEnabled = 0; } FUN_006843a0("SFXVolume"); manager = g_manager; this_00->_sfxVolume = in_XMM0_Da; (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::ClearVolumeModifier(); FUN_006843a0("MapOpacity"); this_00->_mapOpacity = in_XMM0_Da; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("Filter"),0); this_00->_filterEnabled = isMusicEnabled; FUN_006843a0("Exposure"); this_00->_exposure = in_XMM0_Da; FUN_006843a0("Brightness"); this_00->_brightness = in_XMM0_Da; FUN_006843a0("Gamma"); this_00->_gamma = in_XMM0_Da; FUN_006843a0("Contrast"); this_00->_contrast = in_XMM0_Da; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("ControllerHotplug"),1); this_00->_controlHotplugEnabled = isMusicEnabled; if (isMusicEnabled != ((uint8_t)(DAT_00c57b1c >> 1) & 1)) { if (isMusicEnabled == 0) { DAT_00c57b1c = DAT_00c57b1c & 0xfffffffd; } else { (**(code **)(DAT_00c57b64 + 8))(FUN_00a220c0,2,0x1000,&PTR_vftable_00c57b18); DAT_00c57b1c = DAT_00c57b1c | 2; } } iVar2 = FUN_00684130("PopUps",1); this_00->_popupsMode = iVar2; iVar2 = FUN_00684130("CameraStyle",1); this_00->_cameraStyle = iVar2; iVar2 = FUN_00684130("ShowRecentItems",0); this_00->_historyHudMode = iVar2; FUN_006843a0("HudOffset"); this_00->_hudOffset = in_XMM0_Da; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("TryImportSave"),0); this_00->_tryImportSave = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("BossHpOnBottom"),1); this_00->_bossHpOnBottom = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("FoundHUD"),0); this_00->_enableFoundHUD = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("EnableMods"),1); this_00->_enableMods = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("RumbleEnabled"),1); this_00->_enableRumble = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("ChargeBars"),0); this_00->_enableChargeBars = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("BulletVisibility"),0); this_00->_enableBulletVisibility = isMusicEnabled; iVar2 = FUN_00684130("TouchMode",1); this_00->_touchMode = iVar2; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("AimLock"),1); this_00->_enableAimLock = isMusicEnabled; iVar2 = FUN_00684130("JacobEsauControls",1); this_00->_jacobEsauControls = iVar2; iVar2 = FUN_00684130("AscentVoiceOver",1); this_00->_ascentVoiceover = iVar2 != 0; iVar2 = FUN_00684130("OnlineHud",0); this_00->_onlineHud = iVar2; iVar3 = FUN_00684130("OnlinePlayerVolume",6); iVar2 = 0; if (0 < iVar3) { iVar2 = iVar3; } iVar3 = 10; if (iVar2 < 10) { iVar3 = iVar2; } this_00->_onlinePlayerVolume = iVar3; iVar3 = FUN_00684130("OnlinePlayerOpacity",10); iVar2 = 0; if (0 < iVar3) { iVar2 = iVar3; } iVar3 = 10; if (iVar2 < 10) { iVar3 = iVar2; } this_00->_onlinePlayerOpacity = iVar3; iVar2 = FUN_00684130("MultiplayerColorSet",0); this_00->_onlineColorSet = iVar2; iVar3 = FUN_00684130("OnlineInputDelay",3); iVar2 = 5; if (iVar3 < 5) { iVar2 = iVar3; } iVar3 = 1; if (1 < iVar2) { iVar3 = iVar2; } this_00->_onlineInputDelay = iVar3; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("ItemInfoDisplayEnabled"),0); this_00->_itemInfoDisplayEnabled = isMusicEnabled; sprintf(betaKey,GHIDRA_CAST("AcceptedPublicBeta_%s")); isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),betaKey,0); this_00->_acceptedPublicBeta_VERSION = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("AcceptedDataCollectionDisclaimer"),0) ; this_00->_acceptedDataCollectionDisclaimer = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("EnableDebugConsole"),0); this_00->_enableDebugConsole = isMusicEnabled; iVar2 = FUN_00684130("AnnouncerVoiceMode",0); this_00->_announcerVoiceMode = iVar2; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("OnlineChatEnabled"),1); this_00->_onlineChatEnabled = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("OnlineChatFilterEnabled"),1); this_00->_onlineFilterEnabled = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("StreamerMode"),0); this_00->_streamerMode = isMusicEnabled; iVar2 = FUN_00684130("MaxScale",99); this_00->_maxScale = iVar2; iVar2 = FUN_00684130("MaxRenderScale",2); this_00->_maxRenderScale = iVar2; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("VSync"),1); set_vsync(this_00,isMusicEnabled); isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("PauseOnFocusLost"),1); this_00->_enablePauseOnFocusLost = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("SteamCloud"),1); this_00->_enableSteamCloud = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("MouseControl"),0); this_00->_enableMouseControl = isMusicEnabled; glfwSetInputMode(g_glfwWindow,(isMusicEnabled != 0) + 0x34001); iVar2 = FUN_00684130("ConsoleFont",0); this_00->_consoleFont = iVar2; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("FadedConsoleDisplay"),0); this_00->_enableFadedConsoleDisplay = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("SaveCommandHistory"),1); this_00->_enableSaveCommandHistory = isMusicEnabled; isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("UseExclusiveFullscreen"),0); this_00->_enableBorderlessFullscreen = isMusicEnabled; piVar1 = glfw_get_window_size(&windowSize,unused_00); iVar2 = FUN_00684130("WindowWidth",*piVar1); this_00->_windowWidth = iVar2; piVar1 = glfw_get_window_size(&windowSize,unused_01); iVar2 = FUN_00684130("WindowHeight",piVar1[1]); this_00->_windowHeight = iVar2; iVar2 = FUN_00684130("WindowPosX",0); if ((iVar2 < 8) || (0xffff < iVar2)) { iVar2 = 8; } iVar3 = FUN_00684130("WindowPosY",0); if ((iVar3 < 8) || (0xffff < iVar3)) { iVar3 = 0x20; } this_00->_windowPosX = iVar2; this_00->_windowPosY = iVar3; glfw_set_window_pos(iVar2,iVar3); isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("Fullscreen"),0); set_fullscreen(this_00,isMusicEnabled); isMusicEnabled = read_bool(GHIDRA_CAST(local_6c),GHIDRA_CAST("EnableEpicOverlay"),1); this_00->_enableEpicOverlay = isMusicEnabled; iVar2 = FUN_00684130("EosCrossplay",0); this_00->_eosCrossplay = iVar2; if (isLegacyPath != 0) { this_00->_gamma = 1.0; this_00->_hudOffset = 1.0; } FUN_00431200(local_6c,local_6c[0][1]); uVar5 = 0x40; LAB_00924ce7: operator_delete(local_6c[0],uVar5); ExceptionList = local_10; return; } // 00924d10 void OptionsConfig::Save() { char cVar1; int *file; uint8_t *lineEnd; char *lineCursor; uint8_t abStackY_4a4 [128]; uint8_t abStack_31e [2]; uint8_t abStack_22e [2]; uint8_t abStack_1e6 [2]; uint8_t abStack_1b6 [2]; uint8_t abStack_19e [2]; uint32_t uStack_190; uint8_t auStack_174 [2]; uint8_t abStack_172 [6]; uint8_t abStack_16c [12]; uint8_t abStack_160 [12]; uint8_t abStack_154 [12]; uint8_t line [260]; uint32_t local_44; uint8_t lineChar; local_44 = __security_cookie ^ GHIDRA_UINT(auStack_174); if (0xf < (this->_optionsIniFilePath)._capacity) { this = *GHIDRA_CAST((this->_optionsIniFilePath)._buf); } file = (GHIDRA_CAST((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_write(GHIDRA_CAST(this),0); if (file == GHIDRA_CAST(0x0)) { uStack_190 = 0x924d6c; KAGE_LogMessage(1,GHIDRA_CAST("[warn] could not opn %s for writing. options will not be saved.\n")); return; } uStack_190 = 0x924d98; sprintf_s(line,0x100,GHIDRA_CAST("[Options]\r\n")); lineEnd = line; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); uStack_190 = 0x924dba; (**(code **)(*file + 0x1c))(); uStack_190 = *GHIDRA_CAST(&g_manager->_stringTable); sprintf_s(abStack_154,0x100,GHIDRA_CAST("Language=%d\r\n")); lineEnd = abStack_154; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); uStack_190 = GHIDRA_INT(lineEnd) - GHIDRA_INT((abStack_154 + 1)); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_160,0x100,GHIDRA_CAST("MusicVolume=%.4f\r\n")); lineEnd = abStack_160; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_16c,0x100,GHIDRA_CAST("MusicEnabled=%d\r\n")); lineEnd = abStack_16c; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(auStack_174 + -4,0x100,GHIDRA_CAST("SFXVolume=%.4f\r\n")); lineCursor = auStack_174 + -4; do { cVar1 = *lineCursor; lineCursor = lineCursor + 1; } while (cVar1 != '\0'); (**(code **)(*file + 0x1c))(); sprintf_s(auStack_174 + -0x10,0x100,GHIDRA_CAST("MapOpacity=%.4f\r\n")); lineCursor = auStack_174 + -0x10; do { cVar1 = *lineCursor; lineCursor = lineCursor + 1; } while (cVar1 != '\0'); (**(code **)(*file + 0x1c))(); sprintf_s(GHIDRA_CAST(&uStack_190),0x100,GHIDRA_CAST("Fullscreen=%d\r\n")); lineCursor = GHIDRA_CAST(&uStack_190); do { cVar1 = *lineCursor; lineCursor = lineCursor + 1; } while (cVar1 != '\0'); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_19e + 2,0x100,GHIDRA_CAST("Filter=%d\r\n")); lineEnd = abStack_19e + 2; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_19e + -10,0x100,GHIDRA_CAST("Exposure=%.4f\r\n")); lineEnd = abStack_19e + -10; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1b6 + 2,0x100,GHIDRA_CAST("Gamma=%.4f\r\n")); lineEnd = abStack_1b6 + 2; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1b6 + -10,0x100,GHIDRA_CAST("ControllerHotplug=%d\r\n")); lineEnd = abStack_1b6 + -10; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1b6 + -0x16,0x100,GHIDRA_CAST("PopUps=%d\r\n")); lineEnd = abStack_1b6 + -0x16; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1e6 + 0xe,0x100,GHIDRA_CAST("CameraStyle=%d\r\n")); lineEnd = abStack_1e6 + 0xe; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1e6 + 2,0x100,GHIDRA_CAST("ShowRecentItems=%d\r\n")); lineEnd = abStack_1e6 + 2; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1e6 + -10,0x100,GHIDRA_CAST("HudOffset=%.4f\r\n")); lineEnd = abStack_1e6 + -10; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1e6 + -0x16,0x100,GHIDRA_CAST("TryImportSave=%d\r\n")); lineEnd = abStack_1e6 + -0x16; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_1e6 + -0x22,0x100,GHIDRA_CAST("FoundHUD=%d\r\n")); lineEnd = abStack_1e6 + -0x22; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + 0x1a,0x100,GHIDRA_CAST("EnableMods=%d\r\n")); lineEnd = abStack_22e + 0x1a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + 0xe,0x100,GHIDRA_CAST("RumbleEnabled=%d\r\n")); lineEnd = abStack_22e + 0xe; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + 2,0x100,GHIDRA_CAST("ChargeBars=%d\r\n")); lineEnd = abStack_22e + 2; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -10,0x100,GHIDRA_CAST("BulletVisibility=%d\r\n")); lineEnd = abStack_22e + -10; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x16,0x100,GHIDRA_CAST("TouchMode=%d\r\n")); lineEnd = abStack_22e + -0x16; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x22,0x100,GHIDRA_CAST("AimLock=%d\r\n")); lineEnd = abStack_22e + -0x22; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x2e,0x100,GHIDRA_CAST("JacobEsauControls=%d\r\n")); lineEnd = abStack_22e + -0x2e; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x3a,0x100,GHIDRA_CAST("AscentVoiceOver=%d\r\n")); lineEnd = abStack_22e + -0x3a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x46,0x100,GHIDRA_CAST("OnlineHud=%d\r\n")); lineEnd = abStack_22e + -0x46; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x52,0x100,GHIDRA_CAST("StreamerMode=%d\r\n")); lineEnd = abStack_22e + -0x52; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x5e,0x100,GHIDRA_CAST("OnlinePlayerVolume=%d\r\n")); lineEnd = abStack_22e + -0x5e; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x6a,0x100,GHIDRA_CAST("OnlinePlayerOpacity=%d\r\n")); lineEnd = abStack_22e + -0x6a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_22e + -0x76,0x100,GHIDRA_CAST("OnlineChatEnabled=%d\r\n")); lineEnd = abStack_22e + -0x76; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x6e,0x100,GHIDRA_CAST("OnlineChatFilterEnabled=%d\r\n")); lineEnd = abStack_31e + 0x6e; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x62,0x100,GHIDRA_CAST("MultiplayerColorSet=%d\r\n")); lineEnd = abStack_31e + 0x62; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x56,0x100,GHIDRA_CAST("OnlineInputDelay=%d\r\n")); lineEnd = abStack_31e + 0x56; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x4a,0x100,GHIDRA_CAST("ItemInfoDisplayEnabled=%d\r\n")); lineEnd = abStack_31e + 0x4a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x3e,0x100,GHIDRA_CAST("AcceptedPublicBeta_%s=%d\r\n")); lineEnd = abStack_31e + 0x3e; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x32,0x100,GHIDRA_CAST("AcceptedDataCollectionDisclaimer=%d\r\n")); lineEnd = abStack_31e + 0x32; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x26,0x100,GHIDRA_CAST("EnableDebugConsole=%d\r\n")); lineEnd = abStack_31e + 0x26; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0x1a,0x100,GHIDRA_CAST("MaxScale=%d\r\n")); lineEnd = abStack_31e + 0x1a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 0xe,0x100,GHIDRA_CAST("MaxRenderScale=%d\r\n")); lineEnd = abStack_31e + 0xe; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + 2,0x100,GHIDRA_CAST("VSync=%d\r\n")); lineEnd = abStack_31e + 2; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -10,0x100,GHIDRA_CAST("PauseOnFocusLost=%d\r\n")); lineEnd = abStack_31e + -10; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x16,0x100,GHIDRA_CAST("SteamCloud=%d\r\n")); lineEnd = abStack_31e + -0x16; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x22,0x100,GHIDRA_CAST("MouseControl=%d\r\n")); lineEnd = abStack_31e + -0x22; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x2e,0x100,GHIDRA_CAST("BossHpOnBottom=%d\r\n")); lineEnd = abStack_31e + -0x2e; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x3a,0x100,GHIDRA_CAST("AnnouncerVoiceMode=%d\r\n")); lineEnd = abStack_31e + -0x3a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x46,0x100,GHIDRA_CAST("ConsoleFont=%d\r\n")); lineEnd = abStack_31e + -0x46; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x52,0x100,GHIDRA_CAST("FadedConsoleDisplay=%d\r\n")); lineEnd = abStack_31e + -0x52; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x5e,0x100,GHIDRA_CAST("SaveCommandHistory=%d\r\n")); lineEnd = abStack_31e + -0x5e; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x6a,0x100,GHIDRA_CAST("WindowWidth=%d\r\n")); lineEnd = abStack_31e + -0x6a; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(abStack_31e + -0x76,0x100,GHIDRA_CAST("WindowHeight=%d\r\n")); lineEnd = abStack_31e + -0x76; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(); sprintf_s(GHIDRA_CAST((GHIDRA_INT(register0x00000010) + -0x3a0)),0x100,GHIDRA_CAST("WindowPosX=%d\r\n")); lineCursor = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + -0x3a0)); do { cVar1 = *lineCursor; lineCursor = lineCursor + 1; } while (cVar1 != '\0'); (**(code **)(*file + 0x1c))(GHIDRA_INT(register0x00000010) + -0x3a0,1); sprintf_s(abStackY_4a4 + 0xf8,0x100,GHIDRA_CAST("WindowPosY=%d\r\n")); lineEnd = abStackY_4a4 + 0xf8; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xf8,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xf9))); sprintf_s(abStackY_4a4 + 0xec,0x100,GHIDRA_CAST("UseExclusiveFullscreen=%d\r\n")); lineEnd = abStackY_4a4 + 0xec; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xec,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xed))); sprintf_s(abStackY_4a4 + 0xe0,0x100,GHIDRA_CAST("EnableEpicOverlay=%d\r\n")); lineEnd = abStackY_4a4 + 0xe0; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xe0,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xe1))); sprintf_s(abStackY_4a4 + 0xd4,0x100,GHIDRA_CAST("EosCrossplay=%d\r\n")); lineEnd = abStackY_4a4 + 0xd4; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(abStackY_4a4 + 0xd4,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xd5))); sprintf_s(abStackY_4a4 + 200,0x100,&DAT_00b657f8); lineEnd = abStackY_4a4 + 200; do { lineChar = *lineEnd; lineEnd = lineEnd + 1; } while (lineChar != 0); (**(code **)(*file + 0x1c))(abStackY_4a4 + 200,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xc9))); (**(code **)*file)(1); return; } // 00925c00 void OptionsConfig::SetMusicVolume(float volume) { Manager *manager; manager = g_manager; this->_musicVolume = volume; (manager->_musicManager)._isEnabled = 0.0 < volume; (manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._volume = (manager->_optionsConfig)._musicVolume; (manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._targetVolume = (manager->_optionsConfig)._musicVolume; return; } // 00925c60 void OptionsConfig::set_fullscreen(uint8_t isFullscreen) { int windowWidth; int windowHeight; this->_isFullscreen = isFullscreen; KAGE_Graphics::set_fullscreen(isFullscreen,this->_enableBorderlessFullscreen); if (this->_isFullscreen == 0) { windowWidth = this->_windowWidth; windowHeight = this->_windowHeight; FUN_00a19450(&windowWidth); glfw_set_window_pos(this->_windowPosX,this->_windowPosY); glfwSetInputMode(g_glfwWindow,(this->_enableMouseControl != 0) + 0x34001); } return; } // 00925ce0 void OptionsConfig::set_vsync(uint32_t param_2) { void *pvVar1; uint32_t videoMode; int isModeOk; uint8_t isVsync; float hzRatio; float hzDeviation; this->_enableVSync = (uint8_t)param_2; isVsync = (uint8_t)param_2; if ((uint8_t)param_2 != 0) { pvVar1 = window_get_current_monitor(&DAT_00c798e0); if (pvVar1 == (void *)0x0) { _wassert(L"monitor != NULL", L"C:\\nicalis\\builderbob\\projects\\KAGE\\Source\\Platforms\\PC\\Shared\\Source\\External\\gl\\GLFW_3.4\\src\\monitor.c" ,0x1c1); } if (_glfw == 0) { _glfwInputError(0x10001,0); videoMode = 0; } else { isModeOk = (*DAT_00c736fc)(pvVar1,GHIDRA_INT(pvVar1) + 0x98U); videoMode = -GHIDRA_UINT((isModeOk != 0)) & GHIDRA_INT(pvVar1) + 0x98U; } hzRatio = (float)*GHIDRA_CAST((videoMode + 0x14)) / 60.0; FUN_00925f30(); hzDeviation = 1.0 - hzRatio; if (hzRatio <= 1.0 - hzRatio) { hzDeviation = hzRatio; } if (0.04 < hzDeviation) { KAGE_LogMessage(1,GHIDRA_CAST("Display Hz: %d, Target: 60.. disabling vsync for this session.\n")); param_2 = param_2 & 0xffffff00; isVsync = 0; } } if (isVsync != ((uint8_t)(g_graphicsManager_flags >> 9) & 1)) { if (isVsync == 0) { g_graphicsManager_flags = g_graphicsManager_flags & 0xfffffdff; } else { g_graphicsManager_flags = g_graphicsManager_flags | 0x200; } FUN_00a1a470(param_2); } return; }