├── !SourceCode
├── Au3-Extracter Script 0.2
│ ├── Au3-Extract.au3
│ ├── Au3_lister.au3
│ └── LZSS.exe
├── Delete_AutToExe_OptionsOnly.reg
├── Delete_AutToExe_RegSettings.reg
├── SRC LZSS.exe
│ ├── !PackedExample
│ ├── !UnPackedExample
│ ├── V1_02
│ │ ├── Docu
│ │ │ ├── ChangeLog.txt
│ │ │ ├── Implementation_Details.txt
│ │ │ ├── LZSS_Explained.txt
│ │ │ └── License.txt
│ │ ├── EA06_packed_example.dmp
│ │ ├── JB01.dsp
│ │ ├── JB01.dsw
│ │ ├── JB01.sln
│ │ ├── JB01.vcproj
│ │ ├── JB01.vcxproj
│ │ └── src
│ │ │ ├── JB01_Compress.cpp
│ │ │ ├── JB01_Compress.h
│ │ │ ├── JB01_Decompress.cpp
│ │ │ ├── JB01_Decompress.h
│ │ │ └── main.cpp
│ └── basictest.txt
├── SRC RanRot_MT.dll - Mersenne Twister & RanRot
│ ├── Main.cpp
│ ├── PE-Stub_Win32Only.bin
│ ├── RANROTB.CPP
│ ├── RanRot.sln
│ ├── RanRot.vcproj
│ ├── RanRot.vcproj.7.10.old
│ ├── RanRot.vcxproj
│ ├── RanRot.vcxproj.filters
│ ├── RanRot_MT.def
│ ├── UpgradeLog.XML
│ ├── UpgradeLog2.XML
│ ├── _UpgradeReport_Files
│ │ ├── UpgradeReport.css
│ │ └── UpgradeReport.xslt
│ ├── mt19937ar.c
│ └── randomC.H
├── SRC
│ ├── CBinaryReader.cls
│ ├── DeTokeniser.bas
│ ├── Decompile.bas
│ ├── Deobfuscator.bas
│ ├── Exe2Aut.ico
│ ├── ExtractAHKScript.bas
│ ├── ForAu3PasswordCheck
│ │ └── clsMD5.cls
│ ├── FrmAHK_KeyFinder.frm
│ ├── FrmAbout.frm
│ ├── Frm_Options.frm
│ ├── Frm_Options.frx
│ ├── Frm_SrcEdit.frm
│ ├── GlobalDefs.bas
│ ├── ModCRC32.bas
│ ├── Parser.bas
│ ├── SeperateIncludes.bas
│ ├── clsStrCat.cls
│ ├── frmLogView.frm
│ ├── frmMain.frm
│ ├── frmMain.frx
│ ├── frmSearchResults.frm
│ ├── lib
│ │ ├── ApiHelper.bas
│ │ ├── CFileSystem3.cls
│ │ ├── ClsFilename.cls
│ │ ├── Commandline.cls
│ │ ├── ErrorHelper.bas
│ │ ├── FileStream.cls
│ │ ├── Helper.bas
│ │ ├── PE_info.cls
│ │ ├── Pe_info.bas
│ │ ├── Replace.bas
│ │ ├── StringReader.cls
│ │ ├── UTF8.bas
│ │ ├── clsConsole.cls
│ │ └── clsDuplicateFilter.cls
│ ├── modCamoGet.bas
│ └── unused
│ │ ├── ClsDeobfuscator.cls
│ │ ├── FrmFuncRename.frm
│ │ ├── FrmFuncRename.frx
│ │ ├── FrmFuncRename_StringMismatch.frm
│ │ ├── FrmFuncRename_StringMismatch.frx
│ │ ├── FrmRegExp_Renamer.frm
│ │ ├── FrmRegExp_Renamer.frx
│ │ ├── IconFile.bas
│ │ ├── clsStrCat.cls
│ │ ├── modCamoGet.bas
│ │ ├── version.txt
│ │ └── whxapi2.bas
├── languages-ids.txt
├── src_ExtractIcon
│ ├── !Info_msdn_icons.htm
│ ├── !Original
│ │ ├── ABSTRACT.TXT
│ │ ├── DIB.C
│ │ ├── DIB.H
│ │ ├── ICONPRO.C
│ │ ├── ICONPRO.H
│ │ ├── ICONPRO.HPJ
│ │ ├── ICONPRO.RC
│ │ ├── ICONPRO.RTF
│ │ ├── ICONS.C
│ │ ├── ICONS.H
│ │ ├── MAKEFILE.mak
│ │ ├── MDICHILD.C
│ │ ├── MDICHILD.H
│ │ ├── README.TXT
│ │ └── RESOURCE.H
│ ├── !VC2010
│ │ ├── ExtractIcon.sln
│ │ ├── ExtractIcon.vcxproj
│ │ └── ExtractIcon.vcxproj.filters
│ ├── ExtractExeIcon.dsp
│ └── SRC
│ │ ├── DIB.C
│ │ ├── DIB.H
│ │ ├── ICONPRO.C
│ │ ├── ICONPRO.H
│ │ ├── ICONPRO.ICO
│ │ ├── ICONPRO.RC
│ │ ├── ICONS.C
│ │ ├── ICONS.H
│ │ ├── MDICHILD.C
│ │ ├── MDICHILD.H
│ │ └── Resource.h
└── test_findpassword
│ ├── FileStream.cls
│ ├── Form1.frm
│ ├── Module1.bas
│ ├── Project1.vbp
│ ├── Project1.vbw
│ ├── noname.dat
│ └── pass_fail_logs.txt
├── .gitattributes
├── .gitignore
├── Doc
├── Dealing with modified Au3-files-Dateien
│ ├── image001.jpg
│ └── image002.jpg
├── Dealing with modified Au3-files.htm
├── Finding the Ahk-ExtraDecryption.txt
├── Inject_au3
│ ├── ExeToDll.au3
│ ├── injectdll.bb
│ ├── injectdll.cmd
│ ├── injectdll.exe
│ ├── injectdll.txt
│ └── src
│ │ └── injectdll.cpp
├── ScriptDump.cmd
├── regexp.htm
└── regexp
│ ├── PrintFriendly-bn2090.css
│ └── mtps-bn2090.css
├── Shell_Install.cmd
├── Shell_Uninstall.cmd
├── data
├── ExtractIcon.exe
├── LZSS.exe
├── RanRot_MT.dll
├── Tidy
│ ├── Tidy.exe
│ ├── Tidy.ini
│ ├── au3.api
│ ├── functions.tbl
│ ├── keywords.tbl
│ └── macros.tbl
└── upx.exe
├── myAutToExe.exe
├── readme.txt
├── samples
├── 3.3
│ └── TokenTestFile.exe
├── AutoIt2
│ └── Snapshot.exe
├── AutoIt316_TokenFile
│ ├── !other
│ │ └── _00CF0000.mem
│ ├── TokenTestFile.au3
│ ├── decompiled
│ │ └── TokenTestFile_Decompiled.au3
│ └── original
│ │ └── TokenTestFile.tok
├── EnCodeIt2 Src Reloaded
│ └── EnCodeIt2-reloaded.au3
├── EnCodeIt2.0.exe
├── EnCodeItInfo
│ ├── 200699.dll
│ └── SkinCrafter.dll
├── Unicode UTF-8
│ ├── test.au3
│ └── test_UTF16.au3
├── VanZande1 Obfuscated
│ ├── Simon-original.au3
│ └── Simon_obfu.au3
├── VanZande2 Obfuscated
│ ├── VanZandeObfuscated-Protect.au3.tbl
│ ├── VanZandeObfuscated-Protect_Obfuscated-tidy.au3
│ ├── VanZandeObfuscated-Protect_Obfuscated.au3
│ └── VanZandeObfuscated-Protect_original.au3
├── VanZande3 Obfuscated
│ └── newprep.au3
├── ahk
│ └── ahk_modified.exe
└── w0uter-protected script.exe
├── src_AutToExe_VB6.vbp
└── src_AutToExe_VB6.vbw
/!SourceCode/Au3-Extracter Script 0.2/LZSS.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/Au3-Extracter Script 0.2/LZSS.exe
--------------------------------------------------------------------------------
/!SourceCode/Delete_AutToExe_OptionsOnly.reg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/Delete_AutToExe_OptionsOnly.reg
--------------------------------------------------------------------------------
/!SourceCode/Delete_AutToExe_RegSettings.reg:
--------------------------------------------------------------------------------
1 | REGEDIT4
2 |
3 | [-HKEY_CURRENT_USER\Software\VB and VBA Program Settings\AutToExe]
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/!PackedExample:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC LZSS.exe/!PackedExample
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/!UnPackedExample:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC LZSS.exe/!UnPackedExample
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/Docu/Implementation_Details.txt:
--------------------------------------------------------------------------------
1 |
2 | Implementation Details for the LZSS v1.4x routines
3 | ==================================================
4 |
5 | Jonathan Bennett (jon@hiddensoft.com)
6 | =====================================
7 |
8 | This file gives a description of the more technical workings of the compression
9 | algorithm above.
10 |
11 | LZSS compression is used with a huffman backend. That is, all literals, match
12 | lengths and match offsets are coded with huffman.
13 |
14 | Compression performance is around the PKZIP/WINZIP level for most files and a
15 | little better on large files. Tests on the Calgary Corpus give results of
16 | 2.55bpb which is not bad seeing as I only just barely understand this stuff :)
17 |
18 | IF YOU HAVE IMPROVEMENTS OR SUGGESTIONS PLEASE CONTACT ME - Sources like zlib
19 | are pretty much gibberish to me... :( Also note that my code is very slow
20 | compared to zip/zlib but on the other hand they are well commented and very
21 | easy to use. I use them myself for my AutoIt project as the decompression
22 | code is only a couple of KB and works "well enough". One thing I can't
23 | work out is apparently zlib only uses 32KB for hash tables, I'm using about
24 | 600KB! I'd like to know how that is done...
25 |
26 | Now, onto the details of my code:
27 |
28 |
29 | LZSS
30 | ----
31 | A sliding window of 65535 bytes is used with a maximum match length of 511 bytes.
32 | A ring/circular buffer is used of 128KB - this is done so that quick access to
33 | the data is possible using an AND mask of 128KB-1 (0x1FFFF). The minium match
34 | length is 3.
35 |
36 | Each "loop" the lookahead buffer is filled (511+min match len bytes).
37 |
38 | A hash table is maintained for the previous 65535 bytes, 3 bytes are used for
39 | the "hash" key. Hash entries are organised into linked lists up to a maximum
40 | chain limit defined by the "compression level". The hash tables are not
41 | sorted in any way but when a new hash is inserted it is done so that when you
42 | re-read the hashes you get the most recent values first. When a value leaves
43 | the sliding window it is deleted from the hash table.
44 |
45 | To find a LZSS match the current 3 bytes are hashed and then compared with the
46 | entries in the hash table (newest first) and the longest match is selected - if
47 | two matches have the same match length then the first one found (most recent) is
48 | used to try and keep the offset size small and therefore help in the huffman
49 | coding.
50 |
51 | Then an addtional match is attempted at the current position +1 called a "lazy
52 | evaluation" - if this gives a better match then the original match is discarded
53 | (and just the literal byte written).
54 |
55 |
56 | Huffman
57 | -------
58 | The literals, match lengths and offsets are then coded using huffman. The usual
59 | LZSS "flags" to indicate a literal or a match are no longer required using this
60 | method.
61 |
62 | Two huffman trees are used, one for literals and match lengths and one for offsets.
63 | As far as I can work out I used a similar method as zlib the only difference
64 | being that I allow for offsets of 65535 and lengths of 511. The tables used are
65 | below:
66 |
67 |
68 | LITERAL & LENGTHS TABLE
69 |
70 | Code More Bits? Length
71 |
72 | ---- ---------- ------
73 | 0-255 Just literal bytes
74 |
75 | 256 0 0
76 | 257 0 1
77 | 258 0 2
78 | 259 0 3
79 | 260 0 4
80 | 261 0 5
81 | 262 0 6
82 | 263 0 7
83 |
84 | 264 1 8-9
85 | 265 1 10-11
86 | 266 1 12-13
87 | 267 1 14-15
88 |
89 | 268 2 16-19
90 | 269 2 20-23
91 | 270 2 24-27
92 | 271 2 28-31
93 |
94 | 272 3 32-39
95 | 273 3 40-47
96 | 274 3 48-55
97 | 275 3 56-63
98 |
99 | 276 4 64-79
100 | 277 4 80-95
101 | 278 4 96-111
102 | 279 4 112-127
103 |
104 | 280 5 128-159
105 | 281 5 160-191
106 | 282 5 192-223
107 | 283 5 224-255
108 |
109 | 284 6 256-319
110 | 285 6 320-383
111 | 286 6 384-447
112 | 287 6 448-511
113 |
114 |
115 | OFFSET TABLE
116 |
117 | Code More Bits? Offset
118 | ---- ---------- ------
119 | 0 0 0
120 | 1 0 1
121 | 2 0 2
122 | 3 0 3
123 |
124 | 4 1 4-5
125 | 5 1 6-7
126 |
127 | 6 2 8-11
128 | 7 2 12-15
129 |
130 | 8 3 16-23
131 | 9 3 24-31
132 |
133 | 10 4 32-47
134 | 11 4 48-63
135 |
136 | 12 5 64-95
137 | 13 5 96-127
138 |
139 | 14 6 128-191
140 | 15 6 192-255
141 |
142 | 16 7 256-383
143 | 17 7 384-511
144 |
145 | 18 8 512-767
146 | 19 8 768-1023
147 |
148 | 20 9 1024-1535
149 | 21 9 1536-2047
150 |
151 | 22 10 2048-3071
152 | 23 10 3072-4095
153 |
154 | 24 11 4096-6143
155 | 25 11 6144-8191
156 |
157 | 26 12 8192-12287
158 | 27 12 12288-16383
159 |
160 | 28 13 16384-24575
161 | 29 13 24576-32767
162 |
163 | 30 14 32768-49151
164 | 31 14 49152-65535
165 |
166 |
167 | One thing I couldn't work out was how to store the huffman tables in the compressed data.
168 | So instead I just made the compressor regenerate the tables based on previous
169 | input every ~4096 bytes, the decompressor does the same and we end up with a
170 | crude "adaptive huffman" routine. It seems to work pretty well except for small
171 | files as it takes some time to get up to speed.
172 |
173 |
174 | I hope that makes sense how the current sources work. Drop me a mail if you want
175 | any more specifics.
176 |
177 | Jon.
178 |
179 |
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/Docu/License.txt:
--------------------------------------------------------------------------------
1 | This code may be used freely as long as you give me some credit. Also drop me an
2 | email just let me know that you have found it useful!
3 |
4 | Jonathan Bennett,
5 | jon@hiddensoft.com
6 |
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/EA06_packed_example.dmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC LZSS.exe/V1_02/EA06_packed_example.dmp
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/JB01.dsp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC LZSS.exe/V1_02/JB01.dsp
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/JB01.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "JB01"=.\JB01.dsp - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Global:
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<3>
25 | {{{
26 | }}}
27 |
28 | ###############################################################################
29 |
30 |
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/JB01.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LZSS", "JB01.vcproj", "{5E5029C7-496F-4FCA-A53A-E8A4F668838D}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {5E5029C7-496F-4FCA-A53A-E8A4F668838D}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {5E5029C7-496F-4FCA-A53A-E8A4F668838D}.Debug|Win32.Build.0 = Debug|Win32
14 | {5E5029C7-496F-4FCA-A53A-E8A4F668838D}.Release|Win32.ActiveCfg = Release|Win32
15 | {5E5029C7-496F-4FCA-A53A-E8A4F668838D}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/JB01.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
22 |
43 |
45 |
56 |
60 |
62 |
64 |
66 |
70 |
72 |
74 |
76 |
78 |
80 |
81 |
89 |
103 |
105 |
115 |
119 |
121 |
123 |
125 |
129 |
131 |
133 |
135 |
137 |
139 |
140 |
141 |
142 |
143 |
144 |
147 |
149 |
151 |
156 |
157 |
158 |
160 |
162 |
167 |
168 |
169 |
171 |
173 |
178 |
179 |
180 |
181 |
184 |
186 |
188 |
190 |
191 |
192 |
194 |
195 |
196 |
199 |
200 |
202 |
203 |
205 |
206 |
208 |
209 |
211 |
212 |
213 |
214 |
215 |
216 |
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/V1_02/src/main.cpp:
--------------------------------------------------------------------------------
1 | // Test exe file for compression classes - very untidy code only used
2 | // for testing compression functions quickly
3 | //
4 | // CONSOLE APP
5 | //
6 | // (c)2002-2003 Jonathan Bennett, jon@hiddensoft.com
7 | //
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include "jb01_compress.h"
14 | #include "jb01_decompress.h"
15 |
16 |
17 | ///////////////////////////////////////////////////////////////////////////////
18 | // CompressMonitorProc() - The callback function
19 | ///////////////////////////////////////////////////////////////////////////////
20 |
21 | int CompressMonitorProc(ULONG nBytesIn, ULONG nBytesOut, UINT nPercentComplete)
22 | {
23 | static UINT nDelay = 0;
24 | static UINT nRot = 0;
25 | char szGfx[]= "-\\|/";
26 | UCHAR ch;
27 |
28 | // if (nDelay > 16)
29 | // {
30 | nDelay = 0;
31 | nRot = (nRot+1) & 0x3;
32 | printf("\rCompressing %c : %d%% (%d%%) ", szGfx[nRot], nPercentComplete, 100-((100*nBytesOut) / nBytesIn));
33 |
34 | // }
35 | // else
36 | // nDelay++;
37 |
38 | // Check if ESC was pressed and if so request stopping
39 | if (kbhit())
40 | {
41 | ch = getch();
42 | if (ch == 0)
43 | ch = getch();
44 | if (ch == 27)
45 | return 0;
46 | }
47 |
48 | return 1;
49 |
50 | } // CompressProc()
51 |
52 |
53 | ///////////////////////////////////////////////////////////////////////////////
54 | // DeompressMonitorProc() - The callback function
55 | ///////////////////////////////////////////////////////////////////////////////
56 |
57 | int DecompressMonitorProc(ULONG nBytesIn, ULONG nBytesOut, UINT nPercentComplete)
58 | {
59 | static UINT nDelay = 0;
60 | static UINT nRot = 0;
61 | char szGfx[]= "-\\|/";
62 | UCHAR ch;
63 |
64 | // if (nDelay > 16)
65 | // {
66 | nDelay = 0;
67 | nRot = (nRot+1) & 0x3;
68 | printf("\rDecompressing %c : %d%% ", szGfx[nRot], nPercentComplete);
69 | // }
70 | // else
71 | // nDelay++;
72 |
73 | // Check if ESC was pressed and if so request stopping
74 | if (kbhit())
75 | {
76 | ch = getch();
77 | if (ch == 0)
78 | ch = getch();
79 | if (ch == 27)
80 | return 0;
81 | }
82 |
83 | return 1;
84 |
85 | } // DecompressMonitorProc()
86 |
87 |
88 | ///////////////////////////////////////////////////////////////////////////////
89 | // mainGetFileSize()
90 | //
91 | // Uses Win32 functions to quickly get the size of a file (rather than using
92 | // fseek/ftell which is slow on large files
93 | //
94 | // Use BEFORE opening a file! :)
95 | //
96 | ///////////////////////////////////////////////////////////////////////////////
97 |
98 | ULONG mainGetFileSize(const char *szFile)
99 | {
100 | HANDLE hFile;
101 | ULONG nSize;
102 |
103 | hFile = CreateFile(szFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
104 | FILE_ATTRIBUTE_NORMAL, NULL);
105 |
106 | if ( hFile == INVALID_HANDLE_VALUE )
107 | return 0;
108 |
109 | nSize = GetFileSize(hFile, NULL);
110 |
111 | CloseHandle(hFile);
112 |
113 | return nSize;
114 |
115 | } // mainGetFileSize()
116 |
117 |
118 | ///////////////////////////////////////////////////////////////////////////////
119 | // main()
120 | ///////////////////////////////////////////////////////////////////////////////
121 |
122 | int main(int argc, char* argv[])
123 | {
124 | unsigned long nCompressedSize;
125 | unsigned long nUncompressedSize;
126 | int nRes;
127 | JB01_Compress oCompress; // Our compression class
128 | JB01_Decompress oDecompress; // Our decompression class
129 |
130 |
131 | printf("\nHiddenSoft Compression Routine - (c)2002-2003 Jonathan Bennett\n");
132 | printf("--> Extended Version 0.2 by CW2K - [12.10.2007]\n");
133 | printf("--------------------------------------------------------------\n\n");
134 |
135 | // Compress file to file function
136 | if ((argc ==4) && (!stricmp("-c", argv[1])))
137 | {
138 | // How big is the source file?
139 | nUncompressedSize = mainGetFileSize(argv[2]);
140 | printf("Input file size : %d\n", nUncompressedSize);
141 |
142 | // Do the compression
143 | oCompress.SetDefaults();
144 | oCompress.SetInputType(HS_COMP_FILE);
145 | oCompress.SetOutputType(HS_COMP_FILE);
146 | oCompress.SetInputFile(argv[2]);
147 | oCompress.SetOutputFile(argv[3]);
148 | oCompress.SetMonitorCallback(&CompressMonitorProc);
149 | oCompress.SetCompressionLevel(4);
150 | DWORD dwTime1 = timeGetTime();
151 | nRes = oCompress.Compress();
152 | DWORD dwTime2 = timeGetTime();
153 |
154 | printf("\rCompressed : %d%% (%d%%) ", oCompress.GetPercentComplete(), 100 - ( oCompress.GetCompressedSize() / nUncompressedSize) * 100 );
155 | printf("\nCompression time : %.2fs (including fileIO)\n", ((dwTime2-dwTime1)) / 1000.0);
156 |
157 | if (nRes != JB01_E_OK)
158 | {
159 | printf("Error compressing.\n");
160 | return 0;
161 | }
162 |
163 | // Print the output size
164 | printf("Output file size : %d\n", oCompress.GetCompressedSize());
165 | printf("Compression ratio : %.2f%%\n", 100 - ((oCompress.GetCompressedSize() / nUncompressedSize) * 100) );
166 | printf("Compression ratio : %.3f bpb\n", (oCompress.GetCompressedSize() * 8) / nUncompressedSize);
167 |
168 | return 0;
169 | }
170 |
171 |
172 |
173 |
174 | // Uncompress file to file function
175 | if ((argc==4) && (!stricmp("-d", argv[1])))
176 | {
177 | // How big is the source file?
178 | nCompressedSize = mainGetFileSize(argv[2]);
179 | printf("Input file size : %d\n", nCompressedSize);
180 |
181 | // Do the uncompression
182 | oDecompress.SetDefaults();
183 | oDecompress.SetInputType(HS_COMP_FILE);
184 | oDecompress.SetOutputType(HS_COMP_FILE);
185 | oDecompress.SetInputFile(argv[2]);
186 | oDecompress.SetOutputFile(argv[3]);
187 | oDecompress.SetMonitorCallback(&DecompressMonitorProc);
188 | DWORD dwTime1 = timeGetTime();
189 | nRes = oDecompress.Decompress();
190 | DWORD dwTime2 = timeGetTime();
191 |
192 | printf("\rDecompressed : %d%% ", oDecompress.GetPercentComplete());
193 | printf("\nCompression time : %.2fs (including fileIO)\n", ((dwTime2-dwTime1)) / 1000.0);
194 |
195 | if (nRes != JB01_E_OK)
196 | {
197 | printf("Error uncompressing.\n");
198 | return 0;
199 | }
200 |
201 | // Print filesize
202 | printf("Output file size : %d\n", mainGetFileSize(argv[3]));
203 |
204 | return 0;
205 |
206 | }
207 |
208 |
209 |
210 |
211 | // If we got here, invalid parameters
212 | printf("Usage: %s <-c | -d> \n", argv[0]);
213 | printf(" -c performs file to file compression\n");
214 | printf(" -d performs file to file decompression\n\n");
215 | printf("Supported files type(s) 'JB01' (and 'JB00', 'EA05', 'EA06' decompression only).\n");
216 |
217 | return 0;
218 | }
219 |
--------------------------------------------------------------------------------
/!SourceCode/SRC LZSS.exe/basictest.txt:
--------------------------------------------------------------------------------
1 | AAAAAAAABBBBBBBBCCCCCCCCDDDDDDDDEEEEEEEEFFFFFFFFGGGGGGGG
2 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/Main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/Main.cpp
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/PE-Stub_Win32Only.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/PE-Stub_Win32Only.bin
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RANROTB.CPP:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RANROTB.CPP
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RanRot.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RanRot", "RanRot.vcproj", "{EB75293C-0935-4DD4-8F8A-4F16B60F559D}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {EB75293C-0935-4DD4-8F8A-4F16B60F559D}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {EB75293C-0935-4DD4-8F8A-4F16B60F559D}.Debug|Win32.Build.0 = Debug|Win32
14 | {EB75293C-0935-4DD4-8F8A-4F16B60F559D}.Release|Win32.ActiveCfg = Release|Win32
15 | {EB75293C-0935-4DD4-8F8A-4F16B60F559D}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RanRot.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
27 |
30 |
33 |
36 |
39 |
42 |
54 |
57 |
60 |
63 |
75 |
78 |
81 |
84 |
87 |
90 |
93 |
96 |
97 |
106 |
109 |
112 |
115 |
118 |
121 |
135 |
138 |
141 |
144 |
159 |
162 |
165 |
168 |
171 |
174 |
177 |
180 |
181 |
182 |
183 |
184 |
185 |
190 |
193 |
194 |
197 |
198 |
201 |
202 |
205 |
206 |
207 |
212 |
215 |
216 |
217 |
222 |
223 |
224 |
225 |
226 |
227 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RanRot.vcproj.7.10.old:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
20 |
31 |
33 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
65 |
72 |
85 |
87 |
100 |
102 |
104 |
106 |
108 |
110 |
112 |
114 |
116 |
118 |
120 |
121 |
122 |
123 |
124 |
125 |
129 |
131 |
132 |
134 |
135 |
137 |
138 |
140 |
141 |
142 |
146 |
148 |
149 |
150 |
154 |
155 |
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RanRot.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
15 |
16 |
17 |
18 |
19 | Quelldateien
20 |
21 |
22 | Quelldateien
23 |
24 |
25 | Quelldateien
26 |
27 |
28 |
29 |
30 | Quelldateien
31 |
32 |
33 |
34 |
35 | Headerdateien
36 |
37 |
38 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/RanRot_MT.def:
--------------------------------------------------------------------------------
1 | ;LIBRARY RanRot_MT.dll
2 | EXPORTS
3 | MT_GetI8 = genrand_int31
4 | MT_Init = init_genrand
5 | RanRot_Init
6 | RanRot_GetI8
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/UpgradeLog.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/UpgradeLog2.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/_UpgradeReport_Files/UpgradeReport.css:
--------------------------------------------------------------------------------
1 | BODY
2 | {
3 | BACKGROUND-COLOR: white;
4 | FONT-FAMILY: "Verdana", sans-serif;
5 | FONT-SIZE: 100%;
6 | MARGIN-LEFT: 0px;
7 | MARGIN-TOP: 0px
8 | }
9 | P
10 | {
11 | FONT-FAMILY: "Verdana", sans-serif;
12 | FONT-SIZE: 70%;
13 | LINE-HEIGHT: 12pt;
14 | MARGIN-BOTTOM: 0px;
15 | MARGIN-LEFT: 10px;
16 | MARGIN-TOP: 10px
17 | }
18 | .note
19 | {
20 | BACKGROUND-COLOR: #ffffff;
21 | COLOR: #336699;
22 | FONT-FAMILY: "Verdana", sans-serif;
23 | FONT-SIZE: 100%;
24 | MARGIN-BOTTOM: 0px;
25 | MARGIN-LEFT: 0px;
26 | MARGIN-TOP: 0px;
27 | PADDING-RIGHT: 10px
28 | }
29 | .infotable
30 | {
31 | BACKGROUND-COLOR: #f0f0e0;
32 | BORDER-BOTTOM: #ffffff 0px solid;
33 | BORDER-COLLAPSE: collapse;
34 | BORDER-LEFT: #ffffff 0px solid;
35 | BORDER-RIGHT: #ffffff 0px solid;
36 | BORDER-TOP: #ffffff 0px solid;
37 | FONT-SIZE: 70%;
38 | MARGIN-LEFT: 10px
39 | }
40 | .issuetable
41 | {
42 | BACKGROUND-COLOR: #ffffe8;
43 | BORDER-COLLAPSE: collapse;
44 | COLOR: #000000;
45 | FONT-SIZE: 100%;
46 | MARGIN-BOTTOM: 10px;
47 | MARGIN-LEFT: 13px;
48 | MARGIN-TOP: 0px
49 | }
50 | .issuetitle
51 | {
52 | BACKGROUND-COLOR: #ffffff;
53 | BORDER-BOTTOM: #dcdcdc 1px solid;
54 | BORDER-TOP: #dcdcdc 1px;
55 | COLOR: #003366;
56 | FONT-WEIGHT: normal
57 | }
58 | .header
59 | {
60 | BACKGROUND-COLOR: #cecf9c;
61 | BORDER-BOTTOM: #ffffff 1px solid;
62 | BORDER-LEFT: #ffffff 1px solid;
63 | BORDER-RIGHT: #ffffff 1px solid;
64 | BORDER-TOP: #ffffff 1px solid;
65 | COLOR: #000000;
66 | FONT-WEIGHT: bold
67 | }
68 | .issuehdr
69 | {
70 | BACKGROUND-COLOR: #E0EBF5;
71 | BORDER-BOTTOM: #dcdcdc 1px solid;
72 | BORDER-TOP: #dcdcdc 1px solid;
73 | COLOR: #000000;
74 | FONT-WEIGHT: normal
75 | }
76 | .issuenone
77 | {
78 | BACKGROUND-COLOR: #ffffff;
79 | BORDER-BOTTOM: 0px;
80 | BORDER-LEFT: 0px;
81 | BORDER-RIGHT: 0px;
82 | BORDER-TOP: 0px;
83 | COLOR: #000000;
84 | FONT-WEIGHT: normal
85 | }
86 | .content
87 | {
88 | BACKGROUND-COLOR: #e7e7ce;
89 | BORDER-BOTTOM: #ffffff 1px solid;
90 | BORDER-LEFT: #ffffff 1px solid;
91 | BORDER-RIGHT: #ffffff 1px solid;
92 | BORDER-TOP: #ffffff 1px solid;
93 | PADDING-LEFT: 3px
94 | }
95 | .issuecontent
96 | {
97 | BACKGROUND-COLOR: #ffffff;
98 | BORDER-BOTTOM: #dcdcdc 1px solid;
99 | BORDER-TOP: #dcdcdc 1px solid;
100 | PADDING-LEFT: 3px
101 | }
102 | A:link
103 | {
104 | COLOR: #cc6633;
105 | TEXT-DECORATION: underline
106 | }
107 | A:visited
108 | {
109 | COLOR: #cc6633;
110 | }
111 | A:active
112 | {
113 | COLOR: #cc6633;
114 | }
115 | A:hover
116 | {
117 | COLOR: #cc3300;
118 | TEXT-DECORATION: underline
119 | }
120 | H1
121 | {
122 | BACKGROUND-COLOR: #003366;
123 | BORDER-BOTTOM: #336699 6px solid;
124 | COLOR: #ffffff;
125 | FONT-SIZE: 130%;
126 | FONT-WEIGHT: normal;
127 | MARGIN: 0em 0em 0em -20px;
128 | PADDING-BOTTOM: 8px;
129 | PADDING-LEFT: 30px;
130 | PADDING-TOP: 16px
131 | }
132 | H2
133 | {
134 | COLOR: #000000;
135 | FONT-SIZE: 80%;
136 | FONT-WEIGHT: bold;
137 | MARGIN-BOTTOM: 3px;
138 | MARGIN-LEFT: 10px;
139 | MARGIN-TOP: 20px;
140 | PADDING-LEFT: 0px
141 | }
142 | H3
143 | {
144 | COLOR: #000000;
145 | FONT-SIZE: 80%;
146 | FONT-WEIGHT: bold;
147 | MARGIN-BOTTOM: -5px;
148 | MARGIN-LEFT: 10px;
149 | MARGIN-TOP: 20px
150 | }
151 | H4
152 | {
153 | COLOR: #000000;
154 | FONT-SIZE: 70%;
155 | FONT-WEIGHT: bold;
156 | MARGIN-BOTTOM: 0px;
157 | MARGIN-TOP: 15px;
158 | PADDING-BOTTOM: 0px
159 | }
160 | UL
161 | {
162 | COLOR: #000000;
163 | FONT-SIZE: 70%;
164 | LIST-STYLE: square;
165 | MARGIN-BOTTOM: 0pt;
166 | MARGIN-TOP: 0pt
167 | }
168 | OL
169 | {
170 | COLOR: #000000;
171 | FONT-SIZE: 70%;
172 | LIST-STYLE: square;
173 | MARGIN-BOTTOM: 0pt;
174 | MARGIN-TOP: 0pt
175 | }
176 | LI
177 | {
178 | LIST-STYLE: square;
179 | MARGIN-LEFT: 0px
180 | }
181 | .expandable
182 | {
183 | CURSOR: hand
184 | }
185 | .expanded
186 | {
187 | color: black
188 | }
189 | .collapsed
190 | {
191 | DISPLAY: none
192 | }
193 | .foot
194 | {
195 | BACKGROUND-COLOR: #ffffff;
196 | BORDER-BOTTOM: #cecf9c 1px solid;
197 | BORDER-TOP: #cecf9c 2px solid
198 | }
199 | .settings
200 | {
201 | MARGIN-LEFT: 25PX;
202 | }
203 | .help
204 | {
205 | TEXT-ALIGN: right;
206 | margin-right: 10px;
207 | }
208 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/mt19937ar.c:
--------------------------------------------------------------------------------
1 | /*
2 | A C-program for MT19937, with initialization improved 2002/1/26.
3 | Coded by Takuji Nishimura and Makoto Matsumoto.
4 |
5 | Before using, initialize the state by using init_genrand(seed)
6 | or init_by_array(init_key, key_length).
7 |
8 | Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
9 | All rights reserved.
10 |
11 | Redistribution and use in source and binary forms, with or without
12 | modification, are permitted provided that the following conditions
13 | are met:
14 |
15 | 1. Redistributions of source code must retain the above copyright
16 | notice, this list of conditions and the following disclaimer.
17 |
18 | 2. Redistributions in binary form must reproduce the above copyright
19 | notice, this list of conditions and the following disclaimer in the
20 | documentation and/or other materials provided with the distribution.
21 |
22 | 3. The names of its contributors may not be used to endorse or promote
23 | products derived from this software without specific prior written
24 | permission.
25 |
26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
30 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 |
38 |
39 | Any feedback is very welcome.
40 | http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
41 | email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
42 | */
43 |
44 | //#include
45 |
46 | /* Period parameters */
47 | #define N 624
48 | #define M 397
49 | #define MATRIX_A 0x9908b0dfUL /* constant vector a */
50 | #define UPPER_MASK 0x80000000UL /* most significant w-r bits */
51 | #define LOWER_MASK 0x7fffffffUL /* least significant r bits */
52 |
53 | static unsigned long mt[N]; /* the array for the state vector */
54 | static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */
55 |
56 | /* initializes mt[N] with a seed */
57 | void _stdcall init_genrand(unsigned long s)
58 | {
59 | mt[0]= s & 0xffffffffUL;
60 | for (mti=1; mti> 30)) + mti);
63 | /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
64 | /* In the previous versions, MSBs of the seed affect */
65 | /* only MSBs of the array mt[]. */
66 | /* 2002/01/09 modified by Makoto Matsumoto */
67 | mt[mti] &= 0xffffffffUL;
68 | /* for >32 bit machines */
69 | }
70 | }
71 |
72 | /* initialize by an array with array-length */
73 | /* init_key is the array for initializing keys */
74 | /* key_length is its length */
75 | /* slight change for C++, 2004/2/26 */
76 | void init_by_array(unsigned long init_key[], int key_length)
77 | {
78 | int i, j, k;
79 | init_genrand(19650218UL);
80 | i=1; j=0;
81 | k = (N>key_length ? N : key_length);
82 | for (; k; k--) {
83 | mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
84 | + init_key[j] + j; /* non linear */
85 | mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
86 | i++; j++;
87 | if (i>=N) { mt[0] = mt[N-1]; i=1; }
88 | if (j>=key_length) j=0;
89 | }
90 | for (k=N-1; k; k--) {
91 | mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
92 | - i; /* non linear */
93 | mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
94 | i++;
95 | if (i>=N) { mt[0] = mt[N-1]; i=1; }
96 | }
97 |
98 | mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
99 | }
100 |
101 | /* generates a random number on [0,0xffffffff]-interval */
102 | unsigned long genrand_int32(void)
103 | {
104 | unsigned long y;
105 | static unsigned long mag01[2]={0x0UL, MATRIX_A};
106 | /* mag01[x] = x * MATRIX_A for x=0,1 */
107 |
108 | if (mti >= N) { /* generate N words at one time */
109 | int kk;
110 |
111 | if (mti == N+1) /* if init_genrand() has not been called, */
112 | init_genrand(5489UL); /* a default initial seed is used */
113 |
114 | for (kk=0;kk> 1) ^ mag01[y & 0x1UL];
117 | }
118 | for (;kk> 1) ^ mag01[y & 0x1UL];
121 | }
122 | y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
123 | mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];
124 |
125 | mti = 0;
126 | }
127 |
128 | y = mt[mti++];
129 |
130 | /* Tempering */
131 | y ^= (y >> 11);
132 | y ^= (y << 7) & 0x9d2c5680UL;
133 | y ^= (y << 15) & 0xefc60000UL;
134 | y ^= (y >> 18);
135 |
136 | return y;
137 | }
138 |
139 |
140 | /* generates a random number on [0,0x7fffffff]-interval */
141 | long _stdcall genrand_int31(void)
142 | {
143 | return (long)(genrand_int32()>>1);
144 | }
145 |
146 | /* generates a random number on [0,1]-real-interval */
147 | double genrand_real1(void)
148 | {
149 | return genrand_int32()*(1.0/4294967295.0);
150 | /* divided by 2^32-1 */
151 | }
152 |
153 | /* generates a random number on [0,1)-real-interval */
154 | double genrand_real2(void)
155 | {
156 | return genrand_int32()*(1.0/4294967296.0);
157 | /* divided by 2^32 */
158 | }
159 |
160 | /* generates a random number on (0,1)-real-interval */
161 | double genrand_real3(void)
162 | {
163 | return (((double)genrand_int32()) + 0.5)*(1.0/4294967296.0);
164 | /* divided by 2^32 */
165 | }
166 |
167 | /* generates a random number on [0,1) with 53-bit resolution*/
168 | double genrand_res53(void)
169 | {
170 | unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;
171 | return(a*67108864.0+b)*(1.0/9007199254740992.0);
172 | }
173 | /* These real versions are due to Isaku Wada, 2002/01/09 added */
174 |
175 |
176 | //int main2(void)
177 | //{
178 | // int i;
179 | //// unsigned long init[4]={0x123, 0x234, 0x345, 0x456}, length=4;
180 | //// init_by_array(init, length);
181 | //
182 | // init_genrand(0x16FA);
183 | // printf("1000 outputs of genrand_int32()\n");
184 | // for (i=0; i<10; i++) {
185 | // printf("%x ", genrand_int31());
186 | // if (i%5==4) printf("\n");
187 | // }
188 | // //printf("\n1000 outputs of genrand_real2()\n");
189 | // //for (i=0; i<1000; i++) {
190 | // // printf("%10.8f ", genrand_real2());
191 | // // if (i%5==4) printf("\n");
192 | // //}
193 | // return 0;
194 | //}
195 |
--------------------------------------------------------------------------------
/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/randomC.H:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC RanRot_MT.dll - Mersenne Twister & RanRot/randomC.H
--------------------------------------------------------------------------------
/!SourceCode/SRC/CBinaryReader.cls:
--------------------------------------------------------------------------------
1 | VERSION 1.0 CLASS
2 | BEGIN
3 | MultiUse = -1 'True
4 | Persistable = 0 'NotPersistable
5 | DataBindingBehavior = 0 'vbNone
6 | DataSourceBehavior = 0 'vbNone
7 | MTSTransactionMode = 0 'NotAnMTSObject
8 | END
9 | Attribute VB_Name = "CBinaryReader"
10 | Attribute VB_GlobalNameSpace = False
11 | Attribute VB_Creatable = True
12 | Attribute VB_PredeclaredId = False
13 | Attribute VB_Exposed = False
14 | Public LoadedFile As String
15 | Public Position As Long
16 | Private m_Length As Long
17 |
18 | Private b() As Byte
19 | Private Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As Any, ByVal src As Long, ByVal length&)
20 |
21 | Property Get length() As Long
22 | length = m_Length
23 | End Property
24 |
25 | Property Get EOS() As Boolean
26 | If Position >= m_Length Then EOS = True
27 | End Property
28 |
29 | Function Load(fPath) As Boolean
30 |
31 | On Error GoTo hell
32 |
33 | LoadedFile = fPath
34 |
35 | Dim f As Long
36 | f = m_FreeFile("BinaryReader.Load")
37 | Open fPath For Binary As f
38 | ReDim b(LOF(f) - 1)
39 | Get f, , b()
40 | m_Close f, "BinaryReader.Load"
41 |
42 | Position = 0
43 | m_Length = UBound(b) + 1
44 | Load = True
45 |
46 | hell:
47 | End Function
48 |
49 | Sub Move(ByVal size As Long)
50 | Position = Position + size
51 | End Sub
52 |
53 | 'should not be a property because ide will query properties
54 | 'at runtime if you mouse over them and then it would move pointer!!
55 | Function int32() As Long
56 | If Position + 4 <= m_Length Then
57 | MoveMemory int32, VarPtr(b(Position)), 4
58 | End If
59 | Position = Position + 4
60 | End Function
61 |
62 | Function int16() As Integer
63 | If Position + 2 <= m_Length Then
64 | MoveMemory int16, VarPtr(b(Position)), 2
65 | End If
66 | Position = Position + 2
67 | End Function
68 |
69 | Function int8() As Byte
70 | If Position + 1 <= m_Length Then
71 | MoveMemory int8, VarPtr(b(Position)), 1
72 | End If
73 | Position = Position + 1
74 | End Function
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/Decompile.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/Decompile.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/Exe2Aut.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/Exe2Aut.ico
--------------------------------------------------------------------------------
/!SourceCode/SRC/ExtractAHKScript.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "ExtractAHKScript"
2 | Option Explicit
3 | 'Private Declare Function CreateProcess Lib "kernel32" Alias _
4 | ' "CreateProcessA" (ByVal lpApplicationName As Long, _
5 | ' ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, _
6 | ' ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, _
7 | ' ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, _
8 | ' ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO, _
9 | ' lpProcessInformation As PROCESS_INFORMATION) As Long
10 | '
11 | 'Private Type SECURITY_ATTRIBUTES
12 | ' nLength As Long
13 | ' lpSecurityDescriptor As Long
14 | ' bInheritHandle As Long
15 | 'End Type
16 | '
17 | 'Private Type STARTUPINFO
18 | ' cb As Long
19 | ' lpReserved As Long
20 | ' lpDesktop As Long
21 | ' lpTitle As Long
22 | ' dwX As Long
23 | ' dwY As Long
24 | ' dwXSize As Long
25 | ' dwYSize As Long
26 | ' dwXCountChars As Long
27 | ' dwYCountChars As Long
28 | ' dwFillAttribute As Long
29 | ' dwFlags As Long
30 | ' wShowWindow As Integer
31 | ' cbReserved2 As Integer
32 | ' lpReserved2 As Byte
33 | ' hStdInput As Long
34 | ' hStdOutput As Long
35 | ' hStdError As Long
36 | 'End Type
37 | '
38 | 'Private Type PROCESS_INFORMATION
39 | ' hProcess As Long
40 | ' hThread As Long
41 | ' dwProcessId As Long
42 | ' dwThreadId As Long
43 | 'End Type
44 | 'Private Const CREATE_SUSPENDED As Long = &H4
45 | '
46 | 'Private Declare Function TerminateProcess Lib "kernel32.dll" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
47 |
48 |
49 | Private Const RT_ICON As Long = 3&
50 | Private Const RT_RCDATA As Long = 10&
51 | Private Const RT_STRING As Long = 6&
52 | Private Const RT_VERSION As Long = 16
53 | 'Private Const RT_GROUP_ICON As Long = (RT_ICON + DIFFERENCE)
54 | 'Private Const RT_GROUP_CURSOR As Long = (RT_CURSOR + DIFFERENCE)
55 | Private Const RT_CURSOR As Long = 1&
56 | Private Declare Function FindResource Lib "kernel32.dll" Alias "FindResourceA" (ByVal hInstance As Long, ByVal lpName As String, ByVal lpType As Long) As Long
57 |
58 |
59 | Private Declare Function LoadResource Lib "kernel32.dll" (ByVal hInstance As Long, ByVal hResInfo As Long) As Long
60 | Private Declare Function LockResource Lib "kernel32.dll" (ByVal hResData As Long) As Long
61 |
62 | Private Declare Function LoadLibraryEx Lib "kernel32.dll" Alias "LoadLibraryExA" (ByVal lpLibFileName As String, ByVal hFile As Long, ByVal dwFlags As Long) As Long
63 | Private Const LOAD_LIBRARY_AS_DATAFILE As Long = &H2
64 | Private Declare Function FreeLibrary Lib "kernel32.dll" (ByVal hLibModule As Long) As Long
65 | Private Declare Function SizeofResource Lib "kernel32.dll" (ByVal hInstance As Long, ByVal hResInfo As Long) As Long
66 |
67 | Function SaveAHK11_Script(ExeFilename As ClsFilename) As Boolean
68 |
69 | ' Dim StartInfo As STARTUPINFO
70 | ' Dim ProcInfo As PROCESS_INFORMATION
71 | '
72 | Dim retval&
73 | Dim hModule&
74 |
75 | hModule = LoadLibraryEx( _
76 | ExeFilename.filename, 0, _
77 | LOAD_LIBRARY_AS_DATAFILE)
78 |
79 | If hModule = 0 Then _
80 | showError ("LoadLibraryEx() ..._AS_DATAFILE fail")
81 |
82 |
83 | Const AHK_SCRIPT_RES_NAME$ = ">AUTOHOTKEY SCRIPT<"
84 | Dim hResInfo As Long
85 | hResInfo = FindRes_RCData(hModule, _
86 | AHK_SCRIPT_RES_NAME)
87 |
88 | If hResInfo Then
89 | 'New AHK 1.1 Script found!
90 | SaveAHK11_Script = True
91 |
92 | Dim AHK_Script$
93 | AHK_Script = LoadRes(hModule, _
94 | hResInfo)
95 |
96 |
97 | If FreeLibrary(hModule) = 0 Then _
98 | showError ("FreeLibrary fail")
99 |
100 | ' Dim FileName_AHKScript As New ClsFilename
101 | ' FileName_AHKScript = ExeFilename
102 |
103 | ExeFilename.ext = "ahk"
104 |
105 | fso.writeFile _
106 | ExeFilename.filename, _
107 | AHK_Script
108 | End If
109 |
110 | End Function
111 |
112 | Public Sub showError(Text)
113 |
114 | End Sub
115 |
116 | Public Function FindRes_RCData(hModule&, ResName$) As Long
117 | FindRes_RCData = FindResource(hModule, _
118 | ResName, _
119 | RT_RCDATA)
120 |
121 | ' If hResInfo = 0 Then _
122 | ' showError ("FindResource('" & ResName & "') fail")
123 |
124 | End Function
125 |
126 | Public Function LoadRes(hModule&, hResInfo) As String
127 |
128 |
129 | Dim AHKScriptSize&
130 | AHKScriptSize = SizeofResource(hModule, _
131 | hResInfo)
132 |
133 | Dim hResData&
134 | hResData = LoadResource(hModule, _
135 | hResInfo)
136 |
137 | Dim AHKScriptPtr&
138 | AHKScriptPtr = LockResource( _
139 | hResData)
140 |
141 |
142 | Dim AHKScript$
143 | AHKScript = Space(AHKScriptSize)
144 |
145 | MemCopy AHKScript, AHKScriptPtr, AHKScriptSize
146 |
147 | LoadRes = AHKScript
148 |
149 | If (LoadRes Like "; QueryUnloadConstants.vbFormCode Then
125 | ' cmd_cancel_Click
126 | ' End If
127 | 'End Sub
128 |
129 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/FrmAbout.frm:
--------------------------------------------------------------------------------
1 | VERSION 5.00
2 | Begin VB.Form FrmAbout
3 | BorderStyle = 0 'None
4 | Caption = "About"
5 | ClientHeight = 4920
6 | ClientLeft = 0
7 | ClientTop = 0
8 | ClientWidth = 5835
9 | LinkTopic = "Form1"
10 | ScaleHeight = 4920
11 | ScaleWidth = 5835
12 | ShowInTaskbar = 0 'False
13 | StartUpPosition = 3 'Windows Default
14 | End
15 | Attribute VB_Name = "FrmAbout"
16 | Attribute VB_GlobalNameSpace = False
17 | Attribute VB_Creatable = False
18 | Attribute VB_PredeclaredId = True
19 | Attribute VB_Exposed = False
20 | Option Explicit
21 |
22 | Private Sub Form_Click()
23 |
24 | Unload Me
25 | End Sub
26 |
27 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/Frm_Options.frx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/Frm_Options.frx
--------------------------------------------------------------------------------
/!SourceCode/SRC/Parser.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "Parser"
2 | '_________________________________________________________________
3 | ' NOTE: Module Not need anymore since Tidy v2.0.24.4 November 30, 2008 comes along with long scriptLines
4 |
5 | Option Explicit
6 | Dim Str As StringReader
7 | Dim Level&
8 | Dim StartSym$, EndSym$
9 | Public Function CropParenthesis$(Expression$, Optional StartSym = "(", Optional EndSym = ")")
10 | Set Str = New StringReader
11 | Str = Expression
12 |
13 | Parser.StartSym = StartSym
14 | Parser.EndSym = EndSym
15 |
16 | Level = 0
17 | CropParenthesis = BB()
18 |
19 | If Level <> 0 Then Err.Raise vbObjectError, , "Parenthesis unembalanced: (" & Level & " too much) in expression: " & Str & vbCrLf & "ignored: " & Str.FixedString(-1)
20 |
21 | End Function
22 |
23 |
24 | Function BB$()
25 | Dim Text$, char$
26 | Text = ""
27 |
28 | Do While Str.EOS = False
29 | char = Str.FixedString(1)
30 | Select Case char
31 | Case StartSym '"("
32 | Inc Level
33 | BB
34 |
35 | ' dirty fix:
36 | Text = Text & char & EndSym
37 |
38 | Case EndSym ' ")"
39 | Dec Level
40 | Exit Do
41 |
42 | Case Else
43 | Text = Text & char
44 |
45 | End Select
46 |
47 | Loop
48 |
49 | BB = Text
50 | ' Debug.Print Space(Level * 2) & text
51 |
52 | End Function
53 |
54 |
55 | Function AddLineBreakToLongLines$(ByRef Lines)
56 | ' Adding a underscope '_' for lines longer than 2047
57 | ' so Tidy will not complain
58 |
59 | ' Dim Lines
60 | Dim Line, NewLine As New clsStrCat
61 | ' Lines = Split(TextLine, vbCrLf)
62 |
63 | 'Find place to break line
64 | '...total "&@CRLF& "fees....
65 | ' ^-NextAmpersandPos
66 | 'Will be changed to
67 | '...total "&@CRLF&_
68 | '"fees....
69 | '
70 |
71 | ' Const MAX_CODE_LINE_LENGHT& = 2000
72 | ' Const MAX_CODE_LINE_LENGHT& = 1897
73 | Const MAX_CODE_LINE_LENGHT& = 1800
74 |
75 |
76 | For Line = 0 To UBound(Lines)
77 |
78 | Dim lineLen&
79 | lineLen = Len(Lines(Line))
80 |
81 |
82 | If lineLen > MAX_CODE_LINE_LENGHT Then
83 |
84 | NewLine.Clear
85 |
86 | Dim linePos&, LastPos&
87 | linePos = 1
88 | LastPos = 1
89 |
90 | Do While linePos + MAX_CODE_LINE_LENGHT < lineLen
91 |
92 | Dim CrackAtPos&
93 | CrackAtPos = InStrRev(Mid(Lines(Line), linePos, MAX_CODE_LINE_LENGHT), "&")
94 | If (CrackAtPos <> 0) Then
95 |
96 | NewLine.Concat Mid(Lines(Line), linePos, CrackAtPos)
97 | NewLine.Concat " _" & vbCrLf
98 | ' Test for special cases
99 | ElseIf Mid(Lines(Line), linePos, 7) = "GLOBAL " Then
100 | CrackAtPos = InStrRev(Mid(Lines(Line), linePos, MAX_CODE_LINE_LENGHT), ",")
101 | If (CrackAtPos <> 0) Then
102 | NewLine.Concat Mid(Lines(Line), linePos, CrackAtPos - 1)
103 | NewLine.Concat vbCrLf & "GLOBAL "
104 | Else
105 |
106 | GoTo notice_user
107 | End If
108 |
109 | 'IF with AND
110 | ElseIf Mid(Lines(Line), linePos, 3) = "IF " Then
111 | CrackAtPos = InStrRev(Mid(Lines(Line), linePos, MAX_CODE_LINE_LENGHT), " AND ")
112 | If (CrackAtPos <> 0) Then
113 | NewLine.Concat Mid(Lines(Line), linePos, CrackAtPos)
114 | NewLine.Concat " _" & vbCrLf
115 | Else
116 |
117 | GoTo notice_user
118 | End If
119 | Else
120 | notice_user:
121 | 'notice in the log - user should manually fix this
122 | CrackAtPos = MAX_CODE_LINE_LENGHT
123 | NewLine.Concat Mid(Lines(Line), linePos, CrackAtPos)
124 | Log " PROBLEM: Line " & Line & " is longer than " & MAX_CODE_LINE_LENGHT & " Bytes. Tidy will refuse to work. Fix this manually an then apply Tidy."
125 |
126 | End If
127 |
128 | Inc linePos, CrackAtPos
129 |
130 | Loop
131 |
132 | 'add last end
133 | NewLine.Concat Mid(Lines(Line), linePos)
134 |
135 |
136 | Lines(Line) = NewLine.value
137 |
138 | End If
139 | Next
140 |
141 | AddLineBreakToLongLines = Join(Lines, vbCrLf)
142 |
143 | End Function
144 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/SeperateIncludes.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/SeperateIncludes.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/clsStrCat.cls:
--------------------------------------------------------------------------------
1 | VERSION 1.0 CLASS
2 | BEGIN
3 | MultiUse = -1 'True
4 | Persistable = 0 'NotPersistable
5 | DataBindingBehavior = 0 'vbNone
6 | DataSourceBehavior = 0 'vbNone
7 | MTSTransactionMode = 0 'NotAnMTSObject
8 | END
9 | Attribute VB_Name = "clsStrCat"
10 | Attribute VB_GlobalNameSpace = False
11 | Attribute VB_Creatable = True
12 | Attribute VB_PredeclaredId = False
13 | Attribute VB_Exposed = False
14 | Option Explicit
15 | 'redone
16 |
17 | Private buf() As String
18 | Private sz As Long
19 |
20 | Public Property Let value(vData As String)
21 | Erase buf
22 | sz = Len(vData)
23 | push buf, vData
24 | End Property
25 |
26 | Public Property Get value() As String
27 | value = Join(buf, "")
28 | End Property
29 |
30 | Public Sub Clear()
31 | Erase buf
32 | sz = 0
33 | End Sub
34 |
35 | Public Sub Concat(ByRef value As String)
36 | push buf, value
37 | sz = sz + Len(value)
38 | End Sub
39 |
40 | 'Public Sub ConcatVariant(ByRef value As Variant)
41 | '
42 | 'End Sub
43 |
44 | 'not used
45 | Public Property Get Length() As Long
46 | Length = sz
47 | End Property
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/frmLogView.frm:
--------------------------------------------------------------------------------
1 | VERSION 5.00
2 | Begin VB.Form frmLogView
3 | Caption = "View Log"
4 | ClientHeight = 7845
5 | ClientLeft = 60
6 | ClientTop = 450
7 | ClientWidth = 11670
8 | BeginProperty Font
9 | Name = "System"
10 | Size = 9.75
11 | Charset = 0
12 | Weight = 700
13 | Underline = 0 'False
14 | Italic = 0 'False
15 | Strikethrough = 0 'False
16 | EndProperty
17 | LinkTopic = "Form1"
18 | ScaleHeight = 7845
19 | ScaleWidth = 11670
20 | StartUpPosition = 2 'CenterScreen
21 | Begin VB.TextBox txtlog
22 | BeginProperty Font
23 | Name = "Courier New"
24 | Size = 9.75
25 | Charset = 0
26 | Weight = 400
27 | Underline = 0 'False
28 | Italic = 0 'False
29 | Strikethrough = 0 'False
30 | EndProperty
31 | Height = 3135
32 | Left = 0
33 | MultiLine = -1 'True
34 | ScrollBars = 2 'Vertical
35 | TabIndex = 0
36 | Top = 0
37 | Width = 4575
38 | End
39 | Begin VB.CommandButton cmd_Quit
40 | Cancel = -1 'True
41 | Caption = "Quit"
42 | Height = 255
43 | Left = 4920
44 | TabIndex = 1
45 | TabStop = 0 'False
46 | Top = 120
47 | Width = 555
48 | End
49 | End
50 | Attribute VB_Name = "frmLogView"
51 | Attribute VB_GlobalNameSpace = False
52 | Attribute VB_Creatable = False
53 | Attribute VB_PredeclaredId = True
54 | Attribute VB_Exposed = False
55 | 'used if dbl click log list box on main form
56 |
57 | Option Explicit
58 |
59 | Private Sub cmd_Quit_Click()
60 | Me.Hide
61 | End Sub
62 |
63 | Private Sub Form_Resize()
64 | On Error Resume Next
65 |
66 | With txtlog
67 | .Height = Me.Height - 550
68 | .Width = Me.Width - 170
69 | End With
70 | End Sub
71 |
72 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/frmMain.frx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/frmMain.frx
--------------------------------------------------------------------------------
/!SourceCode/SRC/frmSearchResults.frm:
--------------------------------------------------------------------------------
1 | VERSION 5.00
2 | Begin VB.Form frmSearchResults
3 | BorderStyle = 4 'Fixed ToolWindow
4 | Caption = "Please choose a script locations"
5 | ClientHeight = 3780
6 | ClientLeft = 2760
7 | ClientTop = 3705
8 | ClientWidth = 2985
9 | LinkTopic = "Form1"
10 | MaxButton = 0 'False
11 | MinButton = 0 'False
12 | ScaleHeight = 3780
13 | ScaleWidth = 2985
14 | ShowInTaskbar = 0 'False
15 | StartUpPosition = 2 'CenterScreen
16 | Begin VB.CommandButton cmd_cancel
17 | Cancel = -1 'True
18 | Caption = "Cancel"
19 | Height = 495
20 | Left = 4080
21 | TabIndex = 2
22 | TabStop = 0 'False
23 | Top = 600
24 | Width = 1215
25 | End
26 | Begin VB.CommandButton cmd_ok
27 | Caption = "Ok"
28 | Default = -1 'True
29 | Height = 495
30 | Left = 4080
31 | TabIndex = 1
32 | TabStop = 0 'False
33 | Top = 0
34 | Width = 1215
35 | End
36 | Begin VB.ListBox List_Locations
37 | Height = 3765
38 | Left = 0
39 | TabIndex = 0
40 | Top = 0
41 | Width = 3015
42 | End
43 | End
44 | Attribute VB_Name = "frmSearchResults"
45 | Attribute VB_GlobalNameSpace = False
46 | Attribute VB_Creatable = False
47 | Attribute VB_PredeclaredId = True
48 | Attribute VB_Exposed = False
49 | 'used in decompiler.FindLocation if more than one search location found...
50 |
51 | Option Explicit
52 | Public SelectedLocation&
53 | Public Locations As Collection
54 |
55 |
56 | Private Sub cmd_cancel_Click()
57 | DoCancel
58 | End Sub
59 |
60 | Private Sub cmd_ok_Click()
61 | DoSelect
62 | End Sub
63 |
64 | Private Sub Form_Initialize()
65 |
66 | SelectedLocation = -1
67 |
68 | End Sub
69 |
70 | Private Sub Form_Load()
71 |
72 | With List_Locations
73 | Dim item
74 | For Each item In Locations
75 | .AddItem H32(item)
76 | Next
77 |
78 | If .ListCount >= 1 Then
79 | .ListIndex = 0
80 | End If
81 |
82 | End With
83 |
84 | End Sub
85 |
86 |
87 | Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
88 | If UnloadMode = 0 Then DoCancel
89 | End Sub
90 |
91 |
92 | Private Sub List_Locations_DblClick()
93 | DoSelect
94 | End Sub
95 |
96 |
97 | Public Sub DoSelect()
98 | SelectedLocation = List_Locations.ListIndex + 1
99 | Unload Me
100 | End Sub
101 |
102 | Public Sub DoCancel()
103 | SelectedLocation = -1
104 | Unload Me
105 | End Sub
106 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/ApiHelper.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/lib/ApiHelper.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/ClsFilename.cls:
--------------------------------------------------------------------------------
1 | VERSION 1.0 CLASS
2 | BEGIN
3 | MultiUse = -1 'True
4 | Persistable = 0 'NotPersistable
5 | DataBindingBehavior = 0 'vbNone
6 | DataSourceBehavior = 0 'vbNone
7 | MTSTransactionMode = 0 'NotAnMTSObject
8 | END
9 | Attribute VB_Name = "ClsFilename"
10 | Attribute VB_GlobalNameSpace = False
11 | Attribute VB_Creatable = False
12 | Attribute VB_PredeclaredId = False
13 | Attribute VB_Exposed = False
14 | Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
15 | Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
16 | Option Explicit
17 |
18 | Public mvarFileName$
19 |
20 | 'default method of class...
21 | Public Property Get FileName() As String
22 | Attribute FileName.VB_UserMemId = 0
23 | FileName = mvarFileName
24 | End Property
25 |
26 | Public Property Let FileName(ByVal vNewValue As String)
27 | mvarFileName = Trim(vNewValue)
28 | End Property
29 |
30 | ' FileName.WholeName = .lpstrFile
31 | ' FileName.Path = Left(.lpstrFile, .nFileOffset)
32 | ' FileName.FileName = Mid(.lpstrFile, .nFileOffset, .nFileExtension - .nFileOffset)
33 | ' FileName.Ext = Mid(.lpstrFile, .nFileExtension, -1)
34 |
35 | 'LastDir
36 | Public Property Get Dir() As String
37 | On Error Resume Next
38 | Dim tmp
39 | tmp = Split(mvarFileName, "\")
40 | Dir = tmp(UBound(tmp) - 1) & "\"
41 | End Property
42 |
43 |
44 | Public Property Get Path() As String
45 | Path = Left(mvarFileName, InStrRev(mvarFileName, "\"))
46 | End Property
47 |
48 | Public Property Let Path(ByVal vNewValue As String)
49 | If Right(vNewValue, 1) = "\" Then
50 | mvarFileName = vNewValue & Name & Ext
51 | Else
52 | mvarFileName = vNewValue & "\" & Name & Ext
53 | End If
54 | End Property
55 |
56 |
57 | Public Property Get Name() As String
58 | On Error Resume Next
59 | Dim NameExt$
60 | NameExt = Mid$(mvarFileName, Len(Path) + 1)
61 |
62 | Dim DotPos&
63 | DotPos = InStrRev(NameExt, ".")
64 | If DotPos Then
65 | Name = Mid$(NameExt, 1, DotPos - 1)
66 | Else
67 | Name = NameExt
68 | End If
69 |
70 | End Property
71 |
72 | Public Property Let Name(ByVal vNewValue As String)
73 | mvarFileName = Path & vNewValue & Ext
74 | End Property
75 |
76 |
77 | Public Property Get Ext() As String
78 | On Error Resume Next
79 | Ext = Mid$(mvarFileName, InStrRev(mvarFileName, "."))
80 | End Property
81 |
82 | Public Property Let Ext(ByVal vNewValue As String)
83 |
84 | mvarFileName = Path & Name & IIf(Left(vNewValue, 1) = ".", "", ".") & vNewValue
85 | End Property
86 |
87 | Public Property Get NameWithExt() As String
88 | On Error Resume Next
89 | NameWithExt = Mid$(mvarFileName, Len(Path) + 1)
90 | End Property
91 |
92 | Public Property Let NameWithExt(ByVal vNewValue As String)
93 | ' mvarFileName = Replace(Path & vNewValue, "\\", "\")
94 | mvarFileName = Path & vNewValue
95 | End Property
96 |
97 | Public Sub MakePath()
98 | ' create Dir and stop on all error other than 'dir already exists'
99 |
100 | Dim NewDir, NewPath$
101 | NewPath = ""
102 |
103 | For Each NewDir In Split(Path, "\")
104 |
105 | 'Extent path Dir by Dir Create
106 | NewPath = NewPath & NewDir & "\"
107 |
108 | On Error Resume Next
109 | MkDir NewPath
110 |
111 |
112 | '75 - "Path/File access error" Example: "\"
113 | '76 - "Path not found" Example: "\\intel2400"
114 | If (Err <> 75) And (Err <> 0) And (Err <> 76) Then
115 | Dim tmpstr$
116 | tmpstr = Err.Description & " [" & Err.Number & "] when creating dir: " & Path
117 | On Error GoTo 0
118 | Err.Raise vbObjectError, , tmpstr
119 | End If
120 |
121 | Next
122 |
123 | End Sub
124 |
125 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/Commandline.cls:
--------------------------------------------------------------------------------
1 | VERSION 1.0 CLASS
2 | BEGIN
3 | MultiUse = -1 'True
4 | Persistable = 0 'NotPersistable
5 | DataBindingBehavior = 0 'vbNone
6 | DataSourceBehavior = 0 'vbNone
7 | MTSTransactionMode = 0 'NotAnMTSObject
8 | END
9 | Attribute VB_Name = "CCommandlineOptions"
10 | Attribute VB_GlobalNameSpace = False
11 | Attribute VB_Creatable = True
12 | Attribute VB_PredeclaredId = False
13 | Attribute VB_Exposed = False
14 | Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
15 | Attribute VB_Ext_KEY = "Member0" ,"CommandLine"
16 | Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
17 | Option Explicit
18 |
19 | Public QuitWhenFinish As Boolean
20 | Public SilentMode As Boolean
21 | Public DirMode As Boolean
22 | Public path As String
23 | Public IsCommandlineMode As Boolean
24 |
25 | Public NumberOfCommandLineArgs
26 | Public CommandLine As String
27 |
28 | Private argsWithQuotes$()
29 | Private Args$()
30 | Private EmptyArray$()
31 |
32 | Private Sub Class_Initialize()
33 | Dim tmp As String
34 |
35 | CommandLine = Command
36 | If Len(CommandLine) = 0 Then Exit Sub
37 |
38 | 'so the split function requires quotes around paths with spaces in them,
39 | 'lets first just do a basic check to see if only a path was specified..
40 | tmp = Trim(VBA.Replace(Command, """", Empty))
41 | If fso.FileExists(tmp) Or fso.FolderExists(tmp) Then
42 | IsCommandlineMode = True
43 | NumberOfCommandLineArgs = 1
44 | path = tmp
45 | DirMode = fso.FolderExists(tmp)
46 | Log "Command Line Mode: Processing: " & IIf(DirMode, "Directory", "File") & ": " & path
47 | Else
48 | Call commandLineSplitRek
49 | ProcessCommandline
50 | End If
51 |
52 |
53 | End Sub
54 |
55 | Private Sub ProcessCommandline()
56 |
57 | With Me
58 |
59 | If .NumberOfCommandLineArgs Then
60 |
61 | Log "Cmdline Args: " & .CommandLine
62 |
63 | Dim arg
64 | For Each arg In .getArgs
65 |
66 | 'Check for options
67 | If arg Like "[/-]*" Then
68 |
69 | If arg Like "?[qQ]" Then
70 | QuitWhenFinish = True
71 | Log "Option 'QuitWhenFinish' enabled."
72 |
73 | ElseIf arg Like "?[sS]" Then
74 | SilentMode = True
75 | Log "Option 'RunSilent' enabled."
76 |
77 | ElseIf arg Like "?[hH]" Then
78 | MsgBox Replace(Replace("Command line option support: [-s -q] \n\t-s SilentMode (no UI)\n\t-q Quit When Finish", "\n", vbCrLf), "\t", vbTab), vbInformation
79 | End
80 | Else
81 | Log "ERR_Unknow option: '" & arg & "'"
82 |
83 | End If
84 |
85 | ' Check if CommandArg is a FileName
86 | Else
87 |
88 | If IsCommandlineMode Then
89 | Log "ERR_Invalid Argument ('" & arg & "') filename already set."
90 |
91 | Else
92 | If fso.FileExists(arg) Then
93 | Log "Command line file mode ok: " & arg
94 | IsCommandlineMode = True
95 | path = arg
96 | Log "FileName : " & arg
97 | ElseIf fso.FolderExists(arg) Then
98 | Log "Command line directory mode ok: " & arg
99 | IsCommandlineMode = True
100 | path = arg
101 | DirMode = True
102 | SilentMode = False
103 | Else
104 | Log "ERR_Invalid Argument. Can't open file '" & arg & "'"
105 | End If
106 | End If
107 |
108 | End If
109 | Next
110 | End If
111 | End With
112 |
113 | 'Verify
114 | If SilentMode And Not QuitWhenFinish Then
115 | Log "ERR 'SilentMode' only makes sense together with 'QuitWhenFinish'. As long as you don't also enable 'QuitWhenFinish' 'SilentMode' is ignored "
116 | SilentMode = False
117 | End If
118 |
119 | If DirMode And SilentMode Then SilentMode = False
120 |
121 | End Sub
122 |
123 |
124 | '///////////////////////////////////////////////////
125 | '// getArgs - Get CommandLineArguments with Quotes
126 | Public Function getArgs() As String()
127 | getArgs = Args
128 | End Function
129 |
130 | Public Function getArgsWithQuotes()
131 | getArgsWithQuotes = argsWithQuotes
132 | End Function
133 |
134 |
135 |
136 |
137 |
138 | '////////////////////////////////////////////////////////////////////////////////////////////////
139 | '// commandLineSplitRek - Split the commandLine and store chunks in args() and argsWithQuotes()
140 | '// should only used by the Constructor
141 | Private Sub commandLineSplitRek(Optional ByVal startPos = 1, Optional levelCounter = 0)
142 | 'On Error GoTo commandLineSplitRek_err
143 |
144 | Dim endPos% ' Endposition for cut (...e.exe"<-)
145 | ' Dim startPos% ' Startposition for "new" commandline (->"C:\p...")
146 |
147 | endPos = Len(CommandLine) + 1
148 |
149 | 'Filter Leading Space
150 | For startPos = startPos To endPos
151 | If Mid(CommandLine, startPos, 1) > " " Then Exit For
152 | Next
153 |
154 | ' Trivial case - Empty String
155 | If startPos >= endPos Then
156 | ' create array for saving commandline arguments
157 | NumberOfCommandLineArgs = levelCounter
158 | If NumberOfCommandLineArgs > 0 Then
159 | ReDim Args(NumberOfCommandLineArgs - 1)
160 | Else
161 | ' Clear Arrays
162 | Args = EmptyArray
163 | End If
164 |
165 | ' Recursion case
166 | Else
167 |
168 | ' does Commandline starts with "C:\P...
169 | If Mid(CommandLine, startPos, 1) = """" Then
170 |
171 | ' seek over quote
172 | Inc startPos
173 |
174 | ' find next "(DoubleQuote)
175 | endPos = InStr(startPos, CommandLine, """")
176 | Else
177 | ' find next ' '(Space)
178 | endPos = InStr(startPos, CommandLine, " ")
179 | End If
180 |
181 | ' we are already at the end
182 | If (endPos <= 0) Then
183 | endPos = Len(CommandLine) + 1
184 | End If
185 |
186 | ' Call commandLineSplitRek recursiv with "new" commandline 6 increase levelCounter
187 | commandLineSplitRek endPos + 1, levelCounter + 1
188 |
189 | ' Save Data in Array
190 | Args(levelCounter) = Mid(CommandLine, startPos, endPos - startPos)
191 |
192 | End If
193 |
194 | 'commandLineSplitRek_err:
195 | End Sub
196 |
197 |
198 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/ErrorHelper.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/lib/ErrorHelper.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/Helper.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/lib/Helper.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/Replace.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/lib/Replace.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/UTF8.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "UTF8"
2 | Option Compare Binary
3 | Option Explicit
4 |
5 |
6 | '-------------------------------------------------------------------------
7 | ' Konstanten
8 | '-------------------------------------------------------------------------
9 | Private Const CP_ACP = 0
10 | Private Const CP_UTF8 = 65001
11 |
12 |
13 | '-------------------------------------------------------------------------
14 | ' API-Deklarationen
15 | '-------------------------------------------------------------------------
16 | Private Declare Function GetACP Lib "kernel32" () As Long
17 |
18 | 'Run after Loading
19 | Private Declare Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpMultiByteStr As Long, ByVal cchMultiByte As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long
20 |
21 | 'Run before Saving
22 | Private Declare Function WideCharToMultiByte Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpWideCharStr As String, ByVal cchWideChar As Long, ByVal lpMultiByteStr As String, ByVal cchMultiByte As Long, ByVal lpDefaultChar As Long, lpUsedDefaultChar As Long) As Long
23 |
24 |
25 |
26 | '-------------------------------------------------------------------------
27 | ' DecodeUTF8
28 | '-------------------------------------------------------------------------
29 | Public Function DecodeUTF8(ByVal sValue As String) As String
30 |
31 | If Len(sValue) = 0 Then Exit Function
32 | ' DecodeUTF8 = WToA(StrConv(sValue, vbUnicode), CP_ACP)
33 | DecodeUTF8 = AToW(StrConv(sValue, vbFromUnicode), CP_UTF8)
34 |
35 | End Function
36 |
37 |
38 | '-------------------------------------------------------------------------
39 | ' EncodeUTF8
40 | '-------------------------------------------------------------------------
41 | Public Function EncodeUTF8(ByVal sValue As String) As String
42 |
43 |
44 | If Len(sValue) = 0 Then Exit Function
45 | EncodeUTF8 = WToA(StrConv(sValue, vbUnicode), CP_UTF8)
46 |
47 | End Function
48 |
49 | 'Run before Saving
50 | '-------------------------------------------------------------------------
51 | ' WToA
52 | ' UNICODE to ANSI conversion, via a given codepage
53 | '-------------------------------------------------------------------------
54 | Private Function WToA(ByVal sValue As String, Optional ByVal cpg As Long = -1, Optional ByVal lFlags As Long = 0) As String
55 | Dim cwch As Long
56 | Dim pwz As Long
57 | Dim pwzBuffer As Long
58 | Dim sBuffer As String
59 |
60 | If cpg = -1 Then cpg = GetACP()
61 |
62 | ' pwz = StrPtr(sValue)
63 | ' cwch = WideCharToMultiByte(cpg, lFlags, pwz, -1, 0&, 0&, ByVal 0&, ByVal 0&)
64 | cwch = WideCharToMultiByte(cpg, lFlags, sValue, -1, 0&, 0&, ByVal 0&, ByVal 0&)
65 | WToA = Space$(cwch)
66 |
67 | cwch = WideCharToMultiByte(cpg, lFlags, sValue, -1, WToA, Len(WToA), ByVal 0&, ByVal 0&)
68 | WToA = Left(WToA, cwch - 1)
69 |
70 | End Function
71 |
72 | 'Run after Loading (cpg=0)
73 | '-------------------------------------------------------------------------
74 | ' AToW
75 | ' ANSI to UNICODE conversion, via a given codepage.
76 | '-------------------------------------------------------------------------
77 | Private Function AToW(ByVal sValue As String, Optional ByVal cpg As Long = -1, Optional ByVal lFlags As Long = 0) As String
78 | Dim cwch As Long
79 | Dim pwz As Long
80 | Dim pwzBuffer As Long
81 | Dim sBuffer As String
82 |
83 | If cpg = -1 Then cpg = GetACP()
84 |
85 | pwz = StrPtr(sValue)
86 | cwch = MultiByteToWideChar(cpg, lFlags, pwz, -1, 0&, 0&)
87 |
88 | sBuffer = String$(cwch + 1, vbNullChar)
89 | pwzBuffer = StrPtr(sBuffer)
90 |
91 | cwch = MultiByteToWideChar(cpg, lFlags, pwz, -1, pwzBuffer, Len(sBuffer))
92 |
93 | AToW = Left$(sBuffer, cwch - 1)
94 |
95 | End Function
96 | 'Purpose:Returns True if string has a Unicode char.
97 | Public Function IsUnicode(s As String) As Boolean
98 | Dim i As Long
99 | Dim bLen As Long
100 | Dim Map() As Byte
101 |
102 | If LenB(s) Then
103 | Map = s
104 | bLen = UBound(Map)
105 | For i = 1 To bLen Step 2
106 | If (Map(i) > 0) Then
107 | IsUnicode = True
108 | Exit Function
109 | End If
110 | Next
111 |
112 |
113 | End If
114 | End Function
115 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/lib/clsDuplicateFilter.cls:
--------------------------------------------------------------------------------
1 | VERSION 1.0 CLASS
2 | BEGIN
3 | MultiUse = -1 'True
4 | Persistable = 0 'NotPersistable
5 | DataBindingBehavior = 0 'vbNone
6 | DataSourceBehavior = 0 'vbNone
7 | MTSTransactionMode = 0 'NotAnMTSObject
8 | END
9 | Attribute VB_Name = "clsDuplicateFilter"
10 | Attribute VB_GlobalNameSpace = False
11 | Attribute VB_Creatable = True
12 | Attribute VB_PredeclaredId = False
13 | Attribute VB_Exposed = False
14 | Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
15 | Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
16 | Option Explicit
17 |
18 | Private itemStore As Collection
19 |
20 | Public Sub Clear()
21 | Set itemStore = New Collection
22 | End Sub
23 |
24 | Public Function IsUnique(uniqueItemID$) As Boolean
25 | Attribute IsUnique.VB_UserMemId = 0
26 | On Error Resume Next
27 | itemStore.Add "", uniqueItemID
28 | IsUnique = Err = 0
29 | End Function
30 |
31 | Private Sub Class_Initialize()
32 | Clear
33 | End Sub
34 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/modCamoGet.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/modCamoGet.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/ClsDeobfuscator.cls:
--------------------------------------------------------------------------------
1 | VERSION 1.0 CLASS
2 | BEGIN
3 | MultiUse = -1 'True
4 | Persistable = 0 'NotPersistable
5 | DataBindingBehavior = 0 'vbNone
6 | DataSourceBehavior = 0 'vbNone
7 | MTSTransactionMode = 0 'NotAnMTSObject
8 | END
9 | Attribute VB_Name = "ClsDeobfuscator"
10 | Attribute VB_GlobalNameSpace = False
11 | Attribute VB_Creatable = True
12 | Attribute VB_PredeclaredId = False
13 | Attribute VB_Exposed = False
14 | Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
15 | Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
16 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/FrmFuncRename.frx:
--------------------------------------------------------------------------------
1 | Txt_Fn_Inc
2 |
3 | Txt_Fn_Org
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/FrmFuncRename_StringMismatch.frm:
--------------------------------------------------------------------------------
1 | VERSION 5.00
2 | Begin VB.Form FrmFuncRename_StringMismatch
3 | BorderStyle = 5 'Sizable ToolWindow
4 | Caption = "Function Renamer String Mismatch"
5 | ClientHeight = 4035
6 | ClientLeft = 2445
7 | ClientTop = 2430
8 | ClientWidth = 12090
9 | LinkTopic = "Form1"
10 | MaxButton = 0 'False
11 | MinButton = 0 'False
12 | ScaleHeight = 4035
13 | ScaleWidth = 12090
14 | ShowInTaskbar = 0 'False
15 | StartUpPosition = 3 'Windows Default
16 | Begin VB.CommandButton cmd_cancel
17 | Cancel = -1 'True
18 | Caption = "Cancel"
19 | Height = 375
20 | Left = 6000
21 | TabIndex = 3
22 | ToolTipText = "Press 'esc' to reject this pair of functions"
23 | Top = 0
24 | Width = 6015
25 | End
26 | Begin VB.CommandButton cmd_ok
27 | Caption = "ok"
28 | Default = -1 'True
29 | Height = 375
30 | Left = 0
31 | TabIndex = 2
32 | ToolTipText = "Press 'enter' to accept this"
33 | Top = 0
34 | Width = 5895
35 | End
36 | Begin VB.ListBox List_Inc
37 | Appearance = 0 'Flat
38 | Height = 8610
39 | ItemData = "FrmFuncRename_StringMismatch.frx":0000
40 | Left = 6120
41 | List = "FrmFuncRename_StringMismatch.frx":0002
42 | TabIndex = 1
43 | Top = 360
44 | Width = 5895
45 | End
46 | Begin VB.ListBox List_Org
47 | Appearance = 0 'Flat
48 | Height = 8610
49 | Left = 0
50 | TabIndex = 0
51 | Top = 360
52 | Width = 5775
53 | End
54 | End
55 | Attribute VB_Name = "FrmFuncRename_StringMismatch"
56 | Attribute VB_GlobalNameSpace = False
57 | Attribute VB_Creatable = False
58 | Attribute VB_PredeclaredId = True
59 | Attribute VB_Exposed = False
60 | Option Explicit
61 | Public Enum AcceptResult_enum
62 | Result_True
63 | Result_False
64 | Result_Undefined
65 | End Enum
66 |
67 | Private mAcceptResult As AcceptResult_enum
68 | Public Property Get AcceptResult() As AcceptResult_enum
69 | AcceptResult = mAcceptResult
70 | End Property
71 |
72 |
73 |
74 | Public Sub Create(fn_org As MatchCollection, fn_inc As MatchCollection)
75 | FillList List_Org, fn_org
76 | FillList List_Inc, fn_inc
77 |
78 | mAcceptResult = Result_Undefined
79 | End Sub
80 |
81 | Private Sub FillList(List As Listbox, Match As MatchCollection)
82 | List.Clear
83 |
84 | Dim i As Match
85 | For Each i In Match
86 | List.AddItem i '.SubMatches(1)
87 | Next
88 | End Sub
89 |
90 | Private Sub cmd_cancel_Click()
91 | Unload Me
92 | mAcceptResult = Result_False
93 | End Sub
94 |
95 | Private Sub cmd_ok_Click()
96 | Unload Me
97 | mAcceptResult = Result_True
98 | End Sub
99 |
100 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/FrmFuncRename_StringMismatch.frx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/FrmRegExp_Renamer.frx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/unused/FrmRegExp_Renamer.frx
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/IconFile.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "IconFile"
2 | Private Au3Standard_IconFileCrcs As New Collection
3 |
4 | Public Sub HandleIconFile(FileName As String)
5 |
6 | If Frm_Options.chk_extractIcon.value <> vbUnchecked Then
7 |
8 | ' ==> Create output fileName
9 | Dim IconFileName As New ClsFilename
10 | IconFileName = FileName ' initialise with ScriptPath
11 | IconFileName.Ext = ".ico"
12 |
13 | Log "Extracting ExeIcon/s to: " & Quote(IconFileName.FileName)
14 | On Error Resume Next
15 | ShellEx App.Path & "\" & "data\ExtractIcon.exe", _
16 | Quote(File.FileName) & " " & Quote(IconFileName.FileName), vbNormalFocus
17 | If Err Then
18 | FrmMain.Log "ERROR: " & Err.Description
19 | Exit Sub
20 | End If
21 |
22 | ' Test For AutoItStandard
23 | If Frm_Options.chk_extractIcon.value <> vbUnchecked Then
24 |
25 | 'init
26 | Au3Standard_IconFileCrcs.Add "AutoIt_Main_v10_48x48_RGB-A.ico", "E1E3EB6E"
27 |
28 | Au3Standard_IconFileCrcs.Add "AHK_L___________48x48_RGB-A.ico", "B186AA0D"
29 | Au3Standard_IconFileCrcs.Add "AHK_Classic_____32x32_RGB__.ico", "FCC71A4B"
30 |
31 |
32 |
33 | 'Get Data
34 | Dim IconFileData As New StringReader
35 | IconFileData.Data = FileLoad(IconFileName.FileName)
36 |
37 | 'Calc CRC
38 | Dim IconFileDataCrc As String
39 | IconFileDataCrc = ADLER32(IconFileData)
40 |
41 | 'Check CRC List
42 | On Error Resume Next
43 | Dim FileName_Au3Standard_IconFile As String
44 |
45 | FileName_Au3Standard_IconFile = _
46 | Au3Standard_IconFileCrcs(IconFileDataCrc)
47 |
48 | 'Delete File if in CRC List
49 | If FileName_Au3Standard_IconFile <> "" Then
50 | FileDelete IconFileName.FileName
51 | FrmMain.Log " ^- IconFile deleted since it's standard AU3-icon: (" & IconFileDataCrc & ") '" & FileName_Au3Standard_IconFile & "'"
52 | End If
53 |
54 | End If
55 | End If
56 |
57 | End Sub
58 |
59 | Public Function IsStandard_IconFile(uniqueItemID$) As Boolean
60 | On Error Resume Next
61 | Au3Standard_IconFileCrcs.Add "", uniqueItemID
62 | IsUnique = Err = 0
63 | End Function
64 |
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/clsStrCat.cls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/unused/clsStrCat.cls
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/modCamoGet.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/unused/modCamoGet.bas
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/version.txt:
--------------------------------------------------------------------------------
1 | Private Sub mi_GetAutoItVersion_Click()
2 |
3 | '3.1.1 ( 7th Apr , 2005) (Release)
4 | '...
5 | '
6 | '3.2.0 (12th August, 2006) (Release)
7 | ' Added: /AutoIt3ExecuteScript command line option.
8 |
9 |
10 | On Error GoTo ERR_mi_GetAutoItVersion_Click
11 |
12 | ' Minimize during execution
13 | Dim WindowState_old
14 | WindowState_old = WindowState
15 | WindowState = vbMinimized
16 |
17 | ' Log & execute
18 | Dim ShellCommandParams$
19 | ShellCommandParams = " /AutoIt3ExecuteLine ""Exit(999+MsgBox(0x40,'AutoIt version of ' & @ScriptName & ' is', @AutoItVersion,10))"""
20 |
21 | Log "GetAutoItVersion executes: " & Quote(Combo_Filename) & " " & ShellCommandParams
22 | Dim ShellExitCode&
23 | ShellExitCode = ShellEx(Combo_Filename, ShellCommandParams, vbNormalFocus)
24 |
25 | If ShellExitCode = 1000 Then
26 | Log "Execution finished; ExitCode: " & ShellExitCode
27 | openURL "http://www.autoitscript.com/autoit3/files/archive/autoit"
28 | Else
29 | Log "Execution failed; ExitCode: " & ShellExitCode
30 | End If
31 | ' ' Run "LZSS.exe -d *.debug *.au3" to extract the script (...and wait for its execution to finish)
32 | ' Dim LZSS_Output$, ExitCode&
33 | ' LZSS_Output = Console.ShellExConsole( _
34 | ' App.Path & "\" & "data\LZSS.exe", _
35 | ' "-d " & Quote(.FileName) & " " & Quote(OutFileName.FileName), _
36 | ' ExitCode)
37 | '
38 | ' If ExitCode <> 0 Then Log LZSS_Output, "LZSS_Output: "
39 |
40 |
41 |
42 | ' Restore
43 | WindowState = WindowState_old
44 | Exit Sub
45 | ERR_mi_GetAutoItVersion_Click:
46 | Log "ERROR " & Err.Description
47 | End Sub
--------------------------------------------------------------------------------
/!SourceCode/SRC/unused/whxapi2.bas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/SRC/unused/whxapi2.bas
--------------------------------------------------------------------------------
/!SourceCode/languages-ids.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/languages-ids.txt
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/ABSTRACT.TXT:
--------------------------------------------------------------------------------
1 | ICONPRO: Manipulates Icons and Cursors
2 | The ICONPRO sample manipulates icons and cursor image resources with bit depths ranging
3 | from 1 bit per pixel (bpp) to 32 bpp, and dimensions ranging from 16x16 pixels to 128x128
4 | pixels.
5 | ICONPRO itself provides no editing capabilities. To create an icon, you must first edit the image
6 | in device-independent bitmap (DIB) format, using an application such as Microsoft(R)
7 | Windows(R) Paintbrush. The image can then be imported into ICONPRO without loss of bit
8 | depth.
9 | When extracting icons from dynamic-link libraries (DLLs) and executable (.EXE) files,
10 | ICONPRO will operate only on 32-bit files.
11 | Note that ICONPRO restricts the size of its child windows, so multiple-document interface (MDI)
12 | tiling can look different from what you expect. When displayed under Microsoft Windows
13 | NT(TM), icons may look distorted because current versions of Windows NT do not support
14 | variable-sized icons.
15 | For more information on how to use ICONPRO, see the README.TXT file in the ICONPRO
16 | project directory. For an in-depth investigation, see the "Icons in Win32" technical article by
17 | John Hornick in the Microsoft Development Library.
18 | ICONPRO is a Microsoft Win32(R) Software Development Kit (SDK) sample. It was built with
19 | Microsoft Visual C++(TM) version 2.2, the 32-bit development system for Microsoft Windows,
20 | Windows 95, and Windows NT. The ICONPRO sample was tested on Windows 95 and
21 | Windows NT version 3.51.
22 | KEYWORDS: CD14; BeginPaint; BitBlt; CheckDlgButton; CloseClipboard; CloseHandle;
23 | CreateCompatibleDC; CreateDIBSection; CreateFile; CreateHalftonePalette;
24 | CreateIconFromResource; CreateMDIWindow; CreatePen; CreateSolidBrush; CreateWindow;
25 | DefFrameProc; DefMDIChildProc; DeleteDC; DeleteObject; DestroyIcon; DestroyWindow;
26 | DialogBox; DialogBoxParam; DispatchMessage; DrawIcon; EmptyClipboard; EnableMenuItem;
27 | EndDialog; EndPaint; EnumResourceNames; FillRect; FindResource; FreeLibrary; GdiFlush;
28 | GetClientRect; GetClipboardData; GetDC; GetDlgItem; GetFileTitle; GetIconInfo; GetMenu;
29 | GetMessage; GetObject; GetOpenFileName; GetPaletteEntries; GetPixel; GetSaveFileName;
30 | GetStockObject; GetSubMenu; GetSysColor; GetTextExtentPoint32; GetWindow;
31 | GetWindowLong; GetWindowRect; GetWindowText; GlobalAlloc; GlobalLock; GlobalUnlock;
32 | HIWORD; InvalidateRect; IsClipboardFormatAvailable; IsDlgButtonChecked; LOWORD;
33 | LineTo; LoadCursor; LoadIcon; LoadLibraryEx; LoadResource; LoadString; LockResource;
34 | LookupIconIdFromDirectory; MAKEINTRESOURCE; MAKELONG; MessageBox; MoveToEx;
35 | OpenClipboard; PostMessage; PostQuitMessage; PtInRect; RGB; ReadFile; Rectangle;
36 | RegisterClass; ReleaseDC; ScreenToClient; SelectObject; SendDlgItemMessage;
37 | SendMessage; SetBkMode; SetClipboardData; SetCursor; SetDIBColorTable;
38 | SetDIBitsToDevice; SetDlgItemText; SetFilePointer; SetPixelV; SetRect; SetStretchBltMode;
39 | SetTextColor; SetWindowLong; SetWindowText; ShowWindow; SizeofResource; StretchBlt;
40 | TextOut; TranslateMDISysAccel; TranslateMessage; UpdateWindow; WinHelp; WinMain;
41 | WriteFile; ZeroMemory; free; lstrcpy; lstrlen; malloc; memcpy; memset; realloc; wsprintf
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/DIB.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: DIB.H
4 | *
5 | * PURPOSE: IconPro Project DIB handling header file
6 | *
7 | * COMMENTS: Icons are stored in something almost identical to DIB
8 | * format, which makes it real easy to treat them as DIBs
9 | * when manipulating them.
10 | *
11 | * Copyright 1995 Microsoft Corp.
12 | *
13 | *
14 | * History:
15 | * July '95 - Created
16 | *
17 | \****************************************************************************/
18 |
19 |
20 | /****************************************************************************/
21 | // local #defines
22 |
23 | // How wide, in bytes, would this many bits be, DWORD aligned?
24 | #define WIDTHBYTES(bits) ((((bits) + 31)>>5)<<2)
25 | /****************************************************************************/
26 |
27 |
28 | /****************************************************************************/
29 | // Exported function prototypes
30 | LPSTR FindDIBBits (LPSTR lpbi);
31 | WORD DIBNumColors (LPSTR lpbi);
32 | WORD PaletteSize (LPSTR lpbi);
33 | DWORD BytesPerLine( LPBITMAPINFOHEADER lpBMIH );
34 | LPBYTE ConvertDIBFormat( LPBITMAPINFO lpSrcDIB, UINT nWidth, UINT nHeight, UINT nColors, BOOL bStretch );
35 | void SetMonoDIBPixel( LPBYTE pANDBits, DWORD dwWidth, DWORD dwHeight, DWORD x, DWORD y, BOOL bWhite );
36 | LPBYTE ReadBMPFile( LPCTSTR szFileName );
37 | BOOL WriteBMPFile( LPCTSTR szFileName, LPBYTE lpDIB );
38 | /****************************************************************************/
39 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/ICONPRO.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: IconPro.H
4 | *
5 | * PURPOSE: IconPro Project main header file
6 | *
7 | * COMMENTS: The child window size is determined here, based on the
8 | * hard coded maximum sizes of icons supported. Only one
9 | * function is exported from IconPro.C, and it is exported
10 | * to allow MDI child windows to query for a save file name
11 | * if they are asked to close and their data has changed.
12 | *
13 | * Copyright 1995 Microsoft Corp.
14 | *
15 | *
16 | * History:
17 | * July '95 - Created
18 | *
19 | \****************************************************************************/
20 |
21 |
22 | /****************************************************************************/
23 | // local #defines
24 |
25 | // How large of icons will we support? This is really only important
26 | // bacuase of the design of the UI. It needs to draw the entire icon
27 | // 4 times, so we limit how big one can be. The ICO spec puts no limit
28 | // on icon sizes.
29 | #define MAX_ICON_WIDTH 128 // Max width
30 | #define MIN_ICON_WIDTH 16 // Min width
31 | #define MAX_ICON_HEIGHT MAX_ICON_WIDTH // Max height
32 | #define MIN_ICON_HEIGHT MIN_ICON_WIDTH // Min height
33 |
34 | // How big do the MDI child windows need to be to display the icon and
35 | // the listbox?
36 | #define WINDOW_WIDTH ( ( MAX_ICON_WIDTH * 2 ) + 30 )
37 | #define WINDOW_HEIGHT ( ( MAX_ICON_HEIGHT * 2 ) + 150 )
38 |
39 | // Utility macro to calculate a rectangle's width/height
40 | #define RectWidth(r) ((r).right - (r).left + 1)
41 | #define RectHeight(r) ((r).bottom - (r).top + 1)
42 | /****************************************************************************/
43 |
44 |
45 |
46 |
47 | /****************************************************************************/
48 | // Exported function prototypes
49 | BOOL GetSaveIconFileName( LPTSTR szFileName, UINT FilterStringID, LPCTSTR szTitle );
50 | BOOL GetOpenIconFileName( LPTSTR szFileName, UINT FilterStringID, LPCTSTR szTitle );
51 | /****************************************************************************/
52 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/ICONPRO.HPJ:
--------------------------------------------------------------------------------
1 | [OPTIONS]
2 | TITLE=IconPro Version 1.0
3 | COMPRESS=true
4 | WARNING=1 ; If you remove this line, then HC will report the following
5 | ; error message:
6 | ;
7 | ; R1023: Keyword(s) defined without title in page 59
8 | ; of file helpex.rtf
9 | ;
10 | ; This message indicates that a topic will be listed in
11 | ; the Search Topics Found box as ">>Untitled Topic<<"
12 |
13 | [FILES]
14 | iconpro.rtf
15 |
16 | [MAP]
17 |
18 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/ICONS.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: Icons.H
4 | *
5 | * PURPOSE: IconPro Project Icon handling header file
6 | *
7 | * COMMENTS:
8 | *
9 | *
10 | * Copyright 1995 Microsoft Corp.
11 | *
12 | *
13 | * History:
14 | * July '95 - Created
15 | *
16 | \****************************************************************************/
17 |
18 |
19 | /****************************************************************************/
20 | // Structs
21 |
22 | // These first two structs represent how the icon information is stored
23 | // when it is bound into a EXE or DLL file. Structure members are WORD
24 | // aligned and the last member of the structure is the ID instead of
25 | // the imageoffset.
26 | #pragma pack( push )
27 | #pragma pack( 2 )
28 | typedef struct
29 | {
30 | BYTE bWidth; // Width of the image
31 | BYTE bHeight; // Height of the image (times 2)
32 | BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
33 | BYTE bReserved; // Reserved
34 | WORD wPlanes; // Color Planes
35 | WORD wBitCount; // Bits per pixel
36 | DWORD dwBytesInRes; // how many bytes in this resource?
37 | WORD nID; // the ID
38 | } MEMICONDIRENTRY, *LPMEMICONDIRENTRY;
39 | typedef struct
40 | {
41 | WORD idReserved; // Reserved
42 | WORD idType; // resource type (1 for icons)
43 | WORD idCount; // how many images?
44 | MEMICONDIRENTRY idEntries[1]; // the entries for each image
45 | } MEMICONDIR, *LPMEMICONDIR;
46 | #pragma pack( pop )
47 |
48 | // These next two structs represent how the icon information is stored
49 | // in an ICO file.
50 | typedef struct
51 | {
52 | BYTE bWidth; // Width of the image
53 | BYTE bHeight; // Height of the image (times 2)
54 | BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
55 | BYTE bReserved; // Reserved
56 | WORD wPlanes; // Color Planes
57 | WORD wBitCount; // Bits per pixel
58 | DWORD dwBytesInRes; // how many bytes in this resource?
59 | DWORD dwImageOffset; // where in the file is this image
60 | } ICONDIRENTRY, *LPICONDIRENTRY;
61 | typedef struct
62 | {
63 | WORD idReserved; // Reserved
64 | WORD idType; // resource type (1 for icons)
65 | WORD idCount; // how many images?
66 | ICONDIRENTRY idEntries[1]; // the entries for each image
67 | } ICONDIR, *LPICONDIR;
68 |
69 |
70 | // The following two structs are for the use of this program in
71 | // manipulating icons. They are more closely tied to the operation
72 | // of this program than the structures listed above. One of the
73 | // main differences is that they provide a pointer to the DIB
74 | // information of the masks.
75 | typedef struct
76 | {
77 | UINT Width, Height, Colors; // Width, Height and bpp
78 | LPBYTE lpBits; // ptr to DIB bits
79 | DWORD dwNumBytes; // how many bytes?
80 | LPBITMAPINFO lpbi; // ptr to header
81 | LPBYTE lpXOR; // ptr to XOR image bits
82 | LPBYTE lpAND; // ptr to AND image bits
83 | } ICONIMAGE, *LPICONIMAGE;
84 | typedef struct
85 | {
86 | BOOL bHasChanged; // Has image changed?
87 | TCHAR szOriginalICOFileName[MAX_PATH]; // Original name
88 | TCHAR szOriginalDLLFileName[MAX_PATH]; // Original name
89 | UINT nNumImages; // How many images?
90 | ICONIMAGE IconImages[1]; // Image entries
91 | } ICONRESOURCE, *LPICONRESOURCE;
92 | /****************************************************************************/
93 |
94 |
95 |
96 |
97 | /****************************************************************************/
98 | // Exported function prototypes
99 | LPICONRESOURCE ReadIconFromICOFile( LPCTSTR szFileName );
100 | BOOL WriteIconToICOFile( LPICONRESOURCE lpIR, LPCTSTR szFileName );
101 | HICON MakeIconFromResource( LPICONIMAGE lpIcon );
102 | LPICONRESOURCE ReadIconFromEXEFile( LPCTSTR szFileName );
103 | BOOL IconImageToClipBoard( LPICONIMAGE lpii );
104 | BOOL IconImageFromClipBoard( LPICONIMAGE lpii, BOOL bStretchToFit );
105 | BOOL CreateBlankNewFormatIcon( LPICONIMAGE lpii );
106 | BOOL DrawXORMask( HDC hDC, RECT Rect, LPICONIMAGE lpIcon );
107 | BOOL DrawANDMask( HDC hDC, RECT Rect, LPICONIMAGE lpIcon );
108 | RECT GetXORImageRect( RECT Rect, LPICONIMAGE lpIcon );
109 | BOOL MakeNewANDMaskBasedOnPoint( LPICONIMAGE lpIcon, POINT pt );
110 | BOOL IconImageFromBMPFile( LPCTSTR szFileName, LPICONIMAGE lpii, BOOL bStretchToFit );
111 | BOOL IconImageToBMPFile( LPCTSTR szFileName, LPICONIMAGE lpii );
112 | /****************************************************************************/
113 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/MAKEFILE.mak:
--------------------------------------------------------------------------------
1 | !include
2 |
3 |
4 | cvars=-DNT -DWIN -DWIN32
5 | obj=obj
6 | mycflag = -Fo.\$(obj)\\
7 |
8 | all: iconpro.exe iconpro.hlp
9 |
10 | # Update the object file if necessary
11 |
12 | $(obj)\iconpro.obj: iconpro.c iconpro.h resource.h icons.h mdichild.h
13 | IF NOT EXIST $(obj) md obj
14 | $(cc) $(cdebug) $(cflags) $(mycflag) $(cvars) iconpro.c
15 |
16 | $(obj)\dib.obj: dib.c dib.h
17 | IF NOT EXIST $(obj) md obj
18 | $(cc) $(cdebug) $(cflags) $(mycflag) $(cvars) dib.c
19 |
20 | $(obj)\icons.obj: icons.c iconpro.h resource.h icons.h dib.h
21 | IF NOT EXIST $(obj) md obj
22 | $(cc) $(cdebug) $(cflags) $(mycflag) $(cvars) icons.c
23 |
24 | $(obj)\mdichild.obj: mdichild.c iconpro.h resource.h icons.h mdichild.h
25 | IF NOT EXIST $(obj) md obj
26 | $(cc) $(cdebug) $(cflags) $(mycflag) $(cvars) mdichild.c
27 |
28 | # Update the resources if necessary
29 |
30 | $(obj)\iconpro.res: iconpro.rc iconpro.h resource.h
31 | rc -r -fo .\$(obj)\iconpro.res iconpro.rc
32 |
33 | # Build the help file if necessary
34 |
35 | iconpro.hlp: iconpro.hpj iconpro.rtf
36 | $(hc) iconpro.hpj
37 |
38 | # Update the executable file if necessary, and if so, add the resource back in.
39 |
40 | iconpro.exe: $(obj)\iconpro.obj \
41 | $(obj)\mdichild.obj \
42 | $(obj)\icons.obj \
43 | $(obj)\dib.obj \
44 | $(obj)\iconpro.res
45 | $(link) $(linkdebug) $(guiflags) -out:iconpro.exe \
46 | $(obj)\iconpro.obj \
47 | $(obj)\mdichild.obj \
48 | $(obj)\icons.obj \
49 | $(obj)\dib.obj \
50 | $(obj)\iconpro.res $(guilibs) shell32.lib
51 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/MDICHILD.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: MDIChild.H
4 | *
5 | * PURPOSE: IconPro Project MDI Child Window handling header file
6 | *
7 | * COMMENTS: One CHILDWINDOWDATA struct defined below is attached
8 | * to each MDI child window. It stores information about
9 | * the listbox, the locations of drawing objects, and the
10 | * icon resource associated with each window.
11 | *
12 | * Copyright 1995 Microsoft Corp.
13 | *
14 | *
15 | * History:
16 | * July '95 - Created
17 | *
18 | \****************************************************************************/
19 |
20 |
21 | /****************************************************************************/
22 | // local #defines
23 |
24 | // The ID for the listbox child window
25 | #define ID_FORMAT_BOX 102
26 | /****************************************************************************/
27 |
28 |
29 | /****************************************************************************/
30 | // Local structs
31 |
32 | // This struct is used to hold the data associated with an MDI window
33 | typedef struct
34 | {
35 | HWND hWndFormatListBox; // Window Handle for listbox
36 | LPICONRESOURCE lpIR; // pointer to icon resource
37 | RECT BoxRect; // ListBox Window Rect
38 | RECT DrawingRect; // Overall rect to draw in
39 | RECT BlackRect, BlackTextRect; // for black bkgrnd & text
40 | RECT WhiteRect, WhiteTextRect; // for white bkgrnd & text
41 | RECT XORRect, XORTextRect; // for XOR mask & text
42 | RECT ANDRect, ANDTextRect; // for AND mask & text
43 | RECT XORImageRect; // in which to draw OR mask
44 | } CHILDWINDOWDATA, *LPCHILDWINDOWDATA;
45 | /****************************************************************************/
46 |
47 |
48 |
49 | /****************************************************************************/
50 | // Exported function prototypes
51 | LRESULT CALLBACK IconChildWndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
52 | /****************************************************************************/
53 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!Original/RESOURCE.H:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by ICONPRO.RC
4 | //
5 | #define IDS_PROGNAME 1
6 | #define IDS_FILTERSTRING 1
7 | #define IDS_EXEFILTERSTRING 2
8 | #define IDS_BMPFILTERSTRING 3
9 | #define ID_F_MENUOPTION1 100
10 | #define ID_F_ABOUT 101
11 | #define ID_F_EXIT 102
12 | #define ICONPRO_MENU 400
13 | #define ICONPRO_ICON 401
14 | #define ICONPRO_ABOUT_DLG 402
15 | #define ICONPRO_ICON1 402
16 | #define IDD_EXTRACTDLG 404
17 | #define IDD_ADDFORMATDLG 409
18 | #define ID_FILE_NEW 500
19 | #define ID_FILE_OPEN 501
20 | #define ID_FILE_SAVE 502
21 | #define ID_FILE_SAVEAS 503
22 | #define ID_EDIT_COPY 504
23 | #define ID_EDIT_PASTE 505
24 | #define ID_EDIT_STRETCHPASTE 506
25 | #define ID_EDIT_ADDFORMAT 507
26 | #define ID_EDIT_REMOVEFORMAT 508
27 | #define ID_WINDOW_ARRANGEICONS 509
28 | #define ID_WINDOW_CASCADE 510
29 | #define ID_WINDOW_TILE 511
30 | #define ID_HELP_ABOUT 512
31 | #define ID_HELP_CONTENTS 513
32 | #define ID_FILE_CLOSE 514
33 | #define ID_WINDOW_TILEVERTICAL 515
34 | #define ID_FILE_EXTRACT 516
35 | #define ID_EDIT_IMPORTBMP 518
36 | #define ID_EDIT_STRETCHIMPORTBMP 519
37 | #define ID_EDIT_EXPORTBMP 520
38 | #define IDC_LIST1 603
39 | #define IDC_DISPLAYICON 605
40 | #define ID_WIDTHSLIDER 609
41 | #define ID_HEIGHTSLIDER 610
42 | #define ID_COLORSLIDER 615
43 | #define ID_WIDTHTEXT 616
44 | #define ID_HEIGHTTEXT 617
45 | #define IDC_SQUAREONLY 618
46 | #define IDM_WINDOWCHILD 700
47 | #define ID_GETNUMFORMATS 701
48 | #define ID_UPDATETITLE 703
49 | #define ID_HASFILECHANGED 705
50 | #define ID_COLORTEXT 710
51 | #define IDC_DISPLAYBOX -1
52 | #define IDC_STATIC -1
53 |
54 | // Next default values for new objects
55 | //
56 | #ifdef APSTUDIO_INVOKED
57 | #ifndef APSTUDIO_READONLY_SYMBOLS
58 | #define _APS_NO_MFC 1
59 | #define _APS_NEXT_RESOURCE_VALUE 421
60 | #define _APS_NEXT_COMMAND_VALUE 521
61 | #define _APS_NEXT_CONTROL_VALUE 620
62 | #define _APS_NEXT_SYMED_VALUE 706
63 | #endif
64 | #endif
65 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!VC2010/ExtractIcon.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C++ Express 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtractIcon", "ExtractIcon.vcxproj", "{ABA77AA3-53E0-4242-B80F-70654F8F9D92}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {ABA77AA3-53E0-4242-B80F-70654F8F9D92}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {ABA77AA3-53E0-4242-B80F-70654F8F9D92}.Debug|Win32.Build.0 = Debug|Win32
14 | {ABA77AA3-53E0-4242-B80F-70654F8F9D92}.Release|Win32.ActiveCfg = Release|Win32
15 | {ABA77AA3-53E0-4242-B80F-70654F8F9D92}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!VC2010/ExtractIcon.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {ABA77AA3-53E0-4242-B80F-70654F8F9D92}
15 | Win32Proj
16 | ExtractIcon
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 |
43 |
44 | false
45 | false
46 |
47 |
48 |
49 |
50 |
51 | Level3
52 | Disabled
53 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
54 |
55 |
56 | Windows
57 | true
58 |
59 |
60 |
61 |
62 | Level3
63 |
64 |
65 | MinSpace
66 | true
67 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
68 | UNICODE
69 | Size
70 | false
71 | MultiThreadedDLL
72 | false
73 | true
74 | true
75 | false
76 |
77 |
78 | Windows
79 | false
80 | true
81 | true
82 | false
83 | NoErrorReport
84 | true
85 | "e:\intel2400\c\Anwendungen\Programmierung\Microsoft Visual Studio\VC98\Lib\MSVCRT.LIB";kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/!VC2010/ExtractIcon.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Quelldateien
20 |
21 |
22 | Quelldateien
23 |
24 |
25 | Quelldateien
26 |
27 |
28 | Quelldateien
29 |
30 |
31 |
32 |
33 | Headerdateien
34 |
35 |
36 | Headerdateien
37 |
38 |
39 | Headerdateien
40 |
41 |
42 | Headerdateien
43 |
44 |
45 | Headerdateien
46 |
47 |
48 |
49 |
50 | Ressourcendateien
51 |
52 |
53 |
54 |
55 | Ressourcendateien
56 |
57 |
58 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/ExtractExeIcon.dsp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/src_ExtractIcon/ExtractExeIcon.dsp
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/DIB.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: DIB.H
4 | *
5 | * PURPOSE: IconPro Project DIB handling header file
6 | *
7 | * COMMENTS: Icons are stored in something almost identical to DIB
8 | * format, which makes it real easy to treat them as DIBs
9 | * when manipulating them.
10 | *
11 | * Copyright 1995 Microsoft Corp.
12 | *
13 | *
14 | * History:
15 | * July '95 - Created
16 | *
17 | \****************************************************************************/
18 |
19 |
20 | /****************************************************************************/
21 | // local #defines
22 |
23 | // How wide, in bytes, would this many bits be, DWORD aligned?
24 | #define WIDTHBYTES(bits) ((((bits) + 31)>>5)<<2)
25 | /****************************************************************************/
26 |
27 |
28 | /****************************************************************************/
29 | // Exported function prototypes
30 | LPSTR FindDIBBits (LPSTR lpbi);
31 | WORD DIBNumColors (LPSTR lpbi);
32 | WORD PaletteSize (LPSTR lpbi);
33 | DWORD BytesPerLine( LPBITMAPINFOHEADER lpBMIH );
34 | LPBYTE ConvertDIBFormat( LPBITMAPINFO lpSrcDIB, UINT nWidth, UINT nHeight, UINT nColors, BOOL bStretch );
35 | void SetMonoDIBPixel( LPBYTE pANDBits, DWORD dwWidth, DWORD dwHeight, DWORD x, DWORD y, BOOL bWhite );
36 | LPBYTE ReadBMPFile( LPCTSTR szFileName );
37 | BOOL WriteBMPFile( LPCTSTR szFileName, LPBYTE lpDIB );
38 | /****************************************************************************/
39 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/ICONPRO.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: IconPro.H
4 | *
5 | * PURPOSE: IconPro Project main header file
6 | *
7 | * COMMENTS: The child window size is determined here, based on the
8 | * hard coded maximum sizes of icons supported. Only one
9 | * function is exported from IconPro.C, and it is exported
10 | * to allow MDI child windows to query for a save file name
11 | * if they are asked to close and their data has changed.
12 | *
13 | * Copyright 1995 Microsoft Corp.
14 | *
15 | *
16 | * History:
17 | * July '95 - Created
18 | *
19 | \****************************************************************************/
20 |
21 |
22 | /****************************************************************************/
23 | // local #defines
24 |
25 | // How large of icons will we support? This is really only important
26 | // bacuase of the design of the UI. It needs to draw the entire icon
27 | // 4 times, so we limit how big one can be. The ICO spec puts no limit
28 | // on icon sizes.
29 | #define MAX_ICON_WIDTH 128 // Max width
30 | #define MIN_ICON_WIDTH 16 // Min width
31 | #define MAX_ICON_HEIGHT MAX_ICON_WIDTH // Max height
32 | #define MIN_ICON_HEIGHT MIN_ICON_WIDTH // Min height
33 |
34 | // How big do the MDI child windows need to be to display the icon and
35 | // the listbox?
36 | #define WINDOW_WIDTH ( ( MAX_ICON_WIDTH * 2 ) + 30 )
37 | #define WINDOW_HEIGHT ( ( MAX_ICON_HEIGHT * 2 ) + 150 )
38 |
39 | // Utility macro to calculate a rectangle's width/height
40 | #define RectWidth(r) ((r).right - (r).left + 1)
41 | #define RectHeight(r) ((r).bottom - (r).top + 1)
42 | /****************************************************************************/
43 |
44 |
45 |
46 |
47 | /****************************************************************************/
48 | // Exported function prototypes
49 | BOOL GetSaveIconFileName( LPTSTR szFileName, UINT FilterStringID, LPCTSTR szTitle );
50 | BOOL GetOpenIconFileName( LPTSTR szFileName, UINT FilterStringID, LPCTSTR szTitle );
51 | /****************************************************************************/
52 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/ICONPRO.ICO:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/src_ExtractIcon/SRC/ICONPRO.ICO
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/ICONPRO.RC:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/src_ExtractIcon/SRC/ICONPRO.RC
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/ICONS.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: Icons.H
4 | *
5 | * PURPOSE: IconPro Project Icon handling header file
6 | *
7 | * COMMENTS:
8 | *
9 | *
10 | * Copyright 1995 Microsoft Corp.
11 | *
12 | *
13 | * History:
14 | * July '95 - Created
15 | *
16 | \****************************************************************************/
17 |
18 |
19 | /****************************************************************************/
20 | // Structs
21 |
22 | // These first two structs represent how the icon information is stored
23 | // when it is bound into a EXE or DLL file. Structure members are WORD
24 | // aligned and the last member of the structure is the ID instead of
25 | // the imageoffset.
26 | #pragma pack( push )
27 | #pragma pack( 2 )
28 | typedef struct
29 | {
30 | BYTE bWidth; // Width of the image
31 | BYTE bHeight; // Height of the image (times 2)
32 | BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
33 | BYTE bReserved; // Reserved
34 | WORD wPlanes; // Color Planes
35 | WORD wBitCount; // Bits per pixel
36 | DWORD dwBytesInRes; // how many bytes in this resource?
37 | WORD nID; // the ID
38 | } MEMICONDIRENTRY, *LPMEMICONDIRENTRY;
39 | typedef struct
40 | {
41 | WORD idReserved; // Reserved
42 | WORD idType; // resource type (1 for icons)
43 | WORD idCount; // how many images?
44 | MEMICONDIRENTRY idEntries[1]; // the entries for each image
45 | } MEMICONDIR, *LPMEMICONDIR;
46 | #pragma pack( pop )
47 |
48 | // These next two structs represent how the icon information is stored
49 | // in an ICO file.
50 | typedef struct
51 | {
52 | BYTE bWidth; // Width of the image
53 | BYTE bHeight; // Height of the image (times 2)
54 | BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
55 | BYTE bReserved; // Reserved
56 | WORD wPlanes; // Color Planes
57 | WORD wBitCount; // Bits per pixel
58 | DWORD dwBytesInRes; // how many bytes in this resource?
59 | DWORD dwImageOffset; // where in the file is this image
60 | } ICONDIRENTRY, *LPICONDIRENTRY;
61 | typedef struct
62 | {
63 | WORD idReserved; // Reserved
64 | WORD idType; // resource type (1 for icons)
65 | WORD idCount; // how many images?
66 | ICONDIRENTRY idEntries[1]; // the entries for each image
67 | } ICONDIR, *LPICONDIR;
68 |
69 |
70 | // The following two structs are for the use of this program in
71 | // manipulating icons. They are more closely tied to the operation
72 | // of this program than the structures listed above. One of the
73 | // main differences is that they provide a pointer to the DIB
74 | // information of the masks.
75 | typedef struct
76 | {
77 | UINT Width, Height, Colors; // Width, Height and bpp
78 | LPBYTE lpBits; // ptr to DIB bits
79 | DWORD dwNumBytes; // how many bytes?
80 | LPBITMAPINFO lpbi; // ptr to header
81 | LPBYTE lpXOR; // ptr to XOR image bits
82 | LPBYTE lpAND; // ptr to AND image bits
83 | } ICONIMAGE, *LPICONIMAGE;
84 | typedef struct
85 | {
86 | BOOL bHasChanged; // Has image changed?
87 | TCHAR szOriginalICOFileName[MAX_PATH]; // Original name
88 | TCHAR szOriginalDLLFileName[MAX_PATH]; // Original name
89 | UINT nNumImages; // How many images?
90 | ICONIMAGE IconImages[1]; // Image entries
91 | } ICONRESOURCE, *LPICONRESOURCE;
92 | /****************************************************************************/
93 |
94 |
95 |
96 |
97 | /****************************************************************************/
98 | // Exported function prototypes
99 | LPICONRESOURCE ReadIconFromICOFile( LPCTSTR szFileName );
100 | BOOL WriteIconToICOFile( LPICONRESOURCE lpIR, LPCTSTR szFileName );
101 | HICON MakeIconFromResource( LPICONIMAGE lpIcon );
102 | LPICONRESOURCE ReadIconFromEXEFile( LPCTSTR szFileName );
103 | BOOL IconImageToClipBoard( LPICONIMAGE lpii );
104 | BOOL IconImageFromClipBoard( LPICONIMAGE lpii, BOOL bStretchToFit );
105 | BOOL CreateBlankNewFormatIcon( LPICONIMAGE lpii );
106 | BOOL DrawXORMask( HDC hDC, RECT Rect, LPICONIMAGE lpIcon );
107 | BOOL DrawANDMask( HDC hDC, RECT Rect, LPICONIMAGE lpIcon );
108 | RECT GetXORImageRect( RECT Rect, LPICONIMAGE lpIcon );
109 | BOOL MakeNewANDMaskBasedOnPoint( LPICONIMAGE lpIcon, POINT pt );
110 | BOOL IconImageFromBMPFile( LPCTSTR szFileName, LPICONIMAGE lpii, BOOL bStretchToFit );
111 | BOOL IconImageToBMPFile( LPCTSTR szFileName, LPICONIMAGE lpii );
112 | /****************************************************************************/
113 |
114 |
115 | BOOL bIsCommandlineMode;
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/MDICHILD.H:
--------------------------------------------------------------------------------
1 | /****************************************************************************\
2 | *
3 | * FILE: MDIChild.H
4 | *
5 | * PURPOSE: IconPro Project MDI Child Window handling header file
6 | *
7 | * COMMENTS: One CHILDWINDOWDATA struct defined below is attached
8 | * to each MDI child window. It stores information about
9 | * the listbox, the locations of drawing objects, and the
10 | * icon resource associated with each window.
11 | *
12 | * Copyright 1995 Microsoft Corp.
13 | *
14 | *
15 | * History:
16 | * July '95 - Created
17 | *
18 | \****************************************************************************/
19 |
20 |
21 | /****************************************************************************/
22 | // local #defines
23 |
24 | // The ID for the listbox child window
25 | #define ID_FORMAT_BOX 102
26 | /****************************************************************************/
27 |
28 |
29 | /****************************************************************************/
30 | // Local structs
31 |
32 | // This struct is used to hold the data associated with an MDI window
33 | typedef struct
34 | {
35 | HWND hWndFormatListBox; // Window Handle for listbox
36 | LPICONRESOURCE lpIR; // pointer to icon resource
37 | RECT BoxRect; // ListBox Window Rect
38 | RECT DrawingRect; // Overall rect to draw in
39 | RECT BlackRect, BlackTextRect; // for black bkgrnd & text
40 | RECT WhiteRect, WhiteTextRect; // for white bkgrnd & text
41 | RECT XORRect, XORTextRect; // for XOR mask & text
42 | RECT ANDRect, ANDTextRect; // for AND mask & text
43 | RECT XORImageRect; // in which to draw OR mask
44 | } CHILDWINDOWDATA, *LPCHILDWINDOWDATA;
45 | /****************************************************************************/
46 |
47 |
48 |
49 | /****************************************************************************/
50 | // Exported function prototypes
51 | LRESULT CALLBACK IconChildWndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
52 | /****************************************************************************/
53 |
--------------------------------------------------------------------------------
/!SourceCode/src_ExtractIcon/SRC/Resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by ICONPRO.RC
4 | //
5 | #define IDS_PROGNAME 1
6 | #define IDS_FILTERSTRING 1
7 | #define IDS_EXEFILTERSTRING 2
8 | #define IDS_BMPFILTERSTRING 3
9 | #define ID_F_MENUOPTION1 100
10 | #define ID_F_ABOUT 101
11 | #define ID_F_EXIT 102
12 | #define ICONPRO_MENU 400
13 | #define ICONPRO_ICON 401
14 | #define ICONPRO_ABOUT_DLG 402
15 | #define ICONPRO_ICON1 402
16 | #define IDD_EXTRACTDLG 404
17 | #define IDD_ADDFORMATDLG 409
18 | #define ID_FILE_NEW 500
19 | #define ID_FILE_OPEN 501
20 | #define ID_FILE_SAVE 502
21 | #define ID_FILE_SAVEAS 503
22 | #define ID_EDIT_COPY 504
23 | #define ID_EDIT_PASTE 505
24 | #define ID_EDIT_STRETCHPASTE 506
25 | #define ID_EDIT_ADDFORMAT 507
26 | #define ID_EDIT_REMOVEFORMAT 508
27 | #define ID_WINDOW_ARRANGEICONS 509
28 | #define ID_WINDOW_CASCADE 510
29 | #define ID_WINDOW_TILE 511
30 | #define ID_HELP_ABOUT 512
31 | #define ID_HELP_CONTENTS 513
32 | #define ID_FILE_CLOSE 514
33 | #define ID_WINDOW_TILEVERTICAL 515
34 | #define ID_FILE_EXTRACT 516
35 | #define ID_EDIT_IMPORTBMP 518
36 | #define ID_EDIT_STRETCHIMPORTBMP 519
37 | #define ID_EDIT_EXPORTBMP 520
38 | #define IDC_LIST1 603
39 | #define IDC_DISPLAYICON 605
40 | #define ID_WIDTHSLIDER 609
41 | #define ID_HEIGHTSLIDER 610
42 | #define ID_COLORSLIDER 615
43 | #define ID_WIDTHTEXT 616
44 | #define ID_HEIGHTTEXT 617
45 | #define IDC_SQUAREONLY 618
46 | #define IDM_WINDOWCHILD 700
47 | #define ID_GETNUMFORMATS 701
48 | #define ID_UPDATETITLE 703
49 | #define ID_HASFILECHANGED 705
50 | #define ID_COLORTEXT 710
51 | #define IDC_DISPLAYBOX -1
52 | #define IDC_STATIC -1
53 |
54 | // Next default values for new objects
55 | //
56 | #ifdef APSTUDIO_INVOKED
57 | #ifndef APSTUDIO_READONLY_SYMBOLS
58 | #define _APS_NO_MFC 1
59 | #define _APS_NEXT_RESOURCE_VALUE 421
60 | #define _APS_NEXT_COMMAND_VALUE 521
61 | #define _APS_NEXT_CONTROL_VALUE 620
62 | #define _APS_NEXT_SYMED_VALUE 706
63 | #endif
64 | #endif
65 |
--------------------------------------------------------------------------------
/!SourceCode/test_findpassword/Form1.frm:
--------------------------------------------------------------------------------
1 | VERSION 5.00
2 | Begin VB.Form Form1
3 | Caption = "Form1"
4 | ClientHeight = 3195
5 | ClientLeft = 60
6 | ClientTop = 345
7 | ClientWidth = 4680
8 | LinkTopic = "Form1"
9 | ScaleHeight = 3195
10 | ScaleWidth = 4680
11 | StartUpPosition = 2 'CenterScreen
12 | Begin VB.CommandButton Command1
13 | Caption = "Copy"
14 | Height = 510
15 | Left = 1710
16 | TabIndex = 1
17 | Top = 2520
18 | Width = 1185
19 | End
20 | Begin VB.ListBox List1
21 | Height = 2205
22 | Left = 90
23 | TabIndex = 0
24 | Top = 180
25 | Width = 4380
26 | End
27 | End
28 | Attribute VB_Name = "Form1"
29 | Attribute VB_GlobalNameSpace = False
30 | Attribute VB_Creatable = False
31 | Attribute VB_PredeclaredId = True
32 | Attribute VB_Exposed = False
33 | '3mb file...embedded markers at:
34 | '001097C0 AA AA AA
35 | '0020EC50 BB BB BB
36 | '002FFFA0 FF FF FF
37 |
38 | 'output:
39 | '----------------------------
40 | 'Starting new ScanForPassword()
41 | 'found! ends at20EC53
42 | '0.172 seconds
43 | '
44 | 'Starting FileStream.FindBytes scan
45 | 'found! pointer is:20EC53
46 | '25.547 seconds
47 |
48 | 'to integrate this new code:
49 | 'Decompiler.bas - Function ReadPassword
50 | 'old:
51 | ' 'FILE.FindBytes &HF9, 0, 0
52 | 'If FILE.EOS = False Then
53 | '
54 | 'new:
55 | ' dim newPointer as long
56 | ' If ScanForPassword(FILE.filename, FILE.Position, newPointer, &HF9, 0, 0) Then
57 | ' FILE.Position = newPointer
58 |
59 | Private Sub Form_Load()
60 |
61 | Dim endsAt As Long
62 | Dim path As String
63 |
64 | Me.Show
65 | Me.Refresh
66 | path = App.path & "\noname.dat"
67 |
68 | If Not FileExists(path) Then
69 | List1.AddItem "test file not found..."
70 | Exit Sub
71 | End If
72 |
73 | List1.AddItem "Starting new ScanForPassword()"
74 |
75 | StartBenchMark
76 |
77 | If ScanForPassword(path, &H1000, endsAt, &HBB, &HBB, &HBB) Then
78 | List1.AddItem "found! ends at" & Hex(endsAt)
79 | Else
80 | List1.AddItem "Not found!"
81 | End If
82 |
83 | List1.AddItem EndBenchMark
84 | List1.AddItem ""
85 | List1.AddItem "Starting FileStream.FindBytes scan"
86 | Me.Refresh
87 |
88 | Dim f As New FileStream
89 | StartBenchMark
90 |
91 | f.Create path, False, False, True
92 | f.Position = &H1000
93 | f.FindBytes &HBB, &HBB, &HBB
94 |
95 | If f.EOS = False Then
96 | List1.AddItem "found! pointer is:" & Hex(f.Position)
97 | Else
98 | List1.AddItem "Not found!"
99 | End If
100 |
101 | f.CloseFile
102 | List1.AddItem EndBenchMark
103 |
104 | End Sub
105 |
106 | 'this has been tested to return the same endsAt pointer as the original findBytes did..you reset it if ok..
107 | Private Function ScanForPassword(fpath As String, startPos As Long, ByRef endsAt As Long, ParamArray Bytes()) As Boolean
108 |
109 | Dim f As Long, pointer As Long, x As Long
110 | Dim buf() As Byte, i As Long, j As Long
111 |
112 | On Error Resume Next
113 |
114 | endsAt = 0
115 | Const bufSz As Long = 9000
116 | ReDim buf(bufSz)
117 |
118 | f = FreeFile
119 | Open fpath For Binary Access Read As f
120 | Seek f, startPos
121 |
122 | Do While pointer < LOF(f)
123 | 'If abort Then GoTo aborting
124 | pointer = Seek(f)
125 | x = LOF(f) - pointer
126 | If x < 1 Then Exit Do
127 | If x < bufSz Then ReDim buf(x)
128 | Get f, , buf()
129 | For i = 0 To UBound(buf)
130 | If buf(i) = Bytes(0) Then
131 | For j = 1 To UBound(Bytes)
132 | If buf(i + j) <> Bytes(j) Then Exit For
133 | Next
134 | If j > UBound(Bytes) Then 'we found it!
135 | ScanForPassword = True
136 | endsAt = pointer + i + UBound(Bytes)
137 | Exit Do
138 | End If
139 | End If
140 | Next
141 | Loop
142 |
143 | Close f
144 |
145 | End Function
146 |
147 |
148 | Private Sub Command1_Click()
149 | Clipboard.Clear
150 | Clipboard.SetText lbCopy(List1)
151 | End Sub
152 |
153 |
154 |
--------------------------------------------------------------------------------
/!SourceCode/test_findpassword/Module1.bas:
--------------------------------------------------------------------------------
1 | Attribute VB_Name = "Module1"
2 | 'misc fx to support FileStreamClass plus some debug code i added
3 | Global Const ERR_OPENFILE = 0
4 | Global Const DEBUG_FH = False
5 | Global Const isAutomationRun = False
6 |
7 | Private startTime As Long
8 | Private Declare Function GetTickCount Lib "kernel32" () As Long
9 |
10 | Function fHandleDebugLog(x)
11 |
12 | End Function
13 |
14 | Function pad(x, y)
15 |
16 | End Function
17 |
18 | Public Function Inc(ByRef value, Optional Increment& = 1)
19 | value = value + Increment
20 | Inc = value
21 | End Function
22 |
23 | Function Max(ParamArray values())
24 | Dim item
25 | For Each item In values
26 | Max = IIf(Max < item, item, Max)
27 | Next
28 | End Function
29 |
30 | Function lbCopy(lstBox As Object) As String
31 |
32 | Dim i As Long
33 | Dim tmp() As String
34 |
35 | For i = 0 To lstBox.ListCount
36 | push tmp, lstBox.List(i)
37 | Next
38 |
39 | lbCopy = Join(tmp, vbCrLf)
40 |
41 | End Function
42 |
43 |
44 | Sub StartBenchMark()
45 | startTime = GetTickCount()
46 | End Sub
47 |
48 | Function EndBenchMark() As String
49 | Dim endTime As Long, loadTime As Long
50 | endTime = GetTickCount()
51 | loadTime = endTime - startTime
52 | EndBenchMark = loadTime / 1000 & " seconds"
53 | End Function
54 |
55 |
56 |
57 | Sub push(ary, value) 'this modifies parent ary object
58 | On Error GoTo init
59 | x = UBound(ary) '<-throws Error If Not initalized
60 | ReDim Preserve ary(UBound(ary) + 1)
61 | ary(UBound(ary)) = value
62 | Exit Sub
63 | init: ReDim ary(0): ary(0) = value
64 | End Sub
65 |
66 |
67 |
68 | Function FileExists(path As String) As Boolean
69 | On Error GoTo hell
70 |
71 | If Len(path) = 0 Then Exit Function
72 | If Right(path, 1) = "\" Then Exit Function
73 | If Dir(path, vbHidden Or vbNormal Or vbReadOnly Or vbSystem) <> "" Then FileExists = True
74 |
75 | Exit Function
76 | hell: FileExists = False
77 | End Function
78 |
--------------------------------------------------------------------------------
/!SourceCode/test_findpassword/Project1.vbp:
--------------------------------------------------------------------------------
1 | Type=Exe
2 | Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation
3 | Form=Form1.frm
4 | Class=FileStream; FileStream.cls
5 | Module=Module1; Module1.bas
6 | Startup="Form1"
7 | ExeName32="Project1.exe"
8 | Command32=""
9 | Name="Project1"
10 | HelpContextID="0"
11 | CompatibleMode="0"
12 | MajorVer=1
13 | MinorVer=0
14 | RevisionVer=0
15 | AutoIncrementVer=0
16 | ServerSupportFiles=0
17 | VersionCompanyName="sandsprite"
18 | CompilationType=0
19 | OptimizationType=0
20 | FavorPentiumPro(tm)=0
21 | CodeViewDebugInfo=0
22 | NoAliasing=0
23 | BoundsCheck=0
24 | OverflowCheck=0
25 | FlPointCheck=0
26 | FDIVCheck=0
27 | UnroundedFP=0
28 | StartMode=0
29 | Unattended=0
30 | Retained=0
31 | ThreadPerObject=0
32 | MaxNumberOfThreads=1
33 |
34 | [MS Transaction Server]
35 | AutoRefresh=1
36 |
37 | [fastBuild]
38 | fullPath=%ap%\Project1.exe
39 |
--------------------------------------------------------------------------------
/!SourceCode/test_findpassword/Project1.vbw:
--------------------------------------------------------------------------------
1 | Form1 = 44, 44, 1198, 967, , 22, 22, 964, 691, C
2 | FileStream = -346, 80, 1068, 535, C
3 | Module1 = 132, 132, 1074, 801, C
4 |
--------------------------------------------------------------------------------
/!SourceCode/test_findpassword/noname.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/!SourceCode/test_findpassword/noname.dat
--------------------------------------------------------------------------------
/!SourceCode/test_findpassword/pass_fail_logs.txt:
--------------------------------------------------------------------------------
1 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\eb404ee7aad980678c676f1bcd5beaf9_files\eb404ee7aad980678c676f1bcd5beaf9
2 | >>> USED PASSWORD SCAN
3 | >>> USED PASSWORD SCAN
4 | >>> USED PASSWORD SCAN
5 | >>> USED PASSWORD SCAN
6 | >>> USED PASSWORD SCAN
7 | >>> USED PASSWORD SCAN
8 | FAILED Time: 5.156 seconds Offsets: 0
9 |
10 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\f6d516b944ea4213701d5d4c1f120392_files\f6d516b944ea4213701d5d4c1f120392
11 | >>> USED PASSWORD SCAN
12 | >>> USED PASSWORD SCAN
13 | >>> USED PASSWORD SCAN
14 | >>> USED PASSWORD SCAN
15 | >>> USED PASSWORD SCAN
16 | SUCCESS Time: 4.234 seconds Offsets: 2
17 |
18 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\6896674e25d8942e7598061c0b5a9a23_files\6896674e25d8942e7598061c0b5a9a23
19 | >>> USED PASSWORD SCAN
20 | >>> USED PASSWORD SCAN
21 | >>> USED PASSWORD SCAN
22 | SUCCESS Time: 6.422 seconds Offsets: 1
23 |
24 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\63946b9715c96d6c989a367b2fc8d9c2_files\63946b9715c96d6c989a367b2fc8d9c2
25 | >>> USED PASSWORD SCAN
26 | >>> USED PASSWORD SCAN
27 | >>> USED PASSWORD SCAN
28 | >>> USED PASSWORD SCAN
29 | >>> USED PASSWORD SCAN
30 | SUCCESS Time: 3.469 seconds Offsets: 1
31 |
32 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\4172b5c0a5aa7e2bc2f706870ae96342_files\4172b5c0a5aa7e2bc2f706870ae96342
33 | >>> USED PASSWORD SCAN
34 | >>> USED PASSWORD SCAN
35 | SUCCESS Time: 18.156 seconds Offsets: 1
36 |
37 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\d3f2dc9b66ab1cbcb23f0c2b188c91df_files\d3f2dc9b66ab1cbcb23f0c2b188c91df
38 | >>> USED PASSWORD SCAN
39 | >>> USED PASSWORD SCAN
40 | >>> USED PASSWORD SCAN
41 | >>> USED PASSWORD SCAN
42 | >>> USED PASSWORD SCAN
43 | >>> USED PASSWORD SCAN
44 | >>> USED PASSWORD SCAN
45 | >>> USED PASSWORD SCAN
46 | >>> USED PASSWORD SCAN
47 | >>> USED PASSWORD SCAN
48 | >>> USED PASSWORD SCAN
49 | FAILED Time: 10.734 seconds Offsets: 0
50 |
51 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\846bb42214d60d101cd04175cba120c6_files\846bb42214d60d101cd04175cba120c6
52 | >>> USED PASSWORD SCAN
53 | >>> USED PASSWORD SCAN
54 | FAILED Time: 2.641 seconds Offsets: 0
55 |
56 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\e4119c2410ffc063dd293c7c5fd422d3_files\e4119c2410ffc063dd293c7c5fd422d3
57 | >>> USED PASSWORD SCAN
58 | >>> USED PASSWORD SCAN
59 | FAILED Time: 2.031 seconds Offsets: 0
60 |
61 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\12831f7520899e892e8b27499b94e1c7_files\12831f7520899e892e8b27499b94e1c7
62 | >>> USED PASSWORD SCAN
63 | >>> USED PASSWORD SCAN
64 | >>> USED PASSWORD SCAN
65 | >>> USED PASSWORD SCAN
66 | FAILED Time: 3.453 seconds Offsets: 0
67 |
68 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\18e989e6e40ce764bc590f3e4244d539_files\18e989e6e40ce764bc590f3e4244d539
69 | >>> USED PASSWORD SCAN
70 | >>> USED PASSWORD SCAN
71 | >>> USED PASSWORD SCAN
72 | >>> USED PASSWORD SCAN
73 | >>> USED PASSWORD SCAN
74 | SUCCESS Time: 4.578 seconds Offsets: 1
75 |
76 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\0b0b1036ef24173568f53e81b7381527_files\0b0b1036ef24173568f53e81b7381527
77 | >>> USED PASSWORD SCAN
78 | >>> USED PASSWORD SCAN
79 | >>> USED PASSWORD SCAN
80 | >>> USED PASSWORD SCAN
81 | >>> USED PASSWORD SCAN
82 | SUCCESS Time: 3.953 seconds Offsets: 2
83 |
84 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\4b3438aad38c953747e948bb5db7936b_files\4b3438aad38c953747e948bb5db7936b
85 | >>> USED PASSWORD SCAN
86 | >>> USED PASSWORD SCAN
87 | FAILED Time: 4.625 seconds Offsets: 0
88 |
89 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\d60f1dd6ed48ab793971885d17a32a52_files\d60f1dd6ed48ab793971885d17a32a52
90 | >>> USED PASSWORD SCAN
91 | >>> USED PASSWORD SCAN
92 | FAILED Time: 4859.703 seconds Offsets: 0
93 |
94 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\8b6757461a26e8dd38e07fea3dad917e_files\8b6757461a26e8dd38e07fea3dad917e
95 | >>> USED PASSWORD SCAN
96 | >>> USED PASSWORD SCAN
97 | FAILED Time: 1.859 seconds Offsets: 0
98 |
99 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\3a27e9f6d61a69be4b329baa40036141_files\3a27e9f6d61a69be4b329baa40036141
100 | >>> USED PASSWORD SCAN
101 | >>> USED PASSWORD SCAN
102 | >>> USED PASSWORD SCAN
103 | SUCCESS Time: 17.921 seconds Offsets: 1
104 |
105 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\c1c5a61d9f30dc9a5f1a7e1d88506a9d_files\c1c5a61d9f30dc9a5f1a7e1d88506a9d
106 | >>> USED PASSWORD SCAN
107 | >>> USED PASSWORD SCAN
108 | FAILED Time: 2.719 seconds Offsets: 0
109 |
110 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\50266a0962c466dad53958bb0a982a5f_files\50266a0962c466dad53958bb0a982a5f
111 | >>> USED PASSWORD SCAN
112 | >>> USED PASSWORD SCAN
113 | FAILED Time: 7.094 seconds Offsets: 0
114 |
115 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\a4a3b8f971fdc03f39985538181f8e1c_files\a4a3b8f971fdc03f39985538181f8e1c
116 | >>> USED PASSWORD SCAN
117 | >>> USED PASSWORD SCAN
118 | >>> USED PASSWORD SCAN
119 | >>> USED PASSWORD SCAN
120 | FAILED Time: 7.078 seconds Offsets: 0
121 |
122 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\cc41e60e15b82a6d1b1d713f6649aeca_files\cc41e60e15b82a6d1b1d713f6649aeca
123 | >>> USED PASSWORD SCAN
124 | >>> USED PASSWORD SCAN
125 | >>> USED PASSWORD SCAN
126 | >>> USED PASSWORD SCAN
127 | >>> USED PASSWORD SCAN
128 | SUCCESS Time: 5.25 seconds Offsets: 1
129 |
130 | Handling Sample: C:\Documents and Settings\david\Desktop\AutoIT_SAMPLES\bde4694b82df31150914e3dd9f7a7b17_files\bde4694b82df31150914e3dd9f7a7b17
131 | >>> USED PASSWORD SCAN
132 | >>> USED PASSWORD SCAN
133 | FAILED Time: 6.172 seconds Offsets: 0
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.frm eol=crlf
2 | *.bas eol=crlf
3 | *.cls eol=crlf
4 | *.ctl eol=crlf
5 | *.vbp eol=crlf
6 | *.txt eol=crlf
7 | *.js eol=crlf
8 | *.iss eol=crlf
9 | *.c eol=crlf
10 | *.h eol=crlf
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /AS3_Sorcerer/*
2 | /filter_samples/*
3 | *.obj
4 | /images/*
5 | /otherStuff/*
6 | /zlib/*
7 | /sc_samples/*
8 | /plugins/zeus_unpack/*
9 | *.oca
10 | *.exp
11 | *.lib
12 | *.pdb
13 | *.idb
14 | /plugins/old_*
15 | *.url
16 | *.log
17 | *.URL
18 | *.suo
19 | *.user
20 | *.ncb
21 | *.png
22 | *.gif
23 | /_AS3*
24 | /mupdf/Release/*
25 | /mupdf/sample*
26 | /plugins/_*.mdb
27 | /plugins/build_db.mdb
28 | /iTextFilters/iText_Filters/obj/*
29 | *.rar
30 | /plugins/zeus_unpack*
31 | Shortcut*
32 | SCIVBX.ocx
33 | *_Setup*
34 | /_modded*
35 | _olly.dll
36 | iTextFilters.dll.config
37 | /scripts/old_*
38 | old_*
39 | new_*
40 | /data/winhex/*
41 |
--------------------------------------------------------------------------------
/Doc/Dealing with modified Au3-files-Dateien/image001.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/Doc/Dealing with modified Au3-files-Dateien/image001.jpg
--------------------------------------------------------------------------------
/Doc/Dealing with modified Au3-files-Dateien/image002.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/Doc/Dealing with modified Au3-files-Dateien/image002.jpg
--------------------------------------------------------------------------------
/Doc/Dealing with modified Au3-files.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/Doc/Dealing with modified Au3-files.htm
--------------------------------------------------------------------------------
/Doc/Finding the Ahk-ExtraDecryption.txt:
--------------------------------------------------------------------------------
1 | 1. open target in Olly
2 |
3 | 2. 'unpacking' UPX
4 | just scroll down until it looks like here
5 |
6 | PUSH EBX
7 | PUSH EDI
8 | CALL EBP
9 | POP EAX
10 | POPAD
11 | LEA EAX, [ESP-80]
12 | PUSH 0
13 | CMP ESP, EAX
14 | JNZ SHORT 00471BD0
15 | SUB ESP, -80
16 | JMP 00442B4F <- set BREAKPOINT here
17 | DB 00
18 | DB 00
19 | DB 00
20 | DB 00
21 |
22 |
23 | 3. String Reference ">AUTOHOTKEY SCRIPT<"
24 |
25 | to jump in here:
26 |
27 | LEA EAX, [ARG.11]
28 | PUSH EAX
29 | LEA EAX, [ARG.24]
30 | PUSH EAX
31 | PUSH 0045E320 ASCII ">AUTOHOTKEY SCRIPT<"
32 | LEA ECX, [LOCAL.84]
33 | MOV [ARG.4], EBX
34 | CALL
35 | TEST EAX, EAX
36 | JNZ SHORT 004482A7
37 | MOV [ESI+4B1], BL
38 | JMP
39 |
40 | Place label(StrCmp; Continue) to get a better overview
41 | No the same pattern ">AHK WITH ICON<"
42 |
43 |
44 | LEA EAX, [ARG.11]
45 | PUSH EAX ; /Arg3
46 | LEA EAX, [ARG.24] ; |
47 | PUSH EAX ; |Arg2
48 | PUSH 0045E310 ; |Arg1 = 0045E310 ASCII ">AHK WITH ICON<"
49 | LEA ECX, [LOCAL.84] ; |
50 | CALL ; \includes.00450C9F
51 | TEST EAX, EAX
52 | JNZ SHORT 004482CC
53 | MOV [BYTE ESI+4B1], 1
54 | JMP SHORT
55 | ------------------------------------------------------------------------------
56 |
57 | And now the N/A Versions...
58 |
59 | note ">" is ">AUTOHOTKEY SCRIPT<" ...
60 |
61 | LEA EAX, [ARG.11]
62 | PUSH EAX ; /Arg3
63 | LEA EAX, [ARG.24] ; |
64 | PUSH EAX ; |Arg2
65 | PUSH 0045B68C ">"
66 | LEA ECX, [LOCAL.84] ; |
67 | MOV [ARG.4], 1 ; |
68 | CALL ; \includes.00450C9F
69 | TEST EAX, EAX
70 | JNZ SHORT 004482F7
71 | MOV [ESI+4B1], BL
72 | JMP SHORT
73 |
74 | ... and "<" is ">AHK WITH ICON<"
75 |
76 |
77 | LEA EAX, [ARG.11]
78 | PUSH EAX ; /Arg3
79 | LEA EAX, [ARG.24] ; |
80 | PUSH EAX ; |Arg2
81 | PUSH 0045B684 ; |Arg1 = 0045B684
82 | LEA ECX, [LOCAL.84] ; |
83 | CALL ; \includes.00450C9F
84 | TEST EAX, EAX
85 | JNZ
102 | Loop
103 | /MOV EDI, [ARG.28]
104 | |LEA EDI, [EDI+ECX*2]
105 | |SUB [EDI], DX ScriptStart[i*2] = ScriptStart[i*2] - DX
106 | |INC ECX
107 | |CMP ECX, EAX
108 | \JB SHORT Loop
109 |
110 | Continue:
111 | MOV EAX, [ARG.24]
112 |
113 |
114 | 5. The important value is the 700
--------------------------------------------------------------------------------
/Doc/Inject_au3/injectdll.bb:
--------------------------------------------------------------------------------
1 | typedef struct _LOADED_IMAGE {
2 | PSTR ModuleName;
3 | HANDLE hFile;
4 |
5 |
6 | Attention that sample code has a great tendency to [b]crash [/b] >_< when it comes to call[url="http://www.autoitscript.com/autoit3/docs/functions/DllCall.htm"][color=#000090]DllCall[/color][/url][color=#FF8000][font=Consolas, 'Courier New', Courier, 'Nimbus Mono L', monospace][size=2]([/size][/font][/color][color=#FF0000][font=Consolas, 'Courier New', Courier, 'Nimbus Mono L', monospace][size=2]"imagehlp.dll"[/size][/font][/color][color=#FF8000][font=Consolas, 'Courier New', Courier, 'Nimbus Mono L', monospace][size=2],[/size][/font][/color][color=#FF0000][font=Consolas, 'Courier New', Courier, 'Nimbus Mono L', monospace][size=2]"UnMapAndLoad"... )[/size][/font][/color][list]
7 | [*]Well one quick and dirty workaround would be to just drop/[b]delete [/b]all [color=#FF0000][font=Consolas, 'Courier New', Courier, 'Nimbus Mono L', monospace][size=2]UnMapAndLoad [/size][/font][/color]calls since we just [b]read[/b] data. Nothing is needed to write back. :thumbsup:
8 | [/list]
9 | But well that's somehow unsatisfying and so we've learn nothing from that.Well it took me some time to find out the reason for the crash that somehow occurs inside[i]imagehlp!UnMapAndLoad();FreeModuleName [/i]during the KERNEL32.HeapFree call.First i though there is something wrong with some unproper use of "ptr" or DllStructGetPtr() well but this seem to be fine.However to crashes here:typedef [color=blue]struct[/color] _LOADED_IMAGE { PSTR ModuleName;PUSH [DWORD EBP+8] ; /pMemory <-[color=#000000][font=Consolas, Courier, monospace]PSTR ModuleName;[/font][/color]PUSH 0 ; |Flags = 0PUSH [color=#ff0000][DWORD 6CC851F4] [/color] ; [b]|hHeap = 01420000[/b]CALL [<&KERNEL32.HeapFree>] when it tries to free the memory [i]MapAndLoad [/i]allocated for the path of the ModuleName.And finally I found it - the is problem is that Un[i]MapAndLoad uses some other [/i][b]hHeap[/b] address than [i]MapAndLoad[/i] used.So why does that value changes ?[u]->Well because Autoit loads and unload imagehlp.dll on each call when you use the dll parameter as a String.[/u][list]
10 | [*]So instead doing it like this
11 | [s][autoit]
12 | DllCall("imagehlp.dll","MapAndLoad"... )
13 | DllCall("imagehlp.dll","UnMapAndLoad"... )
14 | [/autoit][/s]Do it like this:[autoit]
15 | $himagehlp_dll = DllOpen("imagehlp.dll")
16 | DllCall(himagehlp_dll, "int", "MapAndLoad"...)
17 | DllCall(himagehlp_dll, "int", "UnMapAndLoad"...)
18 | [/autoit]
19 |
20 | and everything will be alright.
21 | [/list]
22 | Well base on the example i made my own code that is targeting the Dll-Flag in the PE-Characteristics
23 | [autoit]
24 | Main()
25 | Func Main()
26 |
27 | ; Get TargetFile
28 | Local $PE_FileName = GetPEFile()
29 | If $PE_FileName = False Then Exit
30 |
31 | ; verify TargetFile
32 | If OpenPEFile($PE_FileName) = False Then Exit
33 | PEFile_UnMap()
34 |
35 | ; Copy *.* to *.dll and open it
36 | Local $Dll_FileName = $PE_FileName
37 | ChangeFileExt ($Dll_FileName,"dll")
38 |
39 | FileCopy ($PE_FileName, $Dll_FileName, 1)
40 | OpenPEFile($Dll_FileName)
41 |
42 | ; Set Dll Flag in PE_Header/Characteristics [via BitOR]
43 | NT_hdr_set("Characteristics", BitOR(NT_hdr_get("Characteristics"), _
44 | $Characteristics_IMAGE_FILE_DLL) )
45 |
46 | ; Save Changes
47 | PEFile_UnMap()
48 |
49 | Logtxt($Dll_FileName & " created.")
50 |
51 | EndFunc ;==>Main
52 | [/autoit]
53 | ^-that's just the roadmap - DL ExeToDll.au3 for real use....and why convert a Exe to an DLL?Na well - just for fun. :dance:... or to inject it into another Exe - to get some code (or au3-Script :ILA3:) in, to extract some 'virtual'/'bundled' files or data from that Process.-> Inject_au3.7z :D
--------------------------------------------------------------------------------
/Doc/Inject_au3/injectdll.cmd:
--------------------------------------------------------------------------------
1 | @prompt -$G
2 |
3 | @set TargetExe=%~nx1
4 | @set TargetAu3=%~n1.au3
5 |
6 | @set AutoIt3_dll=%~dp0AutoIt3.dll
7 | @set SecondsToWait=1
8 |
9 |
10 | @call :CheckUsage
11 | %FinalCommand%
12 |
13 |
14 | start "my injectdll Launcher" "%TargetExe%" "%TargetAu3%"
15 |
16 |
17 | Call :GetPID "%TargetExe%"
18 |
19 | ::@Pause "Press any key if target is loaded.
20 | @timeout /T %SecondsToWait%
21 | ::@ping -n %SecondsToWait% 127.0.0.1 > NUL
22 |
23 | ::Set /P PID="Please PID of target: "
24 |
25 | @cd /D %~dp0
26 | injectdll.exe %PID% "%AutoIt3_dll%"
27 | ::@pause
28 | @goto :EOF
29 |
30 | :GetPID
31 |
32 | @set CMD_Tasklist=^
33 | Tasklist /FI "IMAGENAME eq %~1" /FO CSV /NH
34 |
35 | @FOR /F "tokens=1,2 delims=," %%i in ('%CMD_Tasklist%') do set PID=%%j
36 |
37 | ::%CMD_Tasklist%
38 |
39 | @goto :EOF
40 |
41 |
42 | :CheckUsage
43 |
44 | @Set FinalCommand=
45 |
46 | @echo inject Dll
47 | @echo ==========
48 | @echo.
49 |
50 | @if not exist "%TargetExe%" (
51 | @echo Usage: injectdll ^
52 | @echo.
53 |
54 |
55 | @Set FinalCommand=@goto :quit
56 | )
57 |
58 | @if not exist "%TargetAu3%" (
59 | @echo required #1: ^ ^(same name as *.exe but *.au3 extension ^)
60 | @echo that you like to run inside ^
61 | @echo.
62 | @Set FinalCommand=@goto :quit
63 |
64 | )
65 |
66 | @if not exist "%AutoIt3_dll%" (
67 | @echo required #2: Make a AutoIt3.dll !!!
68 | @echo Create it via
69 | @echo 'ExeToDll.au3 ^'
70 | @echo.
71 | @Set FinalCommand=@goto :quit
72 | )
73 |
74 | @goto :EOF
75 |
76 |
77 | :quit
78 |
79 | @pause >nul
--------------------------------------------------------------------------------
/Doc/Inject_au3/injectdll.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/Doc/Inject_au3/injectdll.exe
--------------------------------------------------------------------------------
/Doc/Inject_au3/injectdll.txt:
--------------------------------------------------------------------------------
1 | injectdll 1.0
2 | =============
3 |
4 | What is this good for?
5 |
6 | Well to get 'virtual files' that were bundled into a exe with Enigma or Themida
7 | let's there is a
8 | DecompileMe.exe
9 | Au3-Script
10 | ...
11 | DllCall("Project2.dll", "int", "AddIntegers", "int", 666, "int", 2)
12 | ...
13 | Project2.dll is such a 'virtual files' - it's not written to disk, but
14 | inside the DecompileMe.exe process it's available.
15 | (Since API-calls like CreateFile or LoadLibrary are hooked)
16 |
17 | So the idea now is, to load some program code for dumping this file(s) into the
18 | DecompileMe.exe process.
19 | That easiest way to do that,is by injecting a dll into the DecompileMe.exe process.
20 | (Just invoke a LoadLibraryA('my.Dll') inside the target Process via CreateRemoteThread)
21 |
22 | How it's done?
23 |
24 | AutoIt3.dll is the AutoIt3.exe with the Dll-flag set in the header.
25 | (use ExeToDll.au3 to 'create' other dll's/ test them with regsvr32.exe .dll before use!)
26 |
27 | 1. Run "DecompileMe.exe MyDumpScript.au3"
28 | DecompileMe.exe will ignore the commandline parameter 'MyDumpScript.au3'
29 | ^- however it'll be set. :)
30 |
31 | 2. injectdll.exe AutoIt3.dll -> DecompileMe.exe
32 |
33 | 3. AutoIt3.dll will now run inside DecompileMe.exe and use the commandline parameter(s) of DecompileMe.exe
34 | ... and so it'll run MyDumpScript.au3
35 |
36 | 4. MyDumpScript.au3 has also access to the virtual files
37 |
38 | Notes:
39 | * copy Include\*.au3 into the dir with DecompileMe.exe incase you make use of #include
40 | * Some GUI-functions like OpenFileDialog are not working properly
41 | * use ExeToDll.au3 to create an 'own' injectdll
42 | * maybe suspend targetproces before injecting to disable possible dll-incjecting code
43 | (so just 'our' thread will run inside)
--------------------------------------------------------------------------------
/Doc/Inject_au3/src/injectdll.cpp:
--------------------------------------------------------------------------------
1 | // injectdll.cpp : Defines the entry point for the console application.
2 | //
3 |
4 | #include
5 | #include
6 |
7 |
8 | int main(int argc, char* argv[])
9 | {
10 | if (argc < 3)
11 | {
12 | printf("usage: injectdll \n");
13 | return 1;
14 | }
15 |
16 | // PROCESS_CREATE_THREAD|PROCESS_VM_WRITE|PROCESS_VM_READ|PROCESS_QUERY_INFORMATION|PROCESS_VM_OPERATION|THREAD_QUERY_INFORMATION
17 | HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, atoi(argv[1]));
18 |
19 | if (hProcess == INVALID_HANDLE_VALUE)
20 | {
21 | fprintf(stderr, "cannot open that pid\n");
22 | return 1;
23 | }
24 |
25 | PVOID mem = VirtualAllocEx(hProcess, NULL, strlen(argv[2]) + 1, MEM_COMMIT, PAGE_READWRITE);
26 |
27 | if (mem == NULL)
28 | {
29 | fprintf(stderr, "can't allocate memory in that pid\n");
30 | CloseHandle(hProcess);
31 | return 1;
32 | }
33 |
34 | if (WriteProcessMemory(hProcess, mem, (void*)argv[2], strlen(argv[2]) + 1, NULL) == 0)
35 | {
36 | fprintf(stderr, "can't write to memory in that pid\n");
37 | VirtualFreeEx(hProcess, mem, strlen(argv[2]) + 1, MEM_RELEASE);
38 | CloseHandle(hProcess);
39 | return 1;
40 | }
41 |
42 | HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE) GetProcAddress(GetModuleHandle("KERNEL32.DLL"),"LoadLibraryA"), mem, 0, NULL);
43 | if (hThread == INVALID_HANDLE_VALUE)
44 | {
45 | fprintf(stderr, "can't create a thread in that pid\n");
46 | VirtualFreeEx(hProcess, mem, strlen(argv[2]) + 1, MEM_RELEASE);
47 | CloseHandle(hProcess);
48 | return 1;
49 | }
50 |
51 | WaitForSingleObject(hThread, INFINITE);
52 |
53 | HANDLE hLibrary = NULL;
54 | if (!GetExitCodeThread(hThread, (LPDWORD)&hLibrary))
55 | {
56 | printf("can't get exit code for thread GetLastError() = %i.\n", GetLastError());
57 | CloseHandle(hThread);
58 | VirtualFreeEx(hProcess, mem, strlen(argv[2]) + 1, MEM_RELEASE);
59 | CloseHandle(hProcess);
60 | return 1;
61 | }
62 |
63 | CloseHandle(hThread);
64 | VirtualFreeEx(hProcess, mem, strlen(argv[2]) + 1, MEM_RELEASE);
65 |
66 | if (hLibrary == NULL)
67 | {
68 | hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE) GetProcAddress(GetModuleHandle("KERNEL32.DLL"),"GetLastError"), 0, 0, NULL);
69 | if (hThread == INVALID_HANDLE_VALUE)
70 | {
71 | fprintf(stderr, "LoadLibraryA returned NULL and can't get last error.\n");
72 | CloseHandle(hProcess);
73 | return 1;
74 | }
75 |
76 | WaitForSingleObject(hThread, INFINITE);
77 | DWORD error;
78 | GetExitCodeThread(hThread, &error);
79 |
80 | CloseHandle(hThread);
81 |
82 | printf("LoadLibrary return NULL, GetLastError() is %i\n", error);
83 | CloseHandle(hProcess);
84 | return 1;
85 | }
86 |
87 | CloseHandle(hProcess);
88 |
89 | printf("injected %08x\n", (DWORD)hLibrary);
90 |
91 | return 0;
92 | }
93 |
94 |
--------------------------------------------------------------------------------
/Doc/ScriptDump.cmd:
--------------------------------------------------------------------------------
1 | %1 /AutoIt3ExecuteLine "FileWrite(@ScriptName & '.a3x', Binary( FileRead(@ScriptFullPath) ))"
2 | pause
3 |
--------------------------------------------------------------------------------
/Doc/regexp/PrintFriendly-bn2090.css:
--------------------------------------------------------------------------------
1 |
2 |
3 | BODY{font-family:Verdana;font-size:70%;margin:0;padding:0}DIV.topic{margin:20px}.ContentArea{font-family:Verdana;margin:0 10px;padding:10px 0 0;vertical-align:top}.title{color:#000;font:normal 190% Arial,Helvetica,sans-serif;margin:0 0 10px}.subHeading{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:100%;font-weight:700;margin:0 0 4px}dl{font-family:Verdana;font-size:3mm;margin:0 0 10px;padding:0 0 0 1px}.parameter{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:100%;font-weight:700;margin:0}p{margin:15px 0;padding:0}div.section{margin-left:0;padding:2px 15px 2px 16px;width:100%}ul{line-height:140%;list-style-type:disc;margin-bottom:15px;margin-left:30px}div.alert table th{background:#efeff7;background-color:#ccc;border-bottom-width:0;color:#006;font-size:11px;font-weight:700;padding-left:5px;padding-right:5px}DIV.clsRegTree UL{margin-left:2.5em}DIV.clsRegTree UL UL{margin-bottom:0;margin-top:0}DIV.clsRegTree LI{line-height:normal;list-style-type:none;margin:0;text-indent:-2.5em}table.clsStd tbody tr td{background-color:#f7f7ff;border-bottom:1px solid #d5d5d3;border-left:1px solid #e0dfe3;border-right:1px solid #e0dfe3;border-top:1px solid #e0dfe3;white-space:normal}table.clsStd,div#mainBody div.section div.alert,div#mainBody div.section div.code,div#mainBody div.section ul div.alert{width:100%}table.clsStd tbody tr td span{white-space:normal}.tablediv table.dtTABLE{border:1px solid #ccc;width:95%}.tablediv table.dtTABLE tbody tr th{width:50%}.tablediv table.dtTABLE tbody tr td{border:1px solid #ccc;font-family:Verdana;font-size:3mm;width:50%}.section OL LI OL LI,.subSection OL LI OL LI{list-style-type:lower-alpha}H1{color:#000;font-family:Arial,Helvetica,sans-serif;font-size:190%;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;margin:0 0 10px}.clsBeta{color:red}dd p{margin-left:-40px;margin-top:0;padding-right:20px}code{background:#ddd;color:#006;display:block;font-family:Monospace,'Courier New',Courier;font-size:105%;margin:0 10px 0 0;padding:5px}pre{background:#ddd;font-family:'Lucida Console','Courier New';margin:0 0 0 1em;padding-bottom:0;padding-top:0}div.ContentArea table{width:auto;border-collapse:collapse}div.ContentArea table p{margin:0;padding:0}div.ContentArea table td{font-family:Verdana;font-size:3mm;padding:5px;text-align:left}div.ContentArea table th{background:#ccc;vertical-align:bottom}div.ContentArea table td{background:#fff;border:0 solid #ccc;vertical-align:top}.ContentArea .topic table{width:auto}.ContentArea .topic table td UL{margin:5px 10px 5px 20px}.ContentArea .section table td ul li,.ContentArea .subSection ul li,.ContentArea .topic ul li{list-style-image:url("b.gif")}div.code table{border:0;font-size:95%;margin-bottom:5px;margin-top:-.4em;width:100%}div.code table th{background:#ddd;border-bottom-color:#c8cdde;border-bottom-style:solid;border-bottom-width:1px;color:#006;font-weight:700}div.code table td{background:#ddd;border-top-color:#c8cdde;border-top-style:solid;border-top-width:1px;margin:0 0 10px;padding-left:5px;padding-right:5px;padding-top:5px}span#runningHeaderText{color:#039;font-size:90%;margin:0 10px;margin:20px}span#nsrTitle{color:#039;font-size:120%;font-weight:600}div.seeAlsoNoToggleSection{margin-left:0;padding:2px 15px 2px 0;width:100%}img.copyCodeImage{border:0;margin:1px 3px 1px 1px}DIV#mainSection TABLE{BORDER-RIGHT:#ddd 1px solid;BORDER-TOP:#ddd 1px solid;MARGIN-TOP:5px;FONT-SIZE:100%;MARGIN-BOTTOM:5px;MARGIN-LEFT:5px;BORDER-LEFT:#ddd 1px solid;WIDTH:97%;BORDER-BOTTOM:#ddd 1px solid}div#mainSection table td{border-bottom:1px solid #d5d5d3;border-left-color:#d5d5d3;border-left-style:solid;border-left-width:1px;border-top:1px solid #d5d5d3;margin:1px;padding-left:5px;padding-right:5px;border-right:1px solid #d5d5d3}div.code table th{background:#efeff7;border-bottom-color:#c8cdde;border-bottom-style:solid;border-bottom-width:1px;color:#006;font-weight:700;padding-left:5px;padding-right:5px}div.code table td{background:#efeff7;border-top-color:#ddd;border-top-style:solid;border-top-width:1px;padding-left:5px;padding-right:5px;padding-top:5px}span.copyCode{color:#00f;display:inline;float:right;font-size:90%;font-weight:400;text-align:right}div.code pre{color:#006;font-family:Monospace,'Courier New',Courier;font-size:105%}DIV.code{display:block;margin:0 10px 0 0;max-width:100%;padding:5px}H1.heading{font-size:110%;color:#039}.ui{font-weight:700}img.downloadCodeImage,img.viewCodeImage{border:0;margin-right:3px}div.alert table{border:0;font-size:100%;width:100%}div.alert table td{background:#f7f7ff;border-top-color:#fff;border-top-style:solid;border-top-width:1px;padding-left:5px;padding-right:5px}.tip{color:#00f;font-style:italic;text-decoration:underline}.languageFilter{color:#00f;padding-bottom:4px;text-decoration:underline}.math{font-family:'Times New Roman';font-size:125%}div.ContentArea table th p{font-weight:700}ol ul,ul ol{line-height:140%;margin-bottom:15px;margin-top:15px}.ContentArea .topic table td,.ContentArea .topic table td p{margin:0;padding:5px}
4 |
5 |
--------------------------------------------------------------------------------
/Shell_Install.cmd:
--------------------------------------------------------------------------------
1 |
2 | ::FOR /F "tokens=1,2 delims==" %%i in ('assoc .exe') do @Echo %%i %%j
3 | ::if %%j=="exefile" (
4 | @set RegPath=HKCR\exefile\shell\Decompile with myAutToExe\command
5 | ::reg query "%RegPath%" /ve
6 | ::if errorlevel 1 ()
7 | reg add "%RegPath%" /ve /t REG_SZ /d "%~DP0myAutToExe.exe "%%1""
8 | @echo Installed. (add 'Decompile with myAutToExe' when you rightclick on *.exe)
9 | @pause
--------------------------------------------------------------------------------
/Shell_Uninstall.cmd:
--------------------------------------------------------------------------------
1 | @set RegPath=HKCR\exefile\shell\Decompile with myAutToExe\command
2 | reg delete "%RegPath%" /ve /f
3 | @echo Uninstalled
4 | @pause
--------------------------------------------------------------------------------
/data/ExtractIcon.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/data/ExtractIcon.exe
--------------------------------------------------------------------------------
/data/LZSS.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/data/LZSS.exe
--------------------------------------------------------------------------------
/data/RanRot_MT.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/data/RanRot_MT.dll
--------------------------------------------------------------------------------
/data/Tidy/Tidy.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/data/Tidy/Tidy.exe
--------------------------------------------------------------------------------
/data/Tidy/Tidy.ini:
--------------------------------------------------------------------------------
1 | [ProgramSettings]
2 | * * * Indent 0 = Tabs >0 = Number of Space
3 | tabchar=0
4 |
5 | * * * Update Functions/Keywords/Macros/UDFs to Proper case
6 | proper=1
7 |
8 | * * * Update Constants defined in the "constant Include files"
9 | properconstants=0
10 |
11 | * * * Update Variables to: 1=LowerCase; 2=UpperCase; (default)3=First Dim/Local/Global or "First_Seen" Case
12 | vars=3
13 |
14 | * * * : (default)0=; 1=; 2=
15 | ;VARSChangePrefix=1
16 |
17 | * * * Update Spaces around Delimiters
18 | Delim=1
19 |
20 | * * * Add comment to EndFunc statement e.g. "EndFunc ;==>UDF_Name"
21 | #~ endfunc_comment=1
22 | * * * Ignore EndFunc statement comments.
23 | endfunc_comment=0
24 | * * * Remove comments from EndFunc statement.
25 | #~ endfunc_comment=-1
26 |
27 | * * * Added comment to EndRegion and make it the same as the #Region Comments.
28 | #~ endregion_comment=1
29 | * * * Ignore EndFunc statement comments.
30 | #~ endregion_comment=0
31 | * * * Remove comments from EndFunc statement.
32 | #~ endregion_comment=-1
33 |
34 |
35 | * * * Indent #region sections
36 | region_indent=1
37 |
38 | * * * Generate Documentation file for the Program and optionally Display it with Notepad at the end ot the Tidy run
39 | gen_doc=0
40 | Gen_Doc_Show=0
41 |
42 | * * * Keep x Version of the File before the Tidy run and optionally store them in SubDirectory "\Backup"
43 | KeepNVersions=1
44 |
45 | * * * Target backup directory which defaults to Scriptdir\Backup. Any other directory needs to exist or else it will use the default directory!
46 | backupDir=0
47 |
48 | * * * Remove Empty lines from Script Source
49 | Remove_Empty_Lines=
50 |
51 | #~ Skip_CommentBlock=
52 |
53 | * * * 1=Show Tidy Errors in Console 9=Debug Output
54 | ShowConsoleInfo=9
55 |
56 | * * * Run DIFF program at the end of the Tidy run to show the difference between original and new program.
57 | #~ ShowDiffPgm=C:\Progra~1\WinMerge\winmerge.exe "%new%" "%old%"
58 |
59 | * * * End With NewLine: 0=Strip Lastline CRLF (default) 1=Always end with RCLF
60 | End_With_NewLine=0
61 | *** Sort all Func-Endfunc Blocks in sequence and when #Region-#EndRegion is used sort them within that scope.
62 | Sort_Funcs=0
63 |
64 | *** Sort all Func-Endfunc Blocks in sequence of the Comment at the end of the Func() statement and then FuncName.
65 | When #Region-#EndRegion is used sort them within that scope.
66 | Sort_Funcs_Comments=0
--------------------------------------------------------------------------------
/data/Tidy/au3.api:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/data/Tidy/au3.api
--------------------------------------------------------------------------------
/data/Tidy/keywords.tbl:
--------------------------------------------------------------------------------
1 | |And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Static|Step|Switch|Then|To|True|Until|WEnd|While|With|#ce|#comments-end|#comments-start|#cs|#include|#include-once|#NoAutoIt3Execute|#NoTrayIcon|#OnAutoItStartRegister|#RequireAdmin|#endregion|#forcedef|#forceref|#region|
2 |
--------------------------------------------------------------------------------
/data/Tidy/macros.tbl:
--------------------------------------------------------------------------------
1 | |@AppDataCommonDir|@AppDataDir|@AutoItExe|@AutoItPID|@AutoItVersion|@AutoItX64|@COM_EventObj|@CommonFilesDir|@Compiled|@ComputerName|@ComSpec|@CPUArch|@CR|@CRLF|@DesktopCommonDir|@DesktopDepth|@DesktopDir|@DesktopHeight|@DesktopRefresh|@DesktopWidth|@DocumentsCommonDir|@error|@exitCode|@exitMethod|@extended|@FavoritesCommonDir|@FavoritesDir|@GUI_CtrlHandle|@GUI_CtrlId|@GUI_DragFile|@GUI_DragId|@GUI_DropId|@GUI_WinHandle|@HomeDrive|@HomePath|@HomeShare|@HotKeyPressed|@HOUR|@IPAddress1|@IPAddress2|@IPAddress3|@IPAddress4|@KBLayout|@LF|@LogonDNSDomain|@LogonDomain|@LogonServer|@MDAY|@MIN|@MON|@MSEC|@MUILang|@MyDocumentsDir|@NumParams|@OSArch|@OSBuild|@OSLang|@OSServicePack|@OSType|@OSVersion|@ProgramFilesDir|@ProgramsCommonDir|@ProgramsDir|@ScriptDir|@ScriptFullPath|@ScriptLineNumber|@ScriptName|@SEC|@StartMenuCommonDir|@StartMenuDir|@StartupCommonDir|@StartupDir|@SW_DISABLE|@SW_ENABLE|@SW_HIDE|@SW_LOCK|@SW_MAXIMIZE|@SW_MINIMIZE|@SW_RESTORE|@SW_SHOW|@SW_SHOWDEFAULT|@SW_SHOWMAXIMIZED|@SW_SHOWMINIMIZED|@SW_SHOWMINNOACTIVE|@SW_SHOWNA|@SW_SHOWNOACTIVATE|@SW_SHOWNORMAL|@SW_UNLOCK|@SystemDir|@TAB|@TempDir|@TRAY_ID|@TrayIconFlashing|@TrayIconVisible|@UserName|@UserProfileDir|@WDAY|@WindowsDir|@WorkingDir|@YDAY|@YEAR|
2 |
--------------------------------------------------------------------------------
/data/upx.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/data/upx.exe
--------------------------------------------------------------------------------
/myAutToExe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/myAutToExe.exe
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/readme.txt
--------------------------------------------------------------------------------
/samples/3.3/TokenTestFile.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/3.3/TokenTestFile.exe
--------------------------------------------------------------------------------
/samples/AutoIt2/Snapshot.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/AutoIt2/Snapshot.exe
--------------------------------------------------------------------------------
/samples/AutoIt316_TokenFile/!other/_00CF0000.mem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/AutoIt316_TokenFile/!other/_00CF0000.mem
--------------------------------------------------------------------------------
/samples/AutoIt316_TokenFile/TokenTestFile.au3:
--------------------------------------------------------------------------------
1 | #NoTrayIcon
2 | #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
3 | #AutoIt3Wrapper_UseUpx=n
4 | #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
5 | ;----------------------------------------------------
6 | ; TestFile - for AutoIt3 tokens expansions (Decomiler)
7 | ;----------------------------------------------------
8 |
9 | ;PreProcessor
10 |
11 | ;AutoItFunction UserString Macro
12 | FileInstall('>>>AUTOIT SCRIPT<<<', @ScriptDir & '\TokenTestFile_Extracted.au3')
13 | Exit
14 |
15 | ;operators
16 | $Dummy1 = (1+2-3/4)^2
17 | $Dummy2 += 1>2<3<>4>=5<=6=7&8
18 | $Dummy3 -= true==true=-true
19 | $Dummy4 /= 0x1
20 | $Dummy5 /= (-0x1)
21 | $Dummy6 *= 1.123 ;Float Number
22 | $Dummy7 &= -1.53 ;Float Number
23 | $Dummy8 = 1234567887654321 ;int64 Number
24 | $Dummy9 = -1234567887654321 ;int64 Number
25 |
26 | ;UserFunction
27 | myfunc($Dummy1,$Dummy2)
28 |
29 | ;user Varible
30 | $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object
31 |
32 | ;Properties
33 | $oShellWindows=$oShell.windows
34 |
35 |
36 | func myfunc($value,$value2)
37 | dim $Array1[4]
38 | $Array1[2]=1
39 | $Dummy1 = " "" "
40 | $Dummy2 = ' " '
41 | $Dummy3 = " ' ' """" "
42 |
43 | endfunc
44 |
45 | exit
46 |
--------------------------------------------------------------------------------
/samples/AutoIt316_TokenFile/decompiled/TokenTestFile_Decompiled.au3:
--------------------------------------------------------------------------------
1 | #NoTrayIcon
2 | FileInstall(">>>AUTOIT SCRIPT<<<", @ScriptDir & "\TokenTestFile_Extracted.au3")
3 | Exit
4 | $DUMMY = (1 + 2 - 3 / 4) ^ 2
5 | $DUMMY += 1 > 2 < 3 <> 4 >= 5 <= 6 = 7 & 8
6 | $DUMMY -= True == True = True
7 | $DUMMY /= 1
8 | $DUMMY *= 1.123
9 | $DUMMY &= 1500
10 | $DUMMY = 1234567887654321
11 | MYFUNC($DUMMY, $DUMMY)
12 | $OSHELL = ObjCreate("shell.application")
13 | $OSHELLWINDOWS = $OSHELL.windows
14 |
15 | Func MYFUNC($VALUE, $VALUE2)
16 | Dim $ARRAY1[4]
17 | $ARRAY1[2] = 1
18 | $DUMMY = ' " '
19 | $DUMMY = ' " '
20 | $DUMMY = " ' ' """" "
21 | EndFunc
22 |
23 | Exit
--------------------------------------------------------------------------------
/samples/AutoIt316_TokenFile/original/TokenTestFile.tok:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/AutoIt316_TokenFile/original/TokenTestFile.tok
--------------------------------------------------------------------------------
/samples/EnCodeIt2.0.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/EnCodeIt2.0.exe
--------------------------------------------------------------------------------
/samples/EnCodeItInfo/200699.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/EnCodeItInfo/200699.dll
--------------------------------------------------------------------------------
/samples/EnCodeItInfo/SkinCrafter.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/EnCodeItInfo/SkinCrafter.dll
--------------------------------------------------------------------------------
/samples/Unicode UTF-8/test.au3:
--------------------------------------------------------------------------------
1 | MSGBOX(0, "test", "测试")
--------------------------------------------------------------------------------
/samples/Unicode UTF-8/test_UTF16.au3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/Unicode UTF-8/test_UTF16.au3
--------------------------------------------------------------------------------
/samples/VanZande1 Obfuscated/Simon-original.au3:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | Opt('GuiOnEventMode',1)
4 |
5 | HotKeySet("{UP}", "HClick")
6 | HotKeySet("{DOWN}", "HClick")
7 | HotKeySet("{LEFT}", "HClick")
8 | HotKeySet("{RIGHT}","HClick")
9 |
10 | Func HClick()
11 | IF @HotKeyPressed = "{LEFT}" Then $Num = 1
12 | IF @HotKeyPressed = "{UP}" Then $Num = 2
13 | IF @HotKeyPressed = "{DOWN}" Then $Num = 3
14 | IF @HotKeyPressed = "{RIGHT}" Then $Num = 4
15 | Switch $Num
16 | Case 1
17 | ControlClick("Simon", "", Execute($Red))
18 | Case 2
19 | ControlClick("Simon", "", Execute($Green))
20 | Case 3
21 | ControlClick("Simon", "", Execute($Blue))
22 | Case 4
23 | ControlClick("Simon", "", Execute($Yellow))
24 | EndSwitch
25 | EndFunc
26 |
27 |
28 | $TimePeriod = 2000 ;miliseconds
29 | $RedFreq = 1000
30 | $GreenFreq = 750
31 | $BlueFreq = 500
32 | $YellowFreq = 250
33 | $Score = 0
34 | $Count = 0
35 | $Clicked = 0
36 | $Duration = 300;miliseconds
37 | $Last = 0
38 | $Max = 100;game ends after
39 | Dim $Pattern[$Max+1]
40 | For $i = 1 to $Max
41 | $Pattern[$i] = Random(1,4,1)
42 | Next
43 |
44 |
45 | $Simon = GUICreate ("Simon", 450, 350, -1,-1, $WS_POPUP)
46 | GuiRoundCorners($Simon, 0,0,450,350)
47 | $Red = GUICtrlCreateLabel("", 0,0, 225, 175)
48 | GUICtrlSetBkColor(-1, 0xAA0000)
49 | GUICtrlSetOnEvent(-1, "Clicked")
50 | $Green = GUICtrlCreateLabel("", 225,0, 225, 175)
51 | GUICtrlSetBkColor(-1, 0x00AA00)
52 | GUICtrlSetOnEvent(-1, "Clicked")
53 | $Blue = GUICtrlCreateLabel("", 0,175, 225, 175)
54 | GUICtrlSetBkColor(-1, 0x0000AA)
55 | GUICtrlSetOnEvent(-1, "Clicked")
56 | $Yellow = GUICtrlCreateLabel("", 225, 175, 225, 175)
57 | GUICtrlSetBkColor(-1, 0xAAAA00)
58 | GUICtrlSetOnEvent(-1, "Clicked")
59 | GUISetState()
60 |
61 |
62 | While $Count < $Max
63 | ToolTip("My Turn"&@CRLF&$Score, @DesktopWidth/2-5, 250)
64 | $Count +=1
65 | GUICtrlSetOnEvent($Red, "Filler")
66 | GUICtrlSetOnEvent($Green, "Filler")
67 | GUICtrlSetOnEvent($Blue, "Filler")
68 | GUICtrlSetOnEvent($Yellow, "Filler")
69 | For $x = 1 to $Count
70 | Demo($Pattern[$x])
71 | Next
72 | GUICtrlSetOnEvent($Red, "Clicked")
73 | GUICtrlSetOnEvent($Green, "Clicked")
74 | GUICtrlSetOnEvent($Blue, "Clicked")
75 | GUICtrlSetOnEvent($Yellow, "Clicked")
76 | ToolTip("Your Turn"&@CRLF&$Score, @DesktopWidth/2-5, 250)
77 | For $x = 1 to $Count
78 | $Timer = TimerInit()
79 | Do
80 | Sleep(10)
81 | Until TimerDiff($Timer)>=$TimePeriod or $Clicked=1
82 | If TimerDiff($Timer)>$TimePeriod then Lose()
83 | If $Clicked = 1 Then
84 | If $Last = $Pattern[$x] Then
85 | If $x = $Count then $Score+=1
86 | Else
87 | Lose()
88 | EndIf
89 | $Clicked = 0
90 | EndIf
91 | Next
92 | WEnd
93 |
94 | Func Lose()
95 | MsgBox(0,"Lose","You Lose."&@CRLF&"Score: "&$Score)
96 | Exit
97 | EndFunc
98 |
99 | Func Filler()
100 | EndFunc
101 |
102 | Func Clicked()
103 | $Color = @GUI_CtrlID
104 | If $Color = $Red Then $Num = 1
105 | If $Color = $Green Then $Num = 2
106 | If $Color = $Blue Then $Num = 3
107 | If $Color = $Yellow Then $Num = 4
108 | Switch $Num
109 | Case 1
110 | GUICtrlSetBkColor($Red, 0xFF0000)
111 | Beep($RedFreq, $Duration)
112 | GUICtrlSetBkColor($Red, 0xAA0000)
113 | Global $Last =1
114 | Global $Clicked = 1
115 | Return 1
116 | Case 2
117 | GUICtrlSetBkColor($Green,0x00FF00)
118 | Beep($GreenFreq, $Duration)
119 | GUICtrlSetBkColor($Green, 0x00AA00)
120 | Global $Last =2
121 | Global $Clicked = 1
122 | Return 2
123 | Case 3
124 | GUICtrlSetBkColor($Blue, 0x0000FF)
125 | Beep($BlueFreq, $Duration)
126 | GUICtrlSetBkColor($Blue, 0x0000AA)
127 | Global $Last =3
128 | Global $Clicked = 1
129 | Return 3
130 | Case 4
131 | GUICtrlSetBkColor($Yellow, 0xFFFF00)
132 | Beep($YellowFreq,$Duration)
133 | GUICtrlSetBkColor($Yellow, 0xAAAA00)
134 | Global $Last =4
135 | Global $Clicked = 1
136 | Return 4
137 | EndSwitch
138 | EndFunc
139 |
140 | Func Demo($Color)
141 | Sleep(500)
142 | Switch $Color
143 | Case 1
144 | GUICtrlSetBkColor($Red, 0xFF0000)
145 | Beep($RedFreq, $Duration)
146 | GUICtrlSetBkColor($Red, 0xAA0000)
147 | Case 2
148 | GUICtrlSetBkColor($Green,0x00FF00)
149 | Beep($GreenFreq, $Duration)
150 | GUICtrlSetBkColor($Green, 0x00AA00)
151 | Case 3
152 | GUICtrlSetBkColor($Blue, 0x0000FF)
153 | Beep($BlueFreq, $Duration)
154 | GUICtrlSetBkColor($Blue, 0x0000AA)
155 | Case 4
156 | GUICtrlSetBkColor($Yellow, 0xFFFF00)
157 | Beep($YellowFreq,$Duration)
158 | GUICtrlSetBkColor($Yellow, 0xAAAA00)
159 | EndSwitch
160 | EndFunc
161 |
162 |
163 |
164 | ;===============================================================================
165 | ;
166 | ; Function Name: GuiRoundCorners()
167 | ; Description: Rounds the corners of a window
168 | ; Parameter(s): $h_win
169 | ; $i_x1
170 | ; $i_y1
171 | ; $i_x3
172 | ; $i_y3
173 | ; Requirement(s): AutoIt3
174 | ; Return Value(s):
175 | ; Author(s): gaFrost
176 | ;
177 | ;===============================================================================
178 | Func GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3)
179 | Dim $pos, $ret, $ret2
180 | $pos = WinGetPos($h_win)
181 | $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $pos[2], "long", $pos[3], "long", $i_x3, "long", $i_y3)
182 | If $ret[0] Then
183 | $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $ret[0], "int", 1)
184 | If $ret2[0] Then
185 | Return 1
186 | Else
187 | Return 0
188 | EndIf
189 | Else
190 | Return 0
191 | EndIf
192 | EndFunc;==>_GuiRoundCorners
--------------------------------------------------------------------------------
/samples/VanZande2 Obfuscated/VanZandeObfuscated-Protect.au3.tbl:
--------------------------------------------------------------------------------
1 | 4775694F6E4576656E744D6F6465O31O50726F74656374O333933O323030O38O30O30O417269616CO33O3234O4133O3438O3442O4245O3938O3643O3441O4139O3939O3443O3533O3041O3836O4436O3438O3744O3431O3535O3333O3231O3435O3431O3330O3335O38O313736O323530O3136O42726F777365O323633O313735O3539O3138O31O5061746368O333237O313735O3539O3138O31O4053575F53484F57O31O3130O484B45595F4C4F43414C5F4D414348494E455C534F4654574152455C4175746F49742076335C4175746F4974O496E7374616C6C446972O33O6861636B2E657865O31O33O6861636B2E657865O22O5C617574326578655C7570782E65786522202D642022O22O41333438344242453938364334414139O30O3037O39393443353330413836443634383744O38O3135O3431353533333231O3136O3139O3435343133303335O3230O3233O32O22O5C617574326578655C7570782E65786522202D2D626573742022O22O30O50726F74656374O54686520506174636820686173206265656E206170706C696564206F6E3AO4043524C46O4043524C46O3078O31O32O40536372697074446972O50726F74656374O436F6D70696C6564204175746F4974205363726970747320282A2E657865297C416C6C20282A2E2A29O31O2A2E657865O3233O3234O32O30O37O30O32O3078O38O38O313238O38O3231O3235O3136O32303439O38O38O3332O313238O38O3231O3235O3136O32303439O38O30O3078O38O3634O38O313238O38O3231O3235O3136O31O31O31O31O38O31O38O3634O38O3332O313238O38O3231O3235O3136O31O31O32O31O30O3233O30O404755495F4374726C4964O31O30O32O31O404755495F4374726C4964O30O3078O31O
--------------------------------------------------------------------------------
/samples/VanZande2 Obfuscated/VanZandeObfuscated-Protect_original.au3:
--------------------------------------------------------------------------------
1 | ;
2 |
3 | ; ----------------------------------------------------------------------------
4 | ;
5 | ; ----------------------------------------------------------------------------
6 |
7 | Opt("GuiOnEventMode", 1)
8 |
9 | GUICreate("Protect", 393, 200)
10 | GUISetFont(8, 0 , 0, 'Arial')
11 | GUISetOnEvent ( -3, "_Exit")
12 |
13 | ;A3484BBE986C4AA9
14 | ;. H K . . l J .
15 |
16 | ;994C530A86D6487D
17 | ;. L S . . . H }
18 |
19 | ;41553321
20 | ;A U 3 !
21 |
22 | ;45413035
23 | ;E A 0 5
24 |
25 | Global $av_AU3[24] = ['A3', '48', '4B', 'BE', '98', '6C', '4A', 'A9', '99', '4C', '53', '0A', '86', 'D6', '48', '7D', '41', '55', '33', '21', '45', '41', '30', '35']
26 | $av_AU3 = _CI($av_AU3)
27 |
28 | Global $h_executable = GUICtrlCreateInput('', 8, 176, 250, 16)
29 |
30 | GUICtrlCreateButton('Browse', 263, 175, 59, 18)
31 | GUICtrlSetOnEvent(-1, '_BR')
32 |
33 | GUICtrlCreateButton('Patch', 327, 175, 59, 18)
34 | GUICtrlSetOnEvent(-1, '_Patch')
35 |
36 | GUISetState(@SW_SHOW)
37 |
38 | While 1
39 | Sleep(10)
40 | WEnd
41 |
42 | Exit
43 |
44 | Func _Patch()
45 |
46 | ;general
47 | Local $s_installdir = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir')
48 | Local $s_executable = GUICtrlRead($h_executable)
49 | FileCopy($s_executable, StringTrimRight($s_executable, 3) & 'hack.exe', 1)
50 | $s_executable = StringTrimRight($s_executable, 3) & 'hack.exe'
51 |
52 | ;de-upx
53 | RunWait('"' & $s_installdir & '\aut2exe\upx.exe" -d "' & $s_executable & '"')
54 |
55 | ;binary read
56 | Local $v_executable = String(Binary(FileRead($s_executable)))
57 |
58 | ;modify
59 | _Replace($v_executable, 'A3484BBE986C4AA9', _Read(0, 07))
60 | _Replace($v_executable, '994C530A86D6487D', _Read(8, 15))
61 | _Replace($v_executable, '41553321', _Read(16, 19))
62 | _Replace($v_executable, '45413035', _Read(20, 23))
63 |
64 | ;write
65 | Local $h_Open = FileOpen($s_executable, 2)
66 | FileWrite($h_Open, Binary($v_executable))
67 | FileClose($h_Open)
68 |
69 | ;upx
70 | RunWait('"' & $s_installdir & '\aut2exe\upx.exe" --best "' & $s_executable & '"')
71 |
72 | MsgBox(0, 'Protect', 'The Patch has been applied on:' & @CRLF & @CRLF & $s_executable)
73 |
74 | EndFunc
75 |
76 | Func _Replace(byref $v_byref, $v_hex, $v_hax)
77 | $v_byref = StringReplace($v_byref, $v_hex, $v_hax)
78 | EndFunc
79 |
80 | Func _Read($j, $k)
81 | Local $v_tmp = ''
82 | For $i = $j to $k
83 | $v_tmp &= Hex('0x' & GUICtrlRead($av_AU3[$i][1]), 2)
84 | Next
85 | return $v_tmp
86 | EndFunc
87 |
88 | Func _BR()
89 | Local $v_tmp = @ScriptDir
90 | If GUICtrlRead($h_executable) <> '' Then $v_tmp = GUICtrlRead($h_executable)
91 | $v_tmp = FileOpenDialog('Protect', $v_tmp, 'Compiled AutoIt Scripts (*.exe)|All (*.*)', 1, '*.exe')
92 | If Not @error Then GUICtrlSetData($h_executable, $v_tmp)
93 | EndFunc
94 |
95 | Func _CI($ai_code)
96 |
97 | Local $i_max = 23
98 | Local $v_return[24][2]
99 |
100 | for $i = 0 to 7
101 | For $j = 0 to 2
102 | GUICtrlCreateInput(Chr('0x' & $ai_code[$i+8*$j]), 8+128*$j, 8+21*$i, 25, 16, 2049)
103 | GUICtrlCreateInput($ai_code[$i+8*$j], 8+32+128*$j, 8+21*$i, 25, 16, 2049)
104 |
105 | $v_return[$i+8*$j][0] = GUICtrlCreateInput(Chr('0x' & $ai_code[$i+8*$j]), 64+8+128*$j, 8+21*$i, 25, 16, 1)
106 | GUICtrlSetLimit(-1, 1)
107 | GUICtrlSetOnEvent(-1, "_Change")
108 | $v_return[$i+8*$j][1] = GUICtrlCreateInput($ai_code[$i+8*$j], 64+8+32+128*$j, 8+21*$i, 25, 16, 1)
109 | GUICtrlSetLimit(-1, 2)
110 | GUICtrlSetOnEvent(-1, "_Change")
111 |
112 | Next
113 | Next
114 |
115 | return $v_return
116 | EndFunc
117 |
118 | Func _Change()
119 | For $i = 0 To 23
120 | If $av_AU3[$i][0] = @GUI_CtrlId Then Return GUICtrlSetData($av_AU3[$i][1], Hex(Asc(GUICtrlRead($av_AU3[$i][0])), 2))
121 | If $av_AU3[$i][1] = @GUI_CtrlId Then Return GUICtrlSetData($av_AU3[$i][0], Chr('0x' & GUICtrlRead($av_AU3[$i][1])))
122 | Next
123 | EndFunc
124 |
125 | Func _Exit()
126 | Exit
127 | EndFunc
128 |
129 | ; ----------------------------------------------------------------------------
130 | ;
131 | ; ----------------------------------------------------------------------------
132 |
133 |
--------------------------------------------------------------------------------
/samples/ahk/ahk_modified.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/ahk/ahk_modified.exe
--------------------------------------------------------------------------------
/samples/w0uter-protected script.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PonyPC/myaut_contrib/7a080d910829d0daeb9e047ec4428472021b3acf/samples/w0uter-protected script.exe
--------------------------------------------------------------------------------
/src_AutToExe_VB6.vbp:
--------------------------------------------------------------------------------
1 | Type=Exe
2 | Reference=*\G{3F4DACA7-160D-11D2-A8E9-00104B365C9F}#5.5#0#C:\WINDOWS\system32\vbscript.dll\3#Microsoft VBScript Regular Expressions 5.5
3 | Module=ApiHelper; !SourceCode\src\lib\ApiHelper.bas
4 | Module=Helper; !SourceCode\src\lib\Helper.bas
5 | Class=ClsFilename; !SourceCode\src\lib\ClsFilename.cls
6 | Class=FileStream; !SourceCode\src\lib\FileStream.cls
7 | Class=StringReader; !SourceCode\src\lib\StringReader.cls
8 | Module=GlobalDefs; !SourceCode\src\GlobalDefs.bas
9 | Module=mod_Replace; !SourceCode\src\lib\Replace.bas
10 | Class=ClsMD5; !SourceCode\src\ForAu3PasswordCheck\clsMD5.cls
11 | Module=modSeperateIncludes; !SourceCode\src\SeperateIncludes.bas
12 | Module=ModCRC32; !SourceCode\src\ModCRC32.bas
13 | Module=DeTokeniser; !SourceCode\src\DeTokeniser.bas
14 | Module=DeCompiler; !SourceCode\src\Decompile.bas
15 | Class=CCommandlineOptions; !SourceCode\SRC\lib\Commandline.cls
16 | Module=UTF8; !SourceCode\SRC\lib\UTF8.bas
17 | Module=Pe_info_bas; !SourceCode\SRC\lib\Pe_info.bas
18 | Form=!SourceCode\SRC\frmSearchResults.frm
19 | Form=!SourceCode\SRC\frmMain.frm
20 | Module=ErrorHelper; !SourceCode\SRC\lib\ErrorHelper.bas
21 | Form=!SourceCode\SRC\FrmAHK_KeyFinder.frm
22 | Form=!SourceCode\SRC\Frm_SrcEdit.frm
23 | Class=Console; !SourceCode\SRC\lib\clsConsole.cls
24 | Form=!SourceCode\SRC\Frm_Options.frm
25 | Module=ExtractAHKScript; !SourceCode\SRC\ExtractAHKScript.bas
26 | Module=GetCamo; !SourceCode\SRC\modCamoGet.bas
27 | Class=CBinaryReader; !SourceCode\SRC\CBinaryReader.cls
28 | Module=Deobfuscator; !SourceCode\SRC\Deobfuscator.bas
29 | Class=clsStrCat; !SourceCode\SRC\clsStrCat.cls
30 | Class=CFileSystem3; !SourceCode\SRC\lib\CFileSystem3.cls
31 | IconForm="FrmMain"
32 | Startup="FrmMain"
33 | HelpFile=""
34 | Title="AutToExe"
35 | ExeName32="myAutToExe.exe"
36 | Command32=""C:\Documents and Settings\david\Desktop\test""
37 | Name="myAutToExe"
38 | HelpContextID="0"
39 | CompatibleMode="0"
40 | MajorVer=2
41 | MinorVer=12
42 | RevisionVer=268
43 | AutoIncrementVer=1
44 | ServerSupportFiles=0
45 | VersionComments="http://board.deioncube.in/showthread.php?tid=29"
46 | VersionCompanyName="CW2K@gmx.de"
47 | VersionFileDescription="Decompiles 'compiled' AutoIT Exe files."
48 | VersionProductName="myAutToExe - [mATE]"
49 | CondComp="DoUserPassWordCheck = 0"
50 | CompilationType=-1
51 | OptimizationType=2
52 | FavorPentiumPro(tm)=0
53 | CodeViewDebugInfo=-1
54 | NoAliasing=-1
55 | BoundsCheck=-1
56 | OverflowCheck=-1
57 | FlPointCheck=-1
58 | FDIVCheck=-1
59 | UnroundedFP=-1
60 | StartMode=0
61 | Unattended=0
62 | Retained=0
63 | ThreadPerObject=-1
64 | MaxNumberOfThreads=1
65 | DebugStartupOption=0
66 |
67 | [MS Transaction Server]
68 | AutoRefresh=1
69 |
70 | [fastBuild]
71 | fullPath=%ap%\myAutToExe.exe
72 |
--------------------------------------------------------------------------------
/src_AutToExe_VB6.vbw:
--------------------------------------------------------------------------------
1 | ApiHelper = 225, 110, 1159, 831,
2 | Helper = 121, 28, 1184, 885,
3 | ClsFilename = 198, 198, 993, 867,
4 | FileStream = 22, 22, 1090, 794,
5 | StringReader = -79, 123, 1178, 610, C
6 | GlobalDefs = 0, 0, 1035, 744,
7 | mod_Replace = 44, 44, 779, 713, C
8 | ClsMD5 = 220, 220, 1015, 889,
9 | modSeperateIncludes = 286, 286, 1021, 955,
10 | ModCRC32 = 132, 132, 975, 801, C
11 | DeTokeniser = 217, 132, 1136, 924,
12 | DeCompiler = 131, 40, 1202, 932,
13 | CCommandlineOptions = 264, 264, 1059, 933,
14 | UTF8 = 308, 308, 1043, 977,
15 | Pe_info_bas = 88, 88, 931, 757,
16 | frmSearchResults = 0, 0, 911, 661, , 0, 0, 795, 669, C
17 | FrmMain = 46, 112, 1103, 899, , 201, 10, 1075, 836, C
18 | ErrorHelper = 242, 242, 977, 911,
19 | FrmAHK_KeyFinder = 66, 66, 861, 735, , 44, 44, 839, 713, C
20 | Frm_SrcEdit = 154, 154, 949, 823, , 132, 132, 927, 801, C
21 | Console = 286, 286, 1081, 955,
22 | Frm_Options = 141, 63, 1014, 732, C, 176, 176, 971, 845, C
23 | ExtractAHKScript = 198, 198, 933, 867,
24 | GetCamo = 44, 44, 955, 705,
25 | CBinaryReader = 154, 154, 1061, 594,
26 | Deobfuscator = 95, 26, 1151, 695,
27 | clsStrCat = 176, 176, 1070, 672,
28 | CFileSystem3 = 0, 0, 0, 0, C
29 |
--------------------------------------------------------------------------------