Assistant: 
User: 下面是一个C语言伪代码函数，分别分析该函数的预期目的、参数的作用、详细功能，最后取一个新的函数名字。（用简体中文回答我，并且回答开始前加上'---GPT_START---'字符串结束后加上'---GPT_END---'字符串）
int __cdecl cplic_addlic_filtered_file_imp(int a1, int a2, char *filename)
{
  FILE *licenseFilePointer; // eax
  FILE *filePointer; // esi
  int chunkData; // eax
  int tempVar; // ecx
  const char *Chunk; // edi
  int licenseSign; // eax
  int signValue; // esi
  int licenseData; // eax
  const char *parsedData; // edi
  int token; // eax
  int addLicenseResult; // eax
  int finishVar; // ecx
  int ID; // edi
  int finishControlVar; // ecx
  int finishTempVar; // ecx
  int successfulLicensesCount; // [esp+0h] [ebp-20054h]
  int isControlMode; // [esp+4h] [ebp-20050h]
  int licenseID; // [esp+Ch] [ebp-20048h]
  int bufferSize; // [esp+1Ch] [ebp-20038h]
  size_t currentBufferSize; // [esp+20h] [ebp-20034h]
  void *dataPointer; // [esp+24h] [ebp-20030h]
  size_t totalLength; // [esp+28h] [ebp-2002Ch]
  int readSize; // [esp+34h] [ebp-20020h] BYREF
  int licenseBufferSize; // [esp+38h] [ebp-2001Ch] BYREF
  char licenseBuffer[131096]; // [esp+3Ch] [ebp-20018h] BYREF

  licenseBufferSize = 0x8000;
  cp_ipaddrs_license((int)licenseBuffer, (int)&licenseBufferSize);
  isControlMode = FwIsControl();
  licenseFilePointer = fopen(filename, "r");
  if ( !licenseFilePointer )
  {
    error(0, 0, "License file does not exist");
    return -1;
  }
  filePointer = licenseFilePointer;
  bufferSize = FileToBuffer((int)licenseFilePointer, (int)&readSize);
  if ( !bufferSize )
  {
    error(0, 0, "Cannot read license file");
    fclose(filePointer);
    return -1;
  }
  fclose(filePointer);
  init_lic_use((int)"cplic_addlic_filtered_file_imp");
  chunkData = ReadChunk(bufferSize, readSize);
  if ( chunkData )
  {
    totalLength = 0;
    Chunk = (const char *)chunkData;
    successfulLicensesCount = 0;
    licenseID = a1;
    while ( 1 )
    {
      while ( 1 )
      {
        currentBufferSize = totalLength + strlen(Chunk);
        totalLength = currentBufferSize;
        licenseSign = ChunkGetSign((int)Chunk);
        signValue = licenseSign;
        if ( !licenseSign
          || (*(_BYTE *)(licenseSign + 36) = 0,
              licenseData = ChunkGetData((int)Chunk),
              (parsedData = (const char *)licenseData) == 0) )
        {
          error(0, 0, "Corrupt license file");
          SetCvarsErrno(-94);
          lic_use_finish(finishVar);
          return -1;
        }
        dataPointer = (void *)__strdup(licenseData);
        if ( !strncasecmp(parsedData, "LICENSE", 7u) )
          break;
        if ( !strncasecmp(parsedData, "MACRO", 5u) )
        {
          successfulLicensesCount += cplic_addlicfile(a1, a2, (int)filename) == 0;
          free(dataPointer);
          lic_use_finish(finishControlVar);
          return successfulLicensesCount;
        }
LABEL_6:
        free(dataPointer);
        Chunk = (const char *)ReadChunk(currentBufferSize + bufferSize, readSize - currentBufferSize);
        if ( !Chunk )
          goto LABEL_15;
      }
      cp_strtok((int)parsedData, (int)" \t\n");
      token = cp_strtok(0, (int)" \t\n");
      if ( !token )
      {
        error(0, 0, "Corrupt license file");
        free(dataPointer);
        SetCvarsErrno(-94);
        lic_use_finish(finishTempVar);
        return -1;
      }
      if ( enforce_local_lic(signValue, token, (int)licenseBuffer, licenseBufferSize) )
      {
        if ( a2 == 0 && isControlMode == 0 )
        {
          if ( licenseID )
          {
            ID = cplic_getID();
            if ( !cplic_addlic(licenseID, 1, (int)dataPointer, signValue) )
            {
              delete_all_localic(ID, (int)licenseBuffer, licenseBufferSize);
              licenseID = 0;
            }
          }
        }
        addLicenseResult = cplic_addlic(licenseID, a2, (int)dataPointer, signValue);
        if ( !addLicenseResult )
        {
          ++successfulLicensesCount;
          if ( a2 )
            addLicenseResult = licenseID;
          licenseID = addLicenseResult;
        }
        goto LABEL_6;
      }
      if ( !isControlMode )
      {
        error(0, 0, "This license cannot be installed on the local machine:");
        error(0, 0, "The license IP Address does not match any of the local machine's IP Addresses.");
        error(0, 0, "If this license has an IP Address of the SmartCenter Server, use SmartUpdate to install it.");
      }
      free(dataPointer);
      Chunk = (const char *)ReadChunk(currentBufferSize + bufferSize, readSize - currentBufferSize);
      if ( !Chunk )
        goto LABEL_15;
    }
  }
  successfulLicensesCount = 0;
LABEL_15:
  lic_use_finish(tempVar);
  return successfulLicensesCount;
}

Assistant: