Subversion Repositories filter_foundry

Compare Revisions

Regard whitespace Rev 310 → Rev 311

/trunk/3264_mixer/foundry_3264_mixer.exe.recipe
File deleted
\ No newline at end of file
/trunk/3264_mixer/foundry_3264_mixer.cpp
233,12 → 233,12
LPCTSTR lpName64 = (LPCTSTR)1064;
WORD wLanguage = 1033; // en-US
 
LPCTSTR file32in = L"d:\\SVN\\FilterFoundry\\trunk\\3264_mixer\\in\\FilterFoundry.8bf";
LPCTSTR file64in = L"d:\\SVN\\FilterFoundry\\trunk\\3264_mixer\\in\\FilterFoundry64.8bf";
LPCTSTR file32out = L"d:\\SVN\\FilterFoundry\\trunk\\3264_mixer\\out\\FilterFoundry.8bf";
LPCTSTR file64out = L"d:\\SVN\\FilterFoundry\\trunk\\3264_mixer\\out\\FilterFoundry64.8bf";
LPCTSTR file32tmp = L"d:\\SVN\\FilterFoundry\\trunk\\3264_mixer\\FilterFoundry.tmp";
LPCTSTR file64tmp = L"d:\\SVN\\FilterFoundry\\trunk\\3264_mixer\\FilterFoundry64.tmp";
LPCTSTR file32in = L"in\\FilterFoundry.8bf";
LPCTSTR file64in = L"in\\FilterFoundry64.8bf";
LPCTSTR file32out = L"out\\FilterFoundry.8bf";
LPCTSTR file64out = L"out\\FilterFoundry64.8bf";
LPCTSTR file32tmp = L"FilterFoundry.tmp";
LPCTSTR file64tmp = L"FilterFoundry64.tmp";
 
// 1. Copy "IN" to "TMP"
 
/trunk/Obfuscation.md
27,10 → 27,11
Introduced in **Filter Foundry 1.7.0.8**
 
Obfuscation version 5 is the same as version 4, but there is a constraint
that the seed must be equal to the hash of the deobfuscated PARM.
that the seed must be equal to the CRC32b checksum of the deobfuscated PARM.
This is done to check the integrity of the deobfuscation.
 
Also, the xor-shifting is intentionally incompatible with version 4
to avoid downgrade-attacks.
(to avoid downgrade-attacks) by XORing the initial seed with 0xFFFFFFFF.
 
### Obfuscation "Version 4"
 
/trunk/TODO.md
5,7 → 5,7
Known bugs
----------
 
)(None)
(None)
 
 
Minor priority stuff or ideas
13,8 → 13,6
 
* Filter Factory is much faster than Filter Foundry (example rad.afs). Why?!
 
* Why doesn't the OpenWatcom files have a PE checksum?
 
* When a filter is created obfuscated and you click "Make" again, should then be the "obfuscate" checkbox be checked again?
 
* The filter `r*(y&1)` looks horrible when you zoom out!
57,7 → 55,10
 
* Check why the plugin crashes Premiere 5 (called in image filter mode; obviously not as transition filter)
 
* Cosmetics: Include a plugin-like-icon as icon #1 so that there would be a good icon in case some apps try to display an icon from the 8BF file?
(Attention: make_win.c deletes icon #1 because it thinks that it is the exclamation icon, so this needs to be changed then)
 
 
Questions
---------
 
/trunk/obfusc.c
85,6 → 85,25
}
}
 
uint32_t crc32b(char *data, int nLength) {
int i, j, k;
unsigned int byte, crc, mask;
 
i = 0;
crc = 0xFFFFFFFF;
 
for(k=0;k<nLength;k++) {
byte = data[k];
crc = crc ^ byte;
for (j = 7; j >= 0; j--) {
mask = -(crc & 1);
crc = (crc >> 1) ^ (0xEDB88320 & mask);
}
i++;
}
return ~crc;
}
 
uint32_t obfusc(PARM_T* pparm) {
// Windows: Version 5 obfuscation (Introduced in Filter Foundry 1.7.0.8)
// Macintosh: Version 4 obfuscation (Introduced in Filter Foundry 1.7.0.7)
101,7 → 120,7
obfusc_version = 4;
#else
// In obfuscation version 5, the seed is also the checksum. It will be verified at deobfusc()!
initial_seed = (uint32_t)get_parm_hash(pparm);
initial_seed = crc32b(pparm,sizeof(PARM_T));
obfusc_version = 5;
#endif
 
221,7 → 240,7
xorshift(&p, &seed, size - seed_position - 4);
 
if (obfusc_version == 5) {
if ((uint32_t)get_parm_hash(pparm) != initial_seed) {
if (crc32b(pparm,sizeof(PARM_T)) != initial_seed) {
// Integrity check failed!
memset(pparm, 0, sizeof(PARM_T)); // invalidate everything
}
232,6 → 251,10
default: {
// Obfuscation version unexpected!
memset(pparm, 0, sizeof(PARM_T)); // invalidate everything
 
// If "return" is present: Calling function will receive an invalid cbSize value, hence showing "incompatible obfuscation"
// If "return" is not present: Then the code below will set a correct cbSize and iProtect flag if obfusc_version>=3, which will raise the error "filter is protected"
return;
}
}
 
/trunk/telegraphics_common/tt/compat_win.c
22,11 → 22,15
#include "compat_win.h"
 
Boolean isWin32NT(void){
#ifdef _WIN64
// 64 bit OS is never Win9x, so it must be WinNT
return true;
#else
OSVERSIONINFO osv;
 
osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
#pragma warning(suppress : 4996 28159)
return GetVersionEx(&osv) && osv.dwPlatformId == VER_PLATFORM_WIN32_NT;
#endif
}
 
// ---------------------------------