Joseph Wecker Descramble (This function is void) Lyrics

This function is void
It takes two args
The first is SEC, a pointer to a vector of 2048 unsigned bytes:
That are the encrypted disk sector and will be the decrypted

The second is KEY
A vector of 6 unsigned bytes:
The decrypted t__le key

Local variables t1 through t6 are unsigned ints
Local variable END is a pointer to SEC plus 2048

DMCA steps on me
I don't like the DMCA
It makes this song illegal
Ooh woe DMCA
It steps on me
It makes this song illegal
Makes this song illegal yeah

Retrieve byte zero of KEY
XOR it with byte 84 of SEC
And treat the result as an integer
OR it with the hexadecimal constant 0x100
And store the result in t1

Step 2:
Retrieve byte 1 of KEY
XOR it with byte 85 of SEC
And store the result in t2

Step 3:
Take bytes 2 through 5 of KEY
And XOR them with bytes 86 through 89 of SEC
Store the result in t3

Step 4:
Take the low-order three bits of t3
Which can be computed by the AND of t3 with the constant 7
And store the result in t4

I hate the DMCA
It makes this code I wrote
Aw, it makes it dumb
It makes it illegal
I hate the DMCA
It makes this stuff i wrote
Makes this song illegal
Makes this song illegal
It makes this song illegal

5:
Multiply t3 by 2, add 8, subtract t4
And store the result back in t3

Step 5-1/2:
Advance SEC by 128 bytes

Step 6:
Store 0 in t5

7:
Begin a WHILE loop

And 8:
Continue iterating while SEC does not equal END
Use t2 as an index into table CSStab2
And retrieve a byte which we'll call b1 and t1

[sic: no step 9]
Use t1 as an index into table CSStab3
And retrieve another byte
Which we'll call b2
Compute b1 XOR b2
And store the result in t4

Step 10 is:
Shift t1 right by one bit
And store the result in t2

Step 11:
Take the low-order bit of t1
Which can be obtained by taking the AND of t1 and the constant 1
Shift it [by] left by 8 bits and XOR it with t4
And store the results back in t1

Ooh, the DMCA
Hey, hey, is so dumb
Ahh, the DMCA
Is so dumb
Oh, it's so dumb

Step 12:
Use t4 as an index into table CSStab5
And retrieve a byte
Store the result in t4

-- Accelerando --

[sic: no step 13]
Shift the constant of t3 right by 3 bits
XOR it with t3 shift the result by right by one bit
XOR it with t3 shift the result right by eight bits
XOR it with t3 shift the result right by five bits
And extract the low-order byte by ANDing it
With the hexadecimal constant 0xff
Store the result in t6

Step 14:
Shift the contents of t3 left by 8 bits
OR it with t6
And store the result in t3

Step 15:
Use t6 as an index into table CSStab4
And retrieve a byte
Store the result in t6

Step 16:
Add together t6, t5, and t4
And store the result back into t5

Step 17:
Use the byte pointed to by SEC as an index into table CSStab1
Take the retrieved byte
And XOR it with the low-order byte of t5
Which can be extracted by ANDing t5 with the hexadecimal constant 0xff
Store the result back into the byte pointed to by SEC
And advance the pointer SEC by one byte

Step 18:
Shift t5 right by 8 bits and
And store the result back into t5

As step 19:
Return to step 8 to continue looping

And 20:
This is where we end up when the loop is complete

21:
Return from the procedure

Ahh, that's the end of descramble, folks, that's the end
That's the end of descramble, folks, the end
That's the end of descramble, folks, the end

Ahh, I hate the DMCA
I hate the DMCA
I hate the DMCA
The DMCA infringes on me
It steps on me
Steps on me
Steps on me
Ahh, I'm not free
It steps on me
I'm not free
Ahh, it steps on me
I'm not free

See also:

84
84.103
Klostertaler Ab in den urlaub Lyrics
Klostertaler Denn da wo Menschen sind Lyrics