func:  SMBencrypt(unsigned char *passwd, const unsigned char *c8, unsigned char *p24) unsigned char p14 [ 14 ] , p16 [ 16 ] , p21 [ 21 ] ; memset ( p21 , '\0' , 21 ); memcpy ( p21 , p16 , 16 ); rc = E_P24 ( p21 , c8 , p24 ); static E_P24(unsigned char *p21, const unsigned char *c8, unsigned char *p24) rc = smbhash ( p24 , c8 , p21 ); static smbhash(unsigned char *out, const unsigned char *in, unsigned char *key) str_to_key ( key , key2 ); static str_to_key(unsigned char *str, unsigned char *key) key [ 0 ] = str [ 0 ] >> 1; key [ 1 ] = ( ( str [ 0 ] & 0x01 ) << 6 ) | ( str [ 1 ] >> 2 ); key [ 2 ] = ( ( str [ 1 ] & 0x03 ) << 5 ) | ( str [ 2 ] >> 3 ); key [ 3 ] = ( ( str [ 2 ] & 0x07 ) << 4 ) | ( str [ 3 ] >> 4 ); key [ 4 ] = ( ( str [ 3 ] & 0x0F ) << 3 ) | ( str [ 4 ] >> 5 ); key [ 5 ] = ( ( str [ 4 ] & 0x1F ) << 2 ) | ( str [ 5 ] >> 6 ); key [ 6 ] = ( ( str [ 5 ] & 0x3F ) << 1 ) | ( str [ 6 ] >> 7 ); key [ 7 ] = str [ 6 ] & 0x7F; key [ i ] = ( key [ i ] << 1 ); sg_init_one ( & sgin , in , 8 ); sg_init_one ( & sgout , out , 8 ); if ( rc )  return rc ; rc = smbhash ( p24 + 8 , c8 , p21 + 7 ); static smbhash(unsigned char *out, const unsigned char *in, unsigned char *key) str_to_key ( key , key2 ); sg_init_one ( & sgin , in , 8 ); sg_init_one ( & sgout , out , 8 ); if ( rc )  return rc ; rc = smbhash ( p24 + 16 , c8 , p21 + 14 ); static smbhash(unsigned char *out, const unsigned char *in, unsigned char *key) str_to_key ( key , key2 ); sg_init_one ( & sgin , in , 8 ); sg_init_one ( & sgout , out , 8 ); return rc ; return rc ; 