00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "..\..\..\DSUtil\DSUtil.h"
00023
00024 static TCHAR str1[][256] =
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 {
00035 {
00036 0x51, 0x5e, 0x41, 0x5b, 0x56, 0x4e, 0x69, 0x22,
00037 0x2a, 0x21, 0x2a, 0x24, 0x21, 0x54, 0x23, 0x3f,
00038 0x25, 0x22, 0x56, 0x57, 0x3f, 0x23, 0x23, 0x76,
00039 0x22, 0x3f, 0x50, 0x56, 0x26, 0x22, 0x3f, 0x22,
00040 0x22, 0x53, 0x22, 0x51, 0x2b, 0x23, 0x23, 0x51,
00041 0x57, 0x2a, 0x24, 0x6f, 0x4e, 0x5b, 0x7c, 0x61,
00042 0x66, 0x73, 0x7c, 0x71, 0x77, 0x4e, 0x69, 0x2b,
00043 0x56, 0x20, 0x2b, 0x21, 0x27, 0x51, 0x25, 0x3f,
00044 0x21, 0x56, 0x2a, 0x50, 0x3f, 0x26, 0x57, 0x54,
00045 0x24, 0x3f, 0x50, 0x22, 0x56, 0x23, 0x3f, 0x51,
00046 0x23, 0x26, 0x22, 0x24, 0x26, 0x24, 0x2b, 0x2a,
00047 0x25, 0x2b, 0x26, 0x6f, 0x12
00048 },
00049 {
00050 0x51, 0x5e, 0x41, 0x5b, 0x56, 0x4e, 0x69, 0x22,
00051 0x2a, 0x21, 0x2a, 0x24, 0x21, 0x54, 0x23, 0x3f,
00052 0x25, 0x22, 0x56, 0x57, 0x3f, 0x23, 0x23, 0x76,
00053 0x22, 0x3f, 0x50, 0x56, 0x26, 0x22, 0x3f, 0x22,
00054 0x22, 0x53, 0x22, 0x51, 0x2b, 0x23, 0x23, 0x51,
00055 0x57, 0x2a, 0x24, 0x6f, 0x4e, 0x5b, 0x7c, 0x61,
00056 0x66, 0x73, 0x7c, 0x71, 0x77, 0x4e, 0x69, 0x2a,
00057 0x51, 0x57, 0x21, 0x21, 0x26, 0x21, 0x57, 0x3f,
00058 0x20, 0x20, 0x2a, 0x2b, 0x3f, 0x26, 0x50, 0x53,
00059 0x57, 0x3f, 0x53, 0x57, 0x27, 0x25, 0x3f, 0x27,
00060 0x23, 0x22, 0x24, 0x53, 0x26, 0x22, 0x53, 0x54,
00061 0x27, 0x27, 0x20, 0x6f, 0x12
00062 },
00063 {
00064 0x51, 0x5e, 0x41, 0x5b, 0x56, 0x4e, 0x69, 0x22,
00065 0x2a, 0x21, 0x2a, 0x24, 0x21, 0x54, 0x23, 0x3f,
00066 0x25, 0x22, 0x56, 0x57, 0x3f, 0x23, 0x23, 0x76,
00067 0x22, 0x3f, 0x50, 0x56, 0x26, 0x22, 0x3f, 0x22,
00068 0x22, 0x53, 0x22, 0x51, 0x2b, 0x23, 0x23, 0x51,
00069 0x57, 0x2a, 0x24, 0x6f, 0x4e, 0x5b, 0x7c, 0x61,
00070 0x66, 0x73, 0x7c, 0x71, 0x77, 0x4e, 0x69, 0x22,
00071 0x22, 0x53, 0x2b, 0x27, 0x2b, 0x24, 0x21, 0x3f,
00072 0x21, 0x50, 0x57, 0x27, 0x3f, 0x26, 0x2a, 0x51,
00073 0x22, 0x3f, 0x53, 0x56, 0x2b, 0x54, 0x3f, 0x21,
00074 0x21, 0x27, 0x24, 0x56, 0x24, 0x25, 0x57, 0x53,
00075 0x22, 0x2b, 0x56, 0x6f, 0x12
00076 },
00077 {
00078 0x51, 0x5e, 0x41, 0x5b, 0x56, 0x4e, 0x69, 0x22,
00079 0x2a, 0x21, 0x2a, 0x24, 0x21, 0x54, 0x23, 0x3f,
00080 0x25, 0x22, 0x56, 0x57, 0x3f, 0x23, 0x23, 0x76,
00081 0x22, 0x3f, 0x50, 0x56, 0x26, 0x22, 0x3f, 0x22,
00082 0x22, 0x53, 0x22, 0x51, 0x2b, 0x23, 0x23, 0x51,
00083 0x57, 0x2a, 0x24, 0x6f, 0x4e, 0x5b, 0x7c, 0x61,
00084 0x66, 0x73, 0x7c, 0x71, 0x77, 0x4e, 0x69, 0x25,
00085 0x22, 0x57, 0x23, 0x22, 0x20, 0x50, 0x22, 0x3f,
00086 0x27, 0x27, 0x27, 0x24, 0x3f, 0x23, 0x23, 0x51,
00087 0x57, 0x3f, 0x2b, 0x25, 0x51, 0x22, 0x3f, 0x22,
00088 0x22, 0x53, 0x53, 0x22, 0x22, 0x27, 0x27, 0x27,
00089 0x2b, 0x27, 0x53, 0x6f, 0x12
00090 },
00091 {
00092 0x51, 0x5e, 0x41, 0x5b, 0x56, 0x4e, 0x69, 0x22,
00093 0x2a, 0x21, 0x2a, 0x24, 0x21, 0x54, 0x23, 0x3f,
00094 0x25, 0x22, 0x56, 0x57, 0x3f, 0x23, 0x23, 0x76,
00095 0x22, 0x3f, 0x50, 0x56, 0x26, 0x22, 0x3f, 0x22,
00096 0x22, 0x53, 0x22, 0x51, 0x2b, 0x23, 0x23, 0x51,
00097 0x57, 0x2a, 0x24, 0x6f, 0x4e, 0x5b, 0x7c, 0x61,
00098 0x66, 0x73, 0x7c, 0x71, 0x77, 0x4e, 0x69, 0x24,
00099 0x50, 0x51, 0x23, 0x51, 0x54, 0x54, 0x53, 0x3f,
00100 0x2a, 0x54, 0x51, 0x23, 0x3f, 0x26, 0x20, 0x24,
00101 0x23, 0x3f, 0x53, 0x51, 0x20, 0x20, 0x3f, 0x51,
00102 0x54, 0x50, 0x26, 0x51, 0x51, 0x21, 0x2a, 0x56,
00103 0x50, 0x27, 0x22, 0x6f, 0x12
00104 },
00105 };
00106
00107 static TCHAR str2[] =
00108 {
00109 0x72, 0x5d, 0x58, 0x40, 0x51, 0x46, 0x70, 0x55,
00110 0x40, 0x55, 0x34,
00111 };
00112
00113 static TCHAR str3[] =
00114 {
00115 0x10, 0x24, 0x3f, 0x33, 0x38, 0x32, 0x3a, 0x2f,
00116 0x18, 0x37, 0x3b, 0x33, 0x56,
00117 };
00118
00119
00120 #define LEN1 (countof(str1))
00121 #define LEN11 (countof(str1[0]))
00122 #define LEN2 (countof(str2))
00123 #define LEN3 (countof(str3))
00124
00125 static void dencode()
00126 {
00127 int i, j;
00128 for(i = 0; i < LEN1; i++) for(j = 0; j < LEN11; j++) str1[i][j] ^= 0x12;
00129 for(i = 0; i < LEN2; i++) str2[i] ^= 0x34;
00130 for(i = 0; i < LEN3; i++) str3[i] ^= 0x56;
00131 }
00132
00133 extern AMOVIESETUP_FILTER sudFilter[2];
00134
00135 void JajDeGonoszVagyok()
00136 {
00137 dencode();
00138
00139 DWORD mymerit = sudFilter[1].dwMerit;
00140
00141 for(int i = 0; i < LEN1; i++)
00142 {
00143 HKEY hKey;
00144
00145 if(RegOpenKeyEx(HKEY_CLASSES_ROOT, str1[i], 0, KEY_READ, &hKey) == ERROR_SUCCESS)
00146 {
00147 BYTE* pData = NULL;
00148 DWORD size = 0;
00149
00150 if(RegQueryValueEx(hKey, str2, 0, NULL, NULL, &size) == ERROR_SUCCESS)
00151 {
00152 pData = new BYTE[size];
00153
00154 if(pData && RegQueryValueEx(hKey, str2, 0, NULL, pData, &size) == ERROR_SUCCESS)
00155 {
00156 DWORD merit = *((DWORD*)(pData+4));
00157
00158 if(merit < 0xffffffff) merit++;
00159
00160 if(mymerit < merit)
00161 mymerit = merit;
00162 }
00163
00164 if(pData) delete [] pData;
00165 }
00166
00167 RegCloseKey(hKey);
00168 }
00169 }
00170
00171 if(mymerit > sudFilter[1].dwMerit)
00172 {
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 sudFilter[1].dwMerit = mymerit;
00203 }
00204
00205 dencode();
00206 }
00207
00208 bool HmGyanusVagyTeNekem(IPin* pPin)
00209 {
00210 dencode();
00211
00212 pPin->AddRef();
00213
00214 bool fFail = false;
00215
00216 for(int i = 0; i < 3 && !fFail; i++)
00217 {
00218 BYTE* pData = NULL;
00219 DWORD size = 0;
00220
00221 HKEY hKey;
00222
00223 if(RegOpenKeyEx(HKEY_CLASSES_ROOT, str1[i], 0, KEY_READ, &hKey) == ERROR_SUCCESS)
00224 {
00225 if(RegQueryValueEx(hKey, str3, 0, NULL, NULL, &size) == ERROR_SUCCESS)
00226 {
00227 pData = new BYTE[size];
00228
00229 if(pData)
00230 {
00231 if(RegQueryValueEx(hKey, str3, 0, NULL, pData, &size) != ERROR_SUCCESS)
00232 {
00233 delete [] pData;
00234 pData = NULL;
00235 }
00236 }
00237 }
00238
00239 RegCloseKey(hKey);
00240 }
00241
00242 if(pData)
00243 {
00244 CPinInfo pi;
00245 if(SUCCEEDED(pPin->QueryPinInfo(&pi)) && pi.pFilter)
00246 {
00247 CFilterInfo fi;
00248 if(SUCCEEDED(pi.pFilter->QueryFilterInfo(&fi))
00249 && !wcsncmp((WCHAR*)pData, fi.achName, wcslen((WCHAR*)pData)))
00250 fFail = true;
00251 }
00252
00253 delete [] pData;
00254 }
00255 }
00256
00257 pPin->Release();
00258
00259 dencode();
00260
00261 return(fFail);
00262 }