This commit is contained in:
love-code-yeyixiao 2024-07-30 20:52:12 +08:00
parent 4bf4bf62e0
commit 4b47197b0a
1 changed files with 3 additions and 3 deletions

View File

@ -1643,7 +1643,7 @@ _FX BOOLEAN Custom_ProductID(void) {
status = Key_OpenIfBoxed(&hKey, KEY_SET_VALUE, &objattrs);
if (NT_SUCCESS(status)) {
UNICODE_STRING buf;
//UNICODE_STRING buf;
WCHAR* tmp = Dll_Alloc(24);
memset(tmp, 0, 24);
@ -1656,7 +1656,7 @@ _FX BOOLEAN Custom_ProductID(void) {
chain4 = my_rand() % 100000 + 99999
;
Sbie_snwprintf(tmp, 23, L"%i-%i-%i-%i", chain1, chain2, chain3, chain4);
RtlInitUnicodeString(&buf, tmp);
//RtlInitUnicodeString(&buf, tmp);
/*if (GetIntLen(dwTick) == 1) {
//DWORD last = dwTick - (dwTick / 10) * 10;
DWORD last = dwTick;
@ -1675,7 +1675,7 @@ _FX BOOLEAN Custom_ProductID(void) {
}*/
status = NtSetValueKey(
hKey, &uni, 0, REG_SZ, buf, sizeof(buf));
hKey, &uni, 0, REG_SZ, tmp, sizeof(tmp));
NtClose(hKey);
Dll_Free(tmp);