Hi , I've been looking everywhere how to decompile max script files .mse and there is no info anywhere on the net, and those who seem to have a tool for such task are refusing to give any pointers please if anyone has any info help me , I'll be very grateful.
#include <stdio.h>
int key = 0xECD6D157;
unsigned short DoNumber() {
unsigned long x,y;
x = key;
y = x + x * 2;
y = x + y * 4;
y = y * 0x10;
y += x;
y = y * 0x100;
y -= x;
x = x + y * 4 + 0x269EC3;
key = x;
__asm mov eax,x;
__asm sar eax,0x10;
__asm mov x,eax;
return x & 0x7fff;
}
int main(int argc,char *argv[]) {
short num;
char c;
if (argc < 2) {
printf("srcun: Maxscript Deprotector\n");
printf("converts a *.mse encrypted script back into a *.ms script\n");
printf("usage: scrun msefile msfile\n");
return 1;
}
FILE *f1 = fopen(argv[1],"rb");
FILE *f2 = fopen(argv[2],"wb");
while (!feof(f1)) {
c = fgetc(f1);
num = DoNumber();
c ^= num;
fputc(c,f2);
}
}