Jump to content

Regnum

Member
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Regnum

  • Rank
    New Member
  1. So that I'm prepared for next time (had to find out from a gamestop employee when I asked them for the Regigigas/Heatran code), does anyone know how Entei/Raikou and the rest of the events are being distributed.
  2. Is the Regigigas/Heatran event serial code the same for everyone? Turns out my Pokémon trainer club account didn’t have the receive newsletters option selected.
  3. Isn’t UInt16 suppose to be two bytes?
  4. I tried incrementing forward as you said and found that byter(z) = blocka(z) Xor rand() is equal to byter(z) = 0xAA60CFF and byter() is UInt16. So I changed byter(z) = block_(z) Xor rand() to byter(z) = CType((block_(z) Xor rand()), System.UInt16), now the function rand() is giving me the System.OverflowException error.
  5. It gave me 0x35C7F1EE, but the pk5 file in HxD says 0xEEF1C735.
  6. I tried that, but the error persists. I then tried: Private Sub toEnc() Dim myFile As String = OpenFileDialog1.FileName Dim myBytes As Byte() = My.Computer.FileSystem.ReadAllBytes(myFile) Dim txtTemp As New System.Text.StringBuilder() For Each myByte As Byte In myBytes txtTemp.Append(myByte.ToString("X2")) Next RichTextBox1.Text = txtTemp.ToString() Dim myData = RichTextBox1.Text Dim pkx As Byte() = HexStringToByteArray(myData) Dim ekx() As Byte = encrypt(pkx) End Sub Private Shared Function HexStringToByteArray(ByRef strInput As String) As Byte() Dim length As Integer Dim bOutput As Byte() Dim c(1) As Integer length = strInput.Length / 2 ReDim bOutput(length - 1) For i As Integer = 0 To (length - 1) For j As Integer = 0 To 1 c(j) = Asc(strInput.Chars(i * 2 + j)) If ((c(j) >= Asc("0")) And (c(j) <= Asc("9"))) Then c(j) = c(j) - Asc("0") ElseIf ((c(j) >= Asc("A")) And (c(j) <= Asc("F"))) Then c(j) = c(j) - Asc("A") + &HA ElseIf ((c(j) >= Asc("a")) And (c(j) <= Asc("f"))) Then c(j) = c(j) - Asc("a") + &HA End If Next j bOutput(i) = (c(0) * &H10 + c(1)) Next i Return (bOutput) End Function
  7. The file is being loaded with: Dim myFile = OpenFileDialog1.FileName Dim pkx() As Byte = My.Computer.FileSystem.ReadAllBytes(myFile) Dim ekx = encrypt(pkx)
  8. I keep getting a System.OverflowException at the Select Case firstblock.
  9. I was able to find this: PKM Encrypt.cs Problem is I don't understand C#.
  10. So like this: 'block shuffling stuff srnd(chksum) rand()
  11. So, where does the checksum come in?
  12. Thanks. Now, how do I use the formula, X[n+1] = (0x41C64E6D * X[n] + 0x6073), what do I put for X[n] and X[n+1]?
  13. I had looked at those, it’s that I don’t know how to apply the formulas written there.
  14. How do I convert *.pkx to *.ekx, x being 4, 5, 6, or 7? I'm trying to write a program in Visual Basic, and I need it to be able to encrypt *.pkx files into *.ekx files. The problem is I can't figure out how.
×