Hexadecimal Decoding

I have .bin saved using VB program, .bin format:

String bytes | String
06 00        | C0 E1 E0 E8 F1 E0

The problem is that I do not know how the string is encoded. I know the line should be:Abaira

Can anyone recognize the encoding used?

+4
source share
1 answer

I do not know any standard encoding for this. This is not ASCII and EBCDIC.

It seems to be some kind of trivial type of 8-bit (not Unicode) ASCII (possibly ANSI) encryption. Compare unknown encoding with ASCII:

  Unknown        ASCII
  Hex MSB  LSB   Hex MSB  LSB
A CO  1100 0000  41  0100 0001 
b E1  1110 0001  62  0110 0010
a E0  1110 0000  61  0110 0001
i E8  1110 1000  69  0110 1001
r F1  1111 0001  72  0111 0010
a E0  1110 0000  61  0110 0001

Let define:

  • MSB: First nibble = most significant 4 bits
  • LSB: second nibble = least significant 4 bits
  • _U: of Unknown
  • _A: from ASCII

Then you will find:

  • MSB_U = MSB_A Xor 0x80 (, MSB_A 0x80)
  • LSB_U = LSB_A + 1 ( , , ASCII char 'O' 'o')
  • U MSB_U LSB_U.

ASCII Unknown:

ASCII Hex MSB  LSB   MSB Xor 0x80  LSB - 1  Concatenated Hex
H     48  0100 1000  1100          1001     1100 0111    C7
e     65  0110 1001  1110          1010     1110 1000    E8
r     72  0111 0010  1111          0011     1111 0001    F1 (as you have shown)
b     62  0110 0010  1110          0011     1110 0001    E1 (do.)
+3

Source: https://habr.com/ru/post/1658827/


All Articles