if(FileExists(szOutuptStrTemp))
if((*sgProduct.szAlternateArchiveSearchPath != '\0') && FileExists(szOutuptStrTemp))
HRESULT DecryptString(LPSTR szOutputStr, LPSTR szInputStr){  DWORD dwLenInputStr;  DWORD dwCounter;  DWORD dwVar;  DWORD dwPrepend;  char  szBuf[MAX_BUF];  char  szOutuptStrTemp[MAX_BUF];  char  szVariable[MAX_BUF];  char  szPrepend[MAX_BUF];  char  szAppend[MAX_BUF];  char  szResultStr[MAX_BUF];  BOOL  bFoundVar;  BOOL  bBeginParse;  BOOL  bDecrypted;  /* zero out the memory addresses */  memset(szBuf,       '\0', MAX_BUF);  memset(szVariable,  '\0', MAX_BUF);  memset(szPrepend,   '\0', MAX_BUF);  memset(szAppend,    '\0', MAX_BUF);  memset(szResultStr, '\0', MAX_BUF);  lstrcpy(szPrepend, szInputStr);  dwLenInputStr = lstrlen(szInputStr);  bBeginParse   = FALSE;  bFoundVar     = FALSE;  for(dwCounter = 0; dwCounter < dwLenInputStr; dwCounter++)  {    if((szInputStr[dwCounter] == ']') && bBeginParse)      break;    if(bBeginParse)      szVariable[dwVar++] = szInputStr[dwCounter];    if((szInputStr[dwCounter] == '[') && !bBeginParse)    {      dwVar        = 0;      dwPrepend    = dwCounter;      bBeginParse  = TRUE;    }  }  if(dwCounter == dwLenInputStr)    /* did not find anything to expand. */    dwCounter = 0;  else  {    bFoundVar = TRUE;    ++dwCounter;  }  if(bFoundVar)  {    lstrcpy(szAppend, &szInputStr[dwCounter]);    szPrepend[dwPrepend] = '\0';    /* if Variable is "XPI PATH", do special processing */    if(lstrcmpi(szVariable, "XPI PATH") == 0)    {      lstrcpy(szBuf, sgProduct.szAlternateArchiveSearchPath);      RemoveBackSlash(szBuf);      lstrcpy(szOutuptStrTemp, szPrepend);      lstrcat(szOutuptStrTemp, szBuf);      lstrcat(szOutuptStrTemp, szAppend);      if(FileExists(szOutuptStrTemp))      {        lstrcpy(szVariable, sgProduct.szAlternateArchiveSearchPath);      }      else      {        lstrcpy(szBuf, szSetupDir);        RemoveBackSlash(szBuf);        lstrcpy(szOutuptStrTemp, szPrepend);        lstrcat(szOutuptStrTemp, szBuf);        lstrcat(szOutuptStrTemp, szAppend);        if(!FileExists(szOutuptStrTemp))          lstrcpy(szVariable, szTempDir);        else          lstrcpy(szVariable, szSetupDir);      }      RemoveBackSlash(szVariable);      bDecrypted = TRUE;    }    else    {      bDecrypted = DecryptVariable(szVariable, sizeof(szVariable));    }    if(!bDecrypted)    {      /* Variable was not able to be dcripted. */      /* Leave the variable as it was read in by adding the '[' and ']' */      /* characters back to the variable. */      lstrcpy(szBuf, "[");      lstrcat(szBuf, szVariable);      lstrcat(szBuf, "]");      lstrcpy(szVariable, szBuf);    }    lstrcpy(szOutputStr, szPrepend);    lstrcat(szOutputStr, szVariable);    lstrcat(szOutputStr, szAppend);    if(bDecrypted)    {      DecryptString(szResultStr, szOutputStr);      lstrcpy(szOutputStr, szResultStr);    }  }  else    lstrcpy(szOutputStr, szInputStr);  return(TRUE);}