OP 18 April, 2023 - 04:53 PM
(This post was last modified: 18 April, 2023 - 04:53 PM by PhoenixUG9.)
$hkey,
$lpClass,
[ref]$lpcbClass,
0x0,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[IntPtr]::Zero))
$des_str_1 = 3,2,1,0,3,2,1 | % {[Convert]::ToByte("$($rid[$_*2])$($rid[$_*2+1])", 16)}
$des_str_2 = 0,3,2,1,0,3,2 | % {[Convert]::ToByte("$($rid[$_*2])$($rid[$_*2+1])", 16)}
$des_key_1 = str_to_key($des_str_1)
$des_key_2 = str_to_key($des_str_2)
$odd_parity = @(
1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14,
16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 26, 26, 28, 28, 31, 31,
32, 32, 35, 35, 37, 37, 38, 38, 41, 41, 42, 42, 44, 44, 47, 47,
49, 49, 50, 50, 52, 52, 55, 55, 56, 56, 59, 59, 61, 61, 62, 62,
64, 64, 67, 67, 69, 69, 70, 70, 73, 73, 74, 74, 76, 76, 79, 79,
81, 81, 82, 82, 84, 84, 87, 87, 88, 88, 91, 91, 93, 93, 94, 94,
97, 97, 98, 98,100,100,103,103,104,104,107,107,109,109,110,110,
112,112,115,115,117,117,118,118,121,121,122,122,124,124,127,127,
128,128,131,131,133,133,134,134,137,137,138,138,140,140,143,143,
145,145,146,146,148,148,151,151,152,152,155,155,157,157,158,158,
161,161,162,162,164,164,167,167,168,168,171,171,173,173,174,174,
176,176,179,179,181,181,182,182,185,185,186,186,188,188,191,191,
193,193,194,194,196,196,199,199,200,200,203,203,205,205,206,206,
208,208,211,211,213,213,214,214,217,217,218,218,220,220,223,223,
224,224,227,227,229,229,230,230,233,233,234,234,236,236,239,239,
241,241,242,242,244,244,247,247,248,248,251,251,253,253,254,254)
$key = @()
$key += bitshift $s[0] -1
$key += (bitshift ($s[0] -band 0x01) 6) -bor (bitshift $s[1] -2)
$key += (bitshift ($s[1] -band 0x03) 5) -bor (bitshift $s[2] -3)
$key += (bitshift ($s[2] -band 0x07) 4) -bor (bitshift $s[3] -4)
$key += (bitshift ($s[3] -band 0x0F) 3) -bor (bitshift $s[4] -5)
$key += (bitshift ($s[4] -band 0x1F) 2) -bor (bitshift $s[5] -6)
$key += (bitshift ($s[5] -band 0x3F) 1) -bor (bitshift $s[6] -7)
$key += $s[6] -band 0x7F
$key[0] = $odd_parity[(bitshift $key[0] 1)]
$key[1] = $odd_parity[(bitshift $key[1] 1)]
$key[2] = $odd_parity[(bitshift $key[2] 1)]
$key[3] = $odd_parity[(bitshift $key[3] 1)]
$key[4] = $odd_parity[(bitshift $key[4] 1)]
$key[5] = $odd_parity[(bitshift $key[5] 1)]
$key[6] = $odd_parity[(bitshift $key[6] 1)]
$key[7] = $odd_parity[(bitshift $key[7] 1)]
$key
This is a bump
$lpClass,
[ref]$lpcbClass,
0x0,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[ref]$null,
[IntPtr]::Zero))
$des_str_1 = 3,2,1,0,3,2,1 | % {[Convert]::ToByte("$($rid[$_*2])$($rid[$_*2+1])", 16)}
$des_str_2 = 0,3,2,1,0,3,2 | % {[Convert]::ToByte("$($rid[$_*2])$($rid[$_*2+1])", 16)}
$des_key_1 = str_to_key($des_str_1)
$des_key_2 = str_to_key($des_str_2)
$odd_parity = @(
1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14,
16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 26, 26, 28, 28, 31, 31,
32, 32, 35, 35, 37, 37, 38, 38, 41, 41, 42, 42, 44, 44, 47, 47,
49, 49, 50, 50, 52, 52, 55, 55, 56, 56, 59, 59, 61, 61, 62, 62,
64, 64, 67, 67, 69, 69, 70, 70, 73, 73, 74, 74, 76, 76, 79, 79,
81, 81, 82, 82, 84, 84, 87, 87, 88, 88, 91, 91, 93, 93, 94, 94,
97, 97, 98, 98,100,100,103,103,104,104,107,107,109,109,110,110,
112,112,115,115,117,117,118,118,121,121,122,122,124,124,127,127,
128,128,131,131,133,133,134,134,137,137,138,138,140,140,143,143,
145,145,146,146,148,148,151,151,152,152,155,155,157,157,158,158,
161,161,162,162,164,164,167,167,168,168,171,171,173,173,174,174,
176,176,179,179,181,181,182,182,185,185,186,186,188,188,191,191,
193,193,194,194,196,196,199,199,200,200,203,203,205,205,206,206,
208,208,211,211,213,213,214,214,217,217,218,218,220,220,223,223,
224,224,227,227,229,229,230,230,233,233,234,234,236,236,239,239,
241,241,242,242,244,244,247,247,248,248,251,251,253,253,254,254)
$key = @()
$key += bitshift $s[0] -1
$key += (bitshift ($s[0] -band 0x01) 6) -bor (bitshift $s[1] -2)
$key += (bitshift ($s[1] -band 0x03) 5) -bor (bitshift $s[2] -3)
$key += (bitshift ($s[2] -band 0x07) 4) -bor (bitshift $s[3] -4)
$key += (bitshift ($s[3] -band 0x0F) 3) -bor (bitshift $s[4] -5)
$key += (bitshift ($s[4] -band 0x1F) 2) -bor (bitshift $s[5] -6)
$key += (bitshift ($s[5] -band 0x3F) 1) -bor (bitshift $s[6] -7)
$key += $s[6] -band 0x7F
$key[0] = $odd_parity[(bitshift $key[0] 1)]
$key[1] = $odd_parity[(bitshift $key[1] 1)]
$key[2] = $odd_parity[(bitshift $key[2] 1)]
$key[3] = $odd_parity[(bitshift $key[3] 1)]
$key[4] = $odd_parity[(bitshift $key[4] 1)]
$key[5] = $odd_parity[(bitshift $key[5] 1)]
$key[6] = $odd_parity[(bitshift $key[6] 1)]
$key[7] = $odd_parity[(bitshift $key[7] 1)]
$key
This is a bump