const s11 = 7
const s12 = 12
const s13 = 17
const s14 = 22
const s21 = 5
const s22 = 9
const s23 = 14
const s24 = 20
const s31 = 4
const s32 = 11
const s33 = 16
const s34 = 23
const s41 = 6
const s42 = 10
const s43 = 15
const s44 = 21
x = converttowordarray(smessage)
a = &h67452301
b = &hefcdab89
c = &h98badcfe
d = &h10325476
for k = 0 to ubound(x) step 16
aa = a
bb = b
cc = c
dd = d
md5_ff a, b, c, d, x(k + 0), s11, &hd76aa478
md5_ff d, a, b, c, x(k + 1), s12, &he8c7b756
md5_ff c, d, a, b, x(k + 2), s13, &h242070db
md5_ff b, c, d, a, x(k + 3), s14, &hc1bdceee
md5_ff a, b, c, d, x(k + 4), s11, &hf57c0faf
md5_ff d, a, b, c, x(k + 5), s12, &h4787c62a
md5_ff c, d, a, b, x(k + 6), s13, &ha8304613
md5_ff b, c, d, a, x(k + 7), s14, &hfd469501
md5_ff a, b, c, d, x(k + 8), s11, &h698098d8
md5_ff d, a, b, c, x(k + 9), s12, &h8b44f7af
md5_ff c, d, a, b, x(k + 10), s13, &hffff5bb1
md5_ff b, c, d, a, x(k + 11), s14, &h895cd7be
md5_ff a, b, c, d, x(k + 12), s11, &h6b901122
md5_ff d, a, b, c, x(k + 13), s12, &hfd987193
md5_ff c, d, a, b, x(k + 14), s13, &ha679438e
md5_ff b, c, d, a, x(k + 15), s14, &h49b40821
md5_gg a, b, c, d, x(k + 1), s21, &hf61e2562
md5_gg d, a, b, c, x(k + 6), s22, &hc040b340
md5_gg c, d, a, b, x(k + 11), s23, &h265e5a51
md5_gg b, c, d, a, x(k + 0), s24, &he9b6c7aa
md5_gg a, b, c, d, x(k + 5), s21, &hd62f105d
md5_gg d, a, b, c, x(k + 10), s22, &h2441453
md5_gg c, d, a, b, x(k + 15), s23, &hd8a1e681
md5_gg b, c, d, a, x(k + 4), s24, &he7d3fbc8
md5_gg a, b, c, d, x(k + 9), s21, &h21e1cde6
md5_gg d, a, b, c, x(k + 14), s22, &hc33707d6
md5_gg c, d, a, b, x(k + 3), s23, &hf4d50d87
md5_gg b, c, d, a, x(k + 8), s24, &h455a14ed
md5_gg a, b, c, d, x(k + 13), s21, &ha9e3e905
md5_gg d, a, b, c, x(k + 2), s22, &hfcefa3f8
md5_gg c, d, a, b, x(k + 7), s23, &h676f02d9
md5_gg b, c, d, a, x(k + 12), s24, &h8d2a4c8a
md5_hh a, b, c, d, x(k + 5), s31, &hfffa3942
md5_hh d, a, b, c, x(k + 8), s32, &h8771f681
md5_hh c, d, a, b, x(k + 11), s33, &h6d9d6122
md5_hh b, c, d, a, x(k + 14), s34, &hfde5380c
md5_hh a, b, c, d, x(k + 1), s31, &ha4beea44
md5_hh d, a, b, c, x(k + 4), s32, &h4bdecfa9
md5_hh c, d, a, b, x(k + 7), s33, &hf6bb4b60
md5_hh b, c, d, a, x(k + 10), s34, &hbebfbc70
md5_hh a, b, c, d, x(k + 13), s31, &h289b7ec6
md5_hh d, a, b, c, x(k + 0), s32, &heaa127fa
md5_hh c, d, a, b, x(k + 3), s33, &hd4ef3085
md5_hh b, c, d, a, x(k + 6), s34, &h4881d05
md5_hh a, b, c, d, x(k + 9), s31, &hd9d4d039
md5_hh d, a, b, c, x(k + 12), s32, &he6db99e5
md5_hh c, d, a, b, x(k + 15), s33, &h1fa27cf8
md5_hh b, c, d, a, x(k + 2), s34, &hc4ac5665
md5_ii a, b, c, d, x(k + 0), s41, &hf4292244
md5_ii d, a, b, c, x(k + 7), s42, &h432aff97
md5_ii c, d, a, b, x(k + 14), s43, &hab9423a7
md5_ii b, c, d, a, x(k + 5), s44, &hfc93a039
md5_i