Open erri120 opened 1 year ago
Hello @erri120, I used your findings and documentation from https://github.com/erri120/erri120.github.io/issues/45 to also look into this.
I'm not entirely sure yet, but I think for the Win32_BaseBoard SerialNumber
and Win32_BIOS SerialNumber
we could take a shortcut. It's possible to read those values using wmic
inside a wine prefix.
The hardware_key
needed to decrypt my IS file has these values mapped as follows:
baseBoardSerialNumber: 'Default string'
biosSerialNumber: '0'
As you already noticed it's not possible to get those values from linux without root. From my understanding wine
does not have root access and therefore shouldn't be able to access those information either.
That's why I'm pretty confident that those values are always the same in a wine environment.
Then we have the "volume serial number". This might also be rather simple. In my wine prefixes this is always 43000000
, which is hex representation for "C", the drive letter. This can be changed with winecfg
, but then the value will be stored in C:/.windows-serial
. So either we have this file, with the correct value or it's 43000000
.
Do you have the ability to check if my assumptions apply to a wine installation?
The easiest way to get Win32_Processor ProcessorId
might be to just dispatch the wmic
call inside the prefix.
The only major showstopper for me at this time is Win32_VideoController PNPDeviceId
. I can get this value with wmic
, but the resulting string does not match the required string, they differ. I'm still looking into how to get the correct value.
@Sajito thanks for looking into it!
My problem with Win32_VideoController PNPDeviceId
seems to be a dead end for me.
I used x64dbg to step through the program. The wmi query used to get the video devices is Select * from Win32_VideoController
. The value is retrieved at 000000006E786BD9
, as a template string though. The final value is present at 000000006E786BFA
.
I tried doing exactly the same, using a simple dotnet tool. Using System.Management
to query the video devices using the same query. Checked the PNPDeviceId
, getting the same as using wmic PATH Win32_VideoController get PNPDeviceId
.
But the id I retrieve is not the same id, which is retrieved inside EABackgroundService.exe, therefore unusable to create the correct hardware key.
Maybe someone else can pick up at this point...
Some more information here.
Win32_BaseBoard SerialNumber
is not always "Default string", so it must be read from somewhere.
Also I figured out why my PNPDeviceId is different than the one used by EA App. I have an Nvidia gpu, which is hidden by dxvk dxgi. So when EA App queries the PNPDeviceId for the gpu, then an amd card is reported instead of my actual gpu.
Though I don't know yet how to obtain the same PNPDeviceId as EA App.
This requires adding a new implementation of
IHardwareInfoProvider
. https://github.com/Jinjinov/Hardware.Info might be interesting. It's probably just easier to usewineconsole
.Win32_BaseBoard Manufacturer
ASRock
cat /sys/class/dmi/id/board_vendor
ASRock
Win32_BaseBoard SerialNumber
cat /sys/class/dmi/id/board_serial
root
Win32_BIOS Manufacturer
American Megatrends Inc.
cat /sys/class/dmi/id/bios_vendor
American Megatrends Inc.
Win32_BIOS SerialNumber
To Be Filled By O.E.M.
cat /sys/class/dmi/id/product_serial
To Be Filled By O.E.M.
root
C:\
drive7CB7433E
GetVolumeInformationW
Win32_VideoController PNPDeviceId
PCI\VEN_10DE&DEV_2486&SUBSYS_147A10DE&REV_A1\4&2283F625&0&0019
Win32_Processor Manufacturer
AuthenticAMD
grep -m1 ^"vendor_id" /proc/cpuinfo \| awk '{ print $3 }'
AuthenticAMD
Win32_Processor ProcessorId
178BFBFF00A20F10
Win32_Processor Name
AMD Ryzen 7 5800X 8-Core Processor
(total length: 47, has 13 white spaces at the end)grep -m1 ^"model name" /proc/cpuinfo \| awk '{ split($0,a,": ") ; print a[2] }'
AMD Ryzen 7 5800X 8-Core Processor