Disk Serial Number Spoof

This commit is contained in:
love-code-yeyixiao 2024-08-02 21:51:13 +08:00
parent 9cf01edc12
commit be5054123b
1 changed files with 10 additions and 1 deletions

View File

@ -516,6 +516,14 @@ _FX LANGID Kernel_GetSystemDefaultLangID()
return (LANGID)Kernel_CustomLCID;
}
static unsigned long seed = 1;
int my_rand(void)
{
seed = (seed * 214013L
+ 2531011L) >> 16;
return((unsigned)seed & 0x7fff);
}
//----------------------------------------------------------------------------
//Kernel_GetVolumeInformationByHandleW
//----------------------------------------------------------------------------
@ -534,7 +542,8 @@ _FX BOOL Kernel_GetVolumeInformationByHandleW(
if (lpVolumeSerialNumber == NULL)
return rtn;
else {
lpVolumeSerialNumber = NULL;
seed = __sys_GetTickCount();
*lpVolumeSerialNumber = my_rand()%0x10000;
return rtn;
}
}