|
@@ -0,0 +1,41 @@
|
|
|
|
+package QuickVerifyCrap;
|
|
|
|
+
|
|
|
|
+import java.io.RandomAccessFile;
|
|
|
|
+
|
|
|
|
+public class GEXWPatternMasseuse
|
|
|
|
+{
|
|
|
|
+ public static void main(String[] args) throws Exception{
|
|
|
|
+ RandomAccessFile base = new RandomAccessFile("/home/lh/code/LOA-23/HAXXZ0r_TESTS/GEXWING.BIN","r");
|
|
|
|
+
|
|
|
|
+ RandomAccessFile frq = new RandomAccessFile("/home/lh/code/LOA-23/HAXXZ0r_TESTS/GEXWING.BIN.freq.unified","rw");
|
|
|
|
+
|
|
|
|
+ for(int f=0;f<40;f++)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ base.seek(0);
|
|
|
|
+ byte[] freqmap = new byte[256];
|
|
|
|
+
|
|
|
|
+ int fcnt = Integer.reverseBytes(base.readInt());
|
|
|
|
+
|
|
|
|
+ base.seek(0x200);
|
|
|
|
+ for(int i=0;i<fcnt;i++)
|
|
|
|
+ {
|
|
|
|
+ int len = Integer.reverseBytes(base.readInt())-2;
|
|
|
|
+ base.readShort(); //ignored, constant
|
|
|
|
+ byte[] content = new byte[len];
|
|
|
|
+ base.read(content);
|
|
|
|
+ for(int j=f;j<len;j+=40)
|
|
|
|
+ {
|
|
|
|
+ int freqidx = ((int)content[j])&0xFF;
|
|
|
|
+ if(freqmap[freqidx]!=-1)
|
|
|
|
+ {
|
|
|
|
+ freqmap[freqidx] = (byte) (freqmap[freqidx]+1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ frq.write(freqmap);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|