def decrypt_hash_vista(edata, nlkm, ch):
 aes = AES.new(nlkm[16:32], AES.MODE_CBC, ch)
 out = ''
 for i in range(0, len(edata), 16):
  buf = edata[i:(i + 16)]
  if (len(buf) < 16):
   buf += ((16 - len(buf)) * '\x00')
  out += aes.decrypt(buf)
 return out

def decrypt_hash_vista ( edata , nlkm , ch ) : aes = AES . new ( nlkm [ 16 : 32 ] , AES . MODE_CBC , ch ) out = '' for i in range ( 0 , len ( edata ) , 16 ) : buf = edata [ i : ( i + 16 ) ] if ( len ( buf ) < 16 ) : buf += ( ( 16 - len ( buf ) ) * '\x00' ) out += aes . decrypt ( buf ) return out
based on code from URL .