$Display = Get-PrimaryDisplay
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" -Name "$InstallDirectory\amrts.exe" -Value "~ DWM8And16BitMitigation HIGHDPIAWARE WIN98" -Force
Write-ReplaceContentInFile -Pattern '^Resolution.+' -Substitution "Resolution = h:$($Display.Bounds.Width), v:$($Display.Bounds.Height)" -FilePath "$InstallDirectory\dgVoodoo.conf"
Write-ReplaceContentInFile -Pattern '^dgVoodooWatermark.+' -Substitution "dgVoodooWatermark = false" -FilePath "$InstallDirectory\dgVoodoo.conf"
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 16 -MinLength 16
Edit-PatchBinary -FilePath "$InstallDirectory\user\data.cfg" -Offset 0x1C28 -Data $bytes