# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 18 -MinLength 18
Edit-PatchBinary -FilePath "$InstallDirectory\profile.bin" -Offset 0x4 -Data $bytes
Write-ReplaceContentInFile -Pattern '^name00=(.+)' -Substitution "name00=$NewPlayerAlias" -FilePath "$InstallDirectory\starlancer.ini"
Write-ReplaceContentInFile -Pattern '^name01=(.+)' -Substitution "name01=$NewPlayerAlias" -FilePath "$InstallDirectory\starlancer.ini"