Hi, I did a translation test and here it is unfortunately it ends up garbage:
void ThreeDESdecrypt(unsigned char *cyphertext,unsigned long ctlen,unsigned char *passwd,unsigned long pwlen,unsigned char *plaintext,unsigned long *ptlen)
{
HCRYPTPROV hProv = NULL;
HCRYPTHASH hHash = NULL;
HCRYPTKEY hKey = NULL;
BYTE * value2 = {0};
DWORD lul_len, lul_buflen, lul_skip, lul_pflags;
bool lb_rtn;
BLOB lblob_data;
// value = reinterpret_cast<const BYTE *>(cyphertext);
TCHAR convertedStr[13];
convertedStr[0] = ('\0');
BYTE key1[24] = {0};
lul\_len = 13;
lul\_buflen = (lul\_len \* 2);
std::string value = "Zed5OmjUWs8=";
hProv = InitializeCrypt();
bool result = CryptStringToBinary(value.c\_str(), lul\_len, CRYPT\_STRING\_BASE64, key1, &lul\_buflen, &lul\_skip, NULL);
//bool result = CryptAcquireContext(&hProv,SecurityKey,NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET);
//bool result = CryptBinaryToString(value, lul_len, CRYPT_STRING_BASE64, convertedStr, &lul_buflen);
result = CryptCreateHash(hProv,CALG_MD5,0,0,&hHash);
result = CryptDeriveKey(hProv,CALG_3DES,hHash,0,&hKey);
memcpy(plaintext,key1,*ptlen);
result = CryptDecrypt(hKey,NULL,1,0,plaintext,&ctlen);
*ptlen=ctlen;
result = CryptDestroyKey(hKey);
result = CryptDestroyHash(hHash);
result = CryptReleaseContext(hProv,0);
}
int main() {
HCRYPTPROV hCryptProv;// = InitializeCrypt();
HCRYPTHASH hHash = 0;
HCRYPTKEY hKey = 0;
PBYTE pbBuffer = NULL;
DWORD dwCount;
const BYTE \* value;
DWORD lul\_len, lul\_buflen, lul\_skip, lul\_pflags, ptlen;
bool lb\_rtn;
BLOB lblob\_data;
std::string key = "h3bmull3r";
const std::string s = "Zed5OmjUWs8=" ;
value = reinterpret\_cast<const BYTE \*>(s.c\_str());
int stringSize = s.size();
TCHAR convertedStr\[12\];
convertedStr\[0\] = ('\\0');
lul\_len = s.size();
lul\_buflen = (lul\_len \* 2);
//hCryptProv = InitializeCrypt();
char CypherText\[128\]="Zed5OmjUWs8=";
char MyPassword\[\]="h3bmull3r";
unsigned char MyString\[128\];
unsigned long len1,len2,len3;
len1=strlen(CypherText);
len2=strlen(MyPassword);
len3=128; //size of the cypehrtext buffer above
memset(MyString,0,128); //clear the buffer
len1=128; //size of the plaintext buffer
lb\_rtn = CryptBinaryToString(value, lul\_len, CRYPT\_STRING\_BASE64, convertedStr, &lul\_buflen);
ThreeDESdecrypt((unsigned char \*)CypherText,len3,(unsigned char \*)MyPassword,len2,(unsigned char \*)MyString,&len1);
ret