├── .gitattributes
├── .gitignore
├── 16x16.ico
├── Armadillo Key Tool Manual.pdf
├── Armadillo_KeyTool.cbp
├── Armadillo_KeyTool.sln
├── Armadillo_KeyTool.vcxproj
├── Armadillo_KeyTool.vcxproj.filters
├── Armadillo_KeyTool.vcxproj.user
├── BeaEngine
├── BeaEngine.h
├── BeaEngine.lib
├── basic_types.h
├── export.h
├── libBeaEngine.a
└── macros.h
├── Project_Management
└── TodoList.txt
├── README
├── SoftwarePassport_48_32_16.ico
├── TitanEngine
├── TitanEngine.h
├── TitanEngine_x86.a
└── TitanEngine_x86.lib
├── bin
├── BeaEngine.dll
├── TitanEngine.dll
├── armabrut_opencl.dll
├── armabrut_opencl.exe
├── brute_dlp.dll
├── brute_opencl.cl
└── brute_sym.dll
├── brute_sym
├── brute.cpp
├── brute.h
├── brute_sym.cbp
├── crc32.cpp
├── crc32.h
├── dll.cpp
├── dll.h
├── global.h
├── md5.cpp
└── md5.h
├── bugs.txt
├── functions
├── CertTool_brute.cpp
├── CertTool_brute.h
├── CertTool_debugger.cpp
├── CertTool_debugger.h
├── CertTool_decrypt.cpp
├── CertTool_decrypt.h
├── CertTool_dialog.cpp
├── CertTool_dialog.h
├── CertTool_global.cpp
├── CertTool_global.h
├── CertTool_parser.cpp
├── CertTool_parser.h
├── EVLog_debugger.cpp
├── EVLog_debugger.h
├── EVLog_global.cpp
├── EVLog_global.h
├── EVLog_maindlg.cpp
├── EVLog_maindlg.h
├── InlineHelper_codegen.cpp
├── InlineHelper_codegen.h
├── InlineHelper_debugger.cpp
├── InlineHelper_debugger.h
├── InlineHelper_decrypt.cpp
├── InlineHelper_decrypt.h
├── InlineHelper_dialog.cpp
├── InlineHelper_dialog.h
├── InlineHelper_global.cpp
├── InlineHelper_global.h
├── InlineHelper_plugins.cpp
├── InlineHelper_plugins.h
├── LicenceRemoval_debugger.cpp
├── LicenceRemoval_debugger.h
├── Misc_checksum.cpp
├── Misc_checksum.h
├── Misc_currentsym.cpp
├── Misc_currentsym.h
├── Misc_dialog.cpp
├── Misc_dialog.h
├── Misc_global.cpp
├── Misc_global.h
├── Misc_projectid.cpp
├── Misc_projectid.h
├── Misc_sectiondeleter.cpp
├── Misc_sectiondeleter.h
├── Misc_verifysym.cpp
├── Misc_verifysym.h
├── VersionFind_decode.cpp
├── VersionFind_decode.h
├── VersionFind_dialog.cpp
├── VersionFind_dialog.h
├── VersionFind_extraoptions.cpp
├── VersionFind_extraoptions.h
├── VersionFind_global.cpp
├── VersionFind_global.h
├── VersionFind_rawoptions.cpp
├── VersionFind_rawoptions.h
├── VersionFind_version.cpp
├── VersionFind_version.h
├── _global.cpp
├── _global.h
├── about.cpp
├── about.h
├── analysis.cpp
├── analysis.h
├── encdec.cpp
├── encdec.h
├── help_dialog.cpp
├── help_dialog.h
├── keygen
│ ├── keygen_bigint.cpp
│ ├── keygen_bigint.h
│ ├── keygen_blowfish.cpp
│ ├── keygen_blowfish.h
│ ├── keygen_crc32.cpp
│ ├── keygen_crc32.h
│ ├── keygen_ecc.cpp
│ ├── keygen_ecc.h
│ ├── keygen_info.cpp
│ ├── keygen_info.h
│ ├── keygen_main.cpp
│ ├── keygen_main.h
│ ├── keygen_md5.cpp
│ ├── keygen_md5.h
│ ├── keygen_misc.cpp
│ ├── keygen_misc.h
│ ├── keygen_random.cpp
│ └── keygen_random.h
├── keygenerate.cpp
└── keygenerate.h
├── main.cpp
├── main.h
├── manifest.xml
├── new_inline_templ.asm
├── plugins
├── Arma_InlineHelper_Plugin_ECDSA_Full_Replace
│ ├── Arma_InlineHelper_Plugin_ECDSA_Replace.cbp
│ ├── ECDSA_Full_Replace.vcxproj
│ ├── ECDSA_Full_Replace.vcxproj.filters
│ ├── ECDSA_Full_Replace.vcxproj.user
│ └── src
│ │ ├── bigint.h
│ │ ├── ecc.h
│ │ ├── format.h
│ │ ├── keygen_bigint.h
│ │ ├── main.cpp
│ │ ├── main.h
│ │ ├── md5.h
│ │ ├── random.h
│ │ ├── resource.h
│ │ └── resource.rc
├── Arma_InlineHelper_Plugin_ECDSA_Replace
│ ├── Arma_InlineHelper_Plugin_ECDSA_Replace.cbp
│ ├── ECDSA_Replace.vcxproj
│ ├── ECDSA_Replace.vcxproj.filters
│ ├── ECDSA_Replace.vcxproj.user
│ └── src
│ │ ├── bigint.h
│ │ ├── ecc.h
│ │ ├── format.h
│ │ ├── main.cpp
│ │ ├── main.h
│ │ ├── md5.h
│ │ ├── random.h
│ │ ├── resource.h
│ │ └── resource.rc
├── Arma_InlineHelper_Plugin_ECDSA_Verify
│ ├── Arma_InlineHelper_Plugin_ECDSA_Verify.cbp
│ ├── ECDSA_Verify.vcxproj
│ ├── ECDSA_Verify.vcxproj.filters
│ ├── ECDSA_Verify.vcxproj.user
│ ├── main.cpp
│ ├── main.h
│ ├── manifest.xml
│ ├── resource.h
│ └── resource.rc
├── Arma_InlineHelper_Plugin_EnableInfo
│ ├── Arma_InlineHelper_Plugin_EnableInfo.cbp
│ ├── EnableInfo.vcxproj
│ ├── EnableInfo.vcxproj.filters
│ ├── EnableInfo.vcxproj.user
│ ├── main.cpp
│ ├── main.h
│ ├── manifest.xml
│ ├── resource.h
│ └── resource.rc
├── Arma_InlineHelper_Plugin_EnableRegister
│ ├── Arma_InlineHelper_Plugin_EnableRegister.cbp
│ ├── Arma_InlineHelper_Plugin_EnableRegister_build_log.html
│ ├── EnableRegister.vcxproj
│ ├── EnableRegister.vcxproj.filters
│ ├── EnableRegister.vcxproj.user
│ ├── main.cpp
│ ├── main.h
│ ├── manifest.xml
│ ├── resource.h
│ └── resource.rc
├── Arma_InlineHelper_Plugin_GetEnvA
│ ├── Arma_InlineHelper_Plugin_GetEnvA.cbp
│ ├── Arma_InlineHelper_Plugin_GetEnvA.cscope_file_list
│ ├── GetEnvA.vcxproj
│ ├── GetEnvA.vcxproj.filters
│ ├── GetEnvA.vcxproj.user
│ ├── data.txt
│ └── src
│ │ ├── main.cpp
│ │ ├── main.h
│ │ ├── manifest.xml
│ │ ├── resource.h
│ │ └── resource.rc
├── Arma_InlineHelper_Plugin_GetProcAdress
│ ├── Arma_InlineHelper_Plugin_GetProcAdress.cbp
│ ├── GetProcAddress.vcxproj
│ ├── GetProcAddress.vcxproj.filters
│ ├── GetProcAddress.vcxproj.user
│ ├── main.cpp
│ ├── main.h
│ ├── manifest.xml
│ ├── resource.h
│ └── resource.rc
├── Arma_InlineHelper_Plugin_HWID
│ ├── Arma_InlineHelper_Plugin_HWID.cbp
│ ├── HWID.vcxproj
│ ├── HWID.vcxproj.filters
│ ├── HWID.vcxproj.user
│ ├── Readme.txt
│ ├── main.cpp
│ ├── main.h
│ ├── manifest.xml
│ ├── patterns.txt
│ ├── resource.h
│ └── resource.rc
├── Arma_InlineHelper_Plugin_NGEN_Enable
│ ├── Arma_InlineHelper_Plugin_NGEN_Enable.cbp
│ ├── NGEN_Enable.vcxproj
│ ├── NGEN_Enable.vcxproj.filters
│ ├── NGEN_Enable.vcxproj.user
│ ├── main.cpp
│ ├── main.h
│ ├── manifest.xml
│ ├── resource.h
│ └── resource.rc
└── Arma_InlineHelper_Plugin_Tester
│ ├── Arma_InlineHelper_Plugin_Tester.cbp
│ ├── main.cpp
│ ├── manifest.xml
│ └── resource.rc
├── realign
├── realign.dll
├── realign.h
├── realign.lib
├── realign_static.lib
└── realign_supp.h
├── release.bat
├── resource.h
├── resource.rc
├── source_nav.proj
├── tabs.cpp
├── tabs.h
└── template.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | plugins/*/bin
2 | plugins/*/obj
3 | brute_sym/bin
4 | brute_sym/obj
5 | .f
6 | CppCheckResults.xml
7 | SNDB4/
8 |
9 | # Ignore Object files
10 | /obj
11 | Armadillo_KeyTool.cscope_file_list
12 | bin/plugins/
13 | bin/exception_*.log
14 | *.layout
15 | *.depend
16 | Public/
17 | *.log
18 | *.bmarks
19 | bin/cudart*.dll
20 | bin/armabrut_cuda.exe
21 | bin/*.bin
22 | bin/*.txt
23 | bin/Armadillo_KeyTool.exe
24 | bin/brute_sym.dll
25 | armadillo_analysis_custombuild_download.txt
26 | Armadillo_KeyTool.bmarks
27 | bin/brute_sym_prvt.dll
28 | *.ini
29 | *.suo
30 | *sdf
31 | *.opensdf
32 | ipch/
33 | Win32/
34 | *.pdb
35 | *.mem
36 | *.rar
37 | .vs/
38 | Release/
39 | Debug/
40 | Win32/
41 | x64/
42 |
--------------------------------------------------------------------------------
/16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/16x16.ico
--------------------------------------------------------------------------------
/Armadillo Key Tool Manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/Armadillo Key Tool Manual.pdf
--------------------------------------------------------------------------------
/Armadillo_KeyTool.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Armadillo_KeyTool", "Armadillo_KeyTool.vcxproj", "{3A22175E-6B72-FDCC-1603-C4A2163C7900}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ECDSA_Replace_Old", "plugins\Arma_InlineHelper_Plugin_ECDSA_Replace\ECDSA_Replace.vcxproj", "{7A8400CF-5473-461A-A880-EE1DD0F5EFD0}"
7 | EndProject
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ECDSA_Replace", "plugins\Arma_InlineHelper_Plugin_ECDSA_Full_Replace\ECDSA_Full_Replace.vcxproj", "{883B09E7-8DBB-4FEE-B92B-487CFC6A95A9}"
9 | EndProject
10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetEnvA", "plugins\Arma_InlineHelper_Plugin_GetEnvA\GetEnvA.vcxproj", "{14C94B6F-CD87-4246-9E11-13DA93EB2CA7}"
11 | EndProject
12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ECDSA_Verify", "plugins\Arma_InlineHelper_Plugin_ECDSA_Verify\ECDSA_Verify.vcxproj", "{85D8F26C-67F9-4B9C-9779-137ED5844F26}"
13 | EndProject
14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EnableInfo", "plugins\Arma_InlineHelper_Plugin_EnableInfo\EnableInfo.vcxproj", "{551E5EBE-0580-4372-BF74-F8F27E164789}"
15 | EndProject
16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EnableRegister", "plugins\Arma_InlineHelper_Plugin_EnableRegister\EnableRegister.vcxproj", "{E3A208EC-FDEF-4C4E-94B8-992AAE8705B5}"
17 | EndProject
18 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetProcAddress", "plugins\Arma_InlineHelper_Plugin_GetProcAdress\GetProcAddress.vcxproj", "{60937C81-EE51-435E-ADC1-B9CA2254FFCC}"
19 | EndProject
20 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HWID", "plugins\Arma_InlineHelper_Plugin_HWID\HWID.vcxproj", "{06F88E38-AEAA-4FA0-8E67-D1AF9293C33C}"
21 | EndProject
22 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NGEN_Enable", "plugins\Arma_InlineHelper_Plugin_NGEN_Enable\NGEN_Enable.vcxproj", "{161BBE36-9CE4-4082-9A09-9EFF67437A6F}"
23 | EndProject
24 | Global
25 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
26 | Release|Win32 = Release|Win32
27 | EndGlobalSection
28 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
29 | {3A22175E-6B72-FDCC-1603-C4A2163C7900}.Release|Win32.ActiveCfg = Release|Win32
30 | {3A22175E-6B72-FDCC-1603-C4A2163C7900}.Release|Win32.Build.0 = Release|Win32
31 | {7A8400CF-5473-461A-A880-EE1DD0F5EFD0}.Release|Win32.ActiveCfg = Release|Win32
32 | {7A8400CF-5473-461A-A880-EE1DD0F5EFD0}.Release|Win32.Build.0 = Release|Win32
33 | {883B09E7-8DBB-4FEE-B92B-487CFC6A95A9}.Release|Win32.ActiveCfg = Release|Win32
34 | {883B09E7-8DBB-4FEE-B92B-487CFC6A95A9}.Release|Win32.Build.0 = Release|Win32
35 | {14C94B6F-CD87-4246-9E11-13DA93EB2CA7}.Release|Win32.ActiveCfg = Release|Win32
36 | {14C94B6F-CD87-4246-9E11-13DA93EB2CA7}.Release|Win32.Build.0 = Release|Win32
37 | {85D8F26C-67F9-4B9C-9779-137ED5844F26}.Release|Win32.ActiveCfg = Release|Win32
38 | {85D8F26C-67F9-4B9C-9779-137ED5844F26}.Release|Win32.Build.0 = Release|Win32
39 | {551E5EBE-0580-4372-BF74-F8F27E164789}.Release|Win32.ActiveCfg = Release|Win32
40 | {551E5EBE-0580-4372-BF74-F8F27E164789}.Release|Win32.Build.0 = Release|Win32
41 | {E3A208EC-FDEF-4C4E-94B8-992AAE8705B5}.Release|Win32.ActiveCfg = Release|Win32
42 | {E3A208EC-FDEF-4C4E-94B8-992AAE8705B5}.Release|Win32.Build.0 = Release|Win32
43 | {60937C81-EE51-435E-ADC1-B9CA2254FFCC}.Release|Win32.ActiveCfg = Release|Win32
44 | {60937C81-EE51-435E-ADC1-B9CA2254FFCC}.Release|Win32.Build.0 = Release|Win32
45 | {06F88E38-AEAA-4FA0-8E67-D1AF9293C33C}.Release|Win32.ActiveCfg = Release|Win32
46 | {06F88E38-AEAA-4FA0-8E67-D1AF9293C33C}.Release|Win32.Build.0 = Release|Win32
47 | {161BBE36-9CE4-4082-9A09-9EFF67437A6F}.Release|Win32.ActiveCfg = Release|Win32
48 | {161BBE36-9CE4-4082-9A09-9EFF67437A6F}.Release|Win32.Build.0 = Release|Win32
49 | EndGlobalSection
50 | GlobalSection(SolutionProperties) = preSolution
51 | HideSolutionNode = FALSE
52 | EndGlobalSection
53 | EndGlobal
54 |
--------------------------------------------------------------------------------
/Armadillo_KeyTool.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/BeaEngine/BeaEngine.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/BeaEngine/BeaEngine.lib
--------------------------------------------------------------------------------
/BeaEngine/libBeaEngine.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/BeaEngine/libBeaEngine.a
--------------------------------------------------------------------------------
/BeaEngine/macros.h:
--------------------------------------------------------------------------------
1 | #ifndef __BEAENGINE_MACROS_H__
2 | #define __BEAENGINE_MACROS_H__
3 | /*
4 | ============================================================================
5 | Compiler Silencing macros
6 |
7 | Some compilers complain about parameters that are not used. This macro
8 | should keep them quiet.
9 | ============================================================================
10 | */
11 |
12 | # if defined (__GNUC__) && ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)))
13 | # define BEA_UNUSED_ARG(a) (void) (a)
14 | #elif defined (ghs) || defined (__GNUC__) || defined (__hpux) || defined (__sgi) || defined (__DECCXX) || defined (__rational__) || defined (__USLC__) || defined (BEA__RM544) || defined (__DCC__) || defined (__PGI) || defined (__TANDEM) || defined(__BORLANDC__)
15 | /*
16 | Some compilers complain about "statement with no effect" with (a).
17 | This eliminates the warnings, and no code is generated for the null
18 | conditional statement. Note, that may only be true if -O is enabled,
19 | such as with GreenHills (ghs) 1.8.8.
20 | */
21 |
22 | # define BEA_UNUSED_ARG(a) do {/* null */} while (&a == 0)
23 | #elif defined (__DMC__)
24 | #if defined(__cplusplus)
25 | #define BEA_UNUSED_ID(identifier)
26 | template
27 | inline void BEA_UNUSED_ARG(const T & BEA_UNUSED_ID(t)) { }
28 | #else
29 | #define BEA_UNUSED_ARG(a)
30 | #endif
31 | #else /* ghs || __GNUC__ || ..... */
32 | # define BEA_UNUSED_ARG(a) (a)
33 | #endif /* ghs || __GNUC__ || ..... */
34 |
35 | #if defined (_MSC_VER) || defined(__sgi) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (BEA_RM544) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || defined (__TANDEM) || (defined (__HP_aCC) && (__HP_aCC >= 60500))
36 | # define BEA_NOTREACHED(a)
37 | #else /* __sgi || ghs || ..... */
38 | # define BEA_NOTREACHED(a) a
39 | #endif /* __sgi || ghs || ..... */
40 |
41 | #endif /* __BEAENGINE_MACROS_H__ */
42 |
--------------------------------------------------------------------------------
/Project_Management/TodoList.txt:
--------------------------------------------------------------------------------
1 | TODO List
2 | - Import .akt files for certs and keygen
3 | - Interaction with the Certs tab (copy sym, copy pub etc) -done!-
4 | - Inline: relocations support (for dlls) or relocatable inline code (both can be done easily) -done!-
5 | - Decrypt text1 (For inline patching)
6 | - Automatic assembly using multimate assembler (can be done becasue I have a private lib from the creator of multimate assembler)
7 | - Auto add 'GetProcAddress' for OutputDebugStringA (when needed, v5)
8 | - Brute forced sym keys database (Save all brute forced keys in real time)
9 | - License removal
10 | - Security.dll extracting (maybe also replace, probably not)
11 | - Watermark removing (for custom build)
12 | - Random number brute/verification
13 | - Nanomites
14 | - Code splicing (Redirection and deobfuscation)
15 | - Check miscellaneous modules compatibility with new/old versions
16 | - selective brute forcing (cert number, sym?, elgamal?)
17 | - arma_cert_bin_info
18 | - better plugin interface
19 | - brute force all certificate at once, to save time
20 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | THIS IS INTENDED FOR EDUCATIONAL PURPOSES ONLY!
--------------------------------------------------------------------------------
/SoftwarePassport_48_32_16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/SoftwarePassport_48_32_16.ico
--------------------------------------------------------------------------------
/TitanEngine/TitanEngine_x86.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/TitanEngine/TitanEngine_x86.a
--------------------------------------------------------------------------------
/TitanEngine/TitanEngine_x86.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/TitanEngine/TitanEngine_x86.lib
--------------------------------------------------------------------------------
/bin/BeaEngine.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/bin/BeaEngine.dll
--------------------------------------------------------------------------------
/bin/TitanEngine.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/bin/TitanEngine.dll
--------------------------------------------------------------------------------
/bin/armabrut_opencl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/bin/armabrut_opencl.dll
--------------------------------------------------------------------------------
/bin/armabrut_opencl.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/bin/armabrut_opencl.exe
--------------------------------------------------------------------------------
/bin/brute_dlp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/bin/brute_dlp.dll
--------------------------------------------------------------------------------
/bin/brute_sym.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/bin/brute_sym.dll
--------------------------------------------------------------------------------
/brute_sym/brute.h:
--------------------------------------------------------------------------------
1 | #ifndef __BRUTE_H__
2 | #define __BRUTE_H__
3 |
4 | #include "global.h"
5 |
6 | void brute(int alg, hash_list* list, unsigned int from, unsigned int to, unsigned int* param, time_t* start, int* stop, CALLBACKS* callbacks);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/brute_sym/brute_sym.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/brute_sym/crc32.cpp:
--------------------------------------------------------------------------------
1 | #include "crc32.h"
2 | #include
3 |
4 | const CRC32 NewCRC32 = 0xFFFFFFFF;
5 |
6 | static unsigned long reflect(unsigned long source, int b)
7 | {
8 | unsigned long sourcemask = 0x01, targetmask = (0x01 << (b - 1)), target = 0;
9 | while(targetmask)
10 | {
11 | if(source & sourcemask)
12 | target |= targetmask;
13 | sourcemask <<= 1;
14 | targetmask >>= 1;
15 | }
16 | return target;
17 | }
18 |
19 | static CRC32* table32 = 0;
20 |
21 | #define calc(crc, table, c) { crc=table[alphamask&(*c^crc)]^(crc>>8); }
22 |
23 | CRC32 crc32(const char* s, unsigned long length, CRC32 crc)
24 | {
25 | const int BITS = 32;
26 | const int alphabits = 8;
27 | const int alphabet = (1L << alphabits);
28 | const int alphamask = (alphabet - 1);
29 | const CRC32 poly32 = 0x04C11DB7;
30 | const CRC32 topbit = (CRC32)(1L << (BITS - 1));
31 | const char* c, *e;
32 | int x, b;
33 | CRC32 r;
34 |
35 | if(!table32)
36 | {
37 | table32 = (CRC32*)malloc(alphabet * sizeof(CRC32));
38 | for(x = 0; x < alphabet; ++x)
39 | {
40 | r = reflect(x, alphabits) << (BITS - alphabits);
41 | for(b = 0; b < alphabits; ++b)
42 | {
43 | if(r & topbit)
44 | r = (r << 1)^poly32;
45 | else
46 | r <<= 1;
47 | }
48 | table32[x] = (CRC32)(reflect(r, BITS));
49 | }
50 | }
51 |
52 | for(c = s, e = s + length; c < e; ++c)
53 | calc(crc, table32, c);
54 | return crc;
55 | }
56 |
--------------------------------------------------------------------------------
/brute_sym/crc32.h:
--------------------------------------------------------------------------------
1 | #ifndef __CRC32_H__
2 | #define __CRC32_H__
3 |
4 | typedef unsigned long CRC32;
5 | CRC32 crc32(const char* s, unsigned long length, CRC32 crc);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/brute_sym/dll.cpp:
--------------------------------------------------------------------------------
1 | #ifdef BUILD_DLL
2 |
3 | #include "dll.h"
4 | #include "brute.h"
5 | #include
6 |
7 | CALLBACKS callbacks;
8 |
9 | int stop = 0;
10 |
11 | void DLL_EXPORT BruteSettings(HWND parent)
12 | {
13 | MessageBoxA(parent, "No settings to tweak :)", "Example Brute DLL", MB_ICONINFORMATION);
14 | }
15 |
16 | void DLL_EXPORT BruteStop()
17 | {
18 | stop = 1;
19 | }
20 |
21 | void DLL_EXPORT SetCallbacks(PRINT_FOUND cb1, PRINT_PROGRESS cb2, PRINT_ERROR cb3)
22 | {
23 | callbacks.print_found = cb1;
24 | callbacks.print_progress = cb2;
25 | callbacks.print_error = cb3;
26 | }
27 |
28 | void DLL_EXPORT BruteStart(int alg, hash_list* list, unsigned long from, unsigned long to, unsigned long* param)
29 | {
30 | time_t start;
31 | start = time(NULL);
32 | unsigned long to_ = to;
33 | if(alg == 6 or alg == 7 or alg == 8)
34 | to_ = 100000000u;
35 |
36 | std::sort(&list->hash[0], &list->hash[list->count]);
37 | brute(alg, list, from, to_, (unsigned int*)param, &start, &stop, &callbacks);
38 | stop = 0;
39 | }
40 |
41 | extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
42 | {
43 | return TRUE;
44 | }
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/brute_sym/dll.h:
--------------------------------------------------------------------------------
1 | #ifndef __DLL_H__
2 | #define __DLL_H__
3 |
4 | #include
5 | #include "global.h"
6 |
7 | #define DLL_EXPORT __declspec(dllexport)
8 |
9 | #ifdef __cplusplus
10 | extern "C"
11 | {
12 | #endif
13 |
14 | void DLL_EXPORT BruteSettings(HWND parent);
15 | void DLL_EXPORT BruteStop();
16 | void DLL_EXPORT BruteStart(int alg, hash_list* list, unsigned long from, unsigned long to, unsigned long* param);
17 | void DLL_EXPORT SetCallbacks(PRINT_FOUND cb1, PRINT_PROGRESS cb2, PRINT_ERROR cb3);
18 |
19 | #ifdef __cplusplus
20 | }
21 | #endif
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/brute_sym/global.h:
--------------------------------------------------------------------------------
1 | #ifndef __ARMABRUT_H_
2 | #define __ARMABRUT_H_
3 |
4 | #include
5 |
6 | //Callbacks
7 | typedef void (*PRINT_FOUND)(unsigned long checksum, unsigned long key);
8 | typedef void (*PRINT_PROGRESS)(double checked, double all, time_t* start);
9 | typedef void (*PRINT_ERROR)(const char* error_msg);
10 |
11 | struct CALLBACKS
12 | {
13 | PRINT_FOUND print_found;
14 | PRINT_PROGRESS print_progress;
15 | PRINT_ERROR print_error;
16 | };
17 |
18 | typedef struct _hash_list
19 | {
20 | int count;
21 | unsigned long hash[32];
22 | } hash_list;
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/brute_sym/md5.cpp:
--------------------------------------------------------------------------------
1 | #include "md5.h"
2 |
3 | #define RotateLeft(x,n) (((x) << n) | ((x) >> (32-n)))
4 | #define FF(A,B,C,D,X,S,T) (RotateLeft(((B & C)|(~B & D))+A+X+T, S)+B)
5 | #define GG(A,B,C,D,X,S,T) (RotateLeft(((B & D)|(C & ~D))+A+X+T, S)+B)
6 | #define HH(A,B,C,D,X,S,T) (RotateLeft((B^C^D)+A+X+T, S)+B)
7 | #define II(A,B,C,D,X,S,T) (RotateLeft((C^ (B | ~D))+A+X+T, S)+B)
8 |
9 | unsigned int TransformBlock(unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x14)
10 | {
11 | unsigned int a = 0x67452301, b = 0xefcdab89, c = 0x98badcfe, d = 0x10325476;
12 | // Round 1
13 | a = FF(a, b, c, d, x0, 7, 0xd76aa478);
14 | d = FF(d, a, b, c, x1, 12, 0xe8c7b756);
15 | c = FF(c, d, a, b, x2, 17, 0x242070db);
16 | b = FF(b, c, d, a, 0, 22, 0xc1bdceee);
17 | a = FF(a, b, c, d, 0, 7, 0xf57c0faf);
18 | d = FF(d, a, b, c, 0, 12, 0x4787c62a);
19 | c = FF(c, d, a, b, 0, 17, 0xa8304613);
20 | b = FF(b, c, d, a, 0, 22, 0xfd469501);
21 | a = FF(a, b, c, d, 0, 7, 0x698098d8);
22 | d = FF(d, a, b, c, 0, 12, 0x8b44f7af);
23 | c = FF(c, d, a, b, 0, 17, 0xffff5bb1);
24 | b = FF(b, c, d, a, 0, 22, 0x895cd7be);
25 | a = FF(a, b, c, d, 0, 7, 0x6b901122);
26 | d = FF(d, a, b, c, 0, 12, 0xfd987193);
27 | c = FF(c, d, a, b, x14, 17, 0xa679438e);
28 | b = FF(b, c, d, a, 0, 22, 0x49b40821);
29 | // Round 2
30 | a = GG(a, b, c, d, x1, 5, 0xf61e2562);
31 | d = GG(d, a, b, c, 0, 9, 0xc040b340);
32 | c = GG(c, d, a, b, 0, 14, 0x265e5a51);
33 | b = GG(b, c, d, a, x0, 20, 0xe9b6c7aa);
34 | a = GG(a, b, c, d, 0, 5, 0xd62f105d);
35 | d = GG(d, a, b, c, 0, 9, 0x02441453);
36 | c = GG(c, d, a, b, 0, 14, 0xd8a1e681);
37 | b = GG(b, c, d, a, 0, 20, 0xe7d3fbc8);
38 | a = GG(a, b, c, d, 0, 5, 0x21e1cde6);
39 | d = GG(d, a, b, c, x14, 9, 0xc33707d6);
40 | c = GG(c, d, a, b, 0, 14, 0xf4d50d87);
41 | b = GG(b, c, d, a, 0, 20, 0x455a14ed);
42 | a = GG(a, b, c, d, 0, 5, 0xa9e3e905);
43 | d = GG(d, a, b, c, x2, 9, 0xfcefa3f8);
44 | c = GG(c, d, a, b, 0, 14, 0x676f02d9);
45 | b = GG(b, c, d, a, 0, 20, 0x8d2a4c8a);
46 | // Round 3
47 | a = HH(a, b, c, d, 0, 4, 0xfffa3942);
48 | d = HH(d, a, b, c, 0, 11, 0x8771f681);
49 | c = HH(c, d, a, b, 0, 16, 0x6d9d6122);
50 | b = HH(b, c, d, a, x14, 23, 0xfde5380c);
51 | a = HH(a, b, c, d, x1, 4, 0xa4beea44);
52 | d = HH(d, a, b, c, 0, 11, 0x4bdecfa9);
53 | c = HH(c, d, a, b, 0, 16, 0xf6bb4b60);
54 | b = HH(b, c, d, a, 0, 23, 0xbebfbc70);
55 | a = HH(a, b, c, d, 0, 4, 0x289b7ec6);
56 | d = HH(d, a, b, c, x0, 11, 0xeaa127fa);
57 | c = HH(c, d, a, b, 0, 16, 0xd4ef3085);
58 | b = HH(b, c, d, a, 0, 23, 0x04881d05);
59 | a = HH(a, b, c, d, 0, 4, 0xd9d4d039);
60 | d = HH(d, a, b, c, 0, 11, 0xe6db99e5);
61 | c = HH(c, d, a, b, 0, 16, 0x1fa27cf8);
62 | b = HH(b, c, d, a, x2, 23, 0xc4ac5665);
63 | // Round 4
64 | a = II(a, b, c, d, x0, 6, 0xf4292244);
65 | d = II(d, a, b, c, 0, 10, 0x432aff97);
66 | c = II(c, d, a, b, x14, 15, 0xab9423a7);
67 | b = II(b, c, d, a, 0, 21, 0xfc93a039);
68 | a = II(a, b, c, d, 0, 6, 0x655b59c3);
69 | d = II(d, a, b, c, 0, 10, 0x8f0ccc92);
70 | c = II(c, d, a, b, 0, 15, 0xffeff47d);
71 | b = II(b, c, d, a, x1, 21, 0x85845dd1);
72 | a = II(a, b, c, d, 0, 6, 0x6fa87e4f);
73 | d = II(d, a, b, c, 0, 10, 0xfe2ce6e0);
74 | c = II(c, d, a, b, 0, 15, 0xa3014314);
75 | b = II(b, c, d, a, 0, 21, 0x4e0811a1);
76 | a = II(a, b, c, d, 0, 6, 0xf7537e82);
77 | d = II(d, a, b, c, 0, 10, 0xbd3af235);
78 | c = II(c, d, a, b, x2, 15, 0x2ad7d2bb);
79 | b = II(b, c, d, a, 0, 21, 0xeb86d391);
80 |
81 | a += 0x67452301;
82 | b += 0xefcdab89;
83 | c += 0x98badcfe;
84 | d += 0x10325476;
85 | return a ^ b ^ c ^ d;
86 | }
87 |
88 | unsigned int GenerateChecksumV8(unsigned int sym, unsigned int salt)
89 | {
90 | unsigned int a = sym;
91 | for(int i = 0; i < 1000; i++)
92 | a = TransformBlock(a, salt, 0x80, 0x40);
93 | return a;
94 | }
95 |
--------------------------------------------------------------------------------
/brute_sym/md5.h:
--------------------------------------------------------------------------------
1 | #ifndef _MD5_H
2 | #define _MD5_H
3 |
4 | unsigned int TransformBlock(unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x14);
5 | unsigned int GenerateChecksumV8(unsigned int sym, unsigned int salt);
6 | #define GenerateChecksumV3(sym) (TransformBlock(sym, 0x80, 0, 0x20)^sym)
7 |
8 | #endif // _MD5_H
9 |
--------------------------------------------------------------------------------
/bugs.txt:
--------------------------------------------------------------------------------
1 | - arma v4 sec.bin
2 | - date +1 day bug (redblkjck)
3 | -
4 |
--------------------------------------------------------------------------------
/functions/CertTool_brute.h:
--------------------------------------------------------------------------------
1 | #ifndef _CT_BRUTE_H
2 | #define _CT_BRUTE_H
3 |
4 | #include "CertTool_global.h"
5 | #include "CertTool_parser.h"
6 | #include "Misc_verifysym.h"
7 |
8 | typedef struct _hash_list
9 | {
10 | int count;
11 | unsigned long hash[32];
12 | } hash_list;
13 |
14 | typedef void (*PRINT_FOUND)(unsigned long hash, unsigned long key);
15 | typedef void (*PRINT_PROGRESS)(double checked, double all, time_t* start);
16 | typedef void (*PRINT_ERROR)(const char* error_msg);
17 |
18 | typedef void (*BRUTESTART)(int alg, hash_list* list, unsigned long from, unsigned long to, unsigned long* param);
19 | typedef void (*SETCALLBACKS)(PRINT_FOUND cb1, PRINT_PROGRESS cb2, PRINT_ERROR cb3);
20 | typedef void (*BRUTESTOP)();
21 | typedef void (*BRUTESETTINGS)(HWND parent);
22 | typedef int(*UPDATEKEYS)(int level, const char* y_txt);
23 | typedef int(*SOLVEDLP)(const char* pvt_txt);
24 |
25 | extern HINSTANCE hBrute;
26 | extern BRUTESTART BruteStart;
27 | extern SETCALLBACKS BruteSetCallbacks;
28 | extern BRUTESTOP BruteStop;
29 | extern BRUTESETTINGS BruteSettings;
30 |
31 | void cbBruteProgess(double checked, double all, time_t* start);
32 | void cbBrutePrintFound(unsigned long hash, unsigned long key);
33 | void cbBruteError(const char* error_msg);
34 |
35 | extern HINSTANCE hBruteDlp;
36 | extern UPDATEKEYS UpdateKeys;
37 | extern SOLVEDLP SolveDlp;
38 |
39 | extern int CT_total_sym_found;
40 | extern char* CT_section_name;
41 | extern bool CT_brute_is_paused;
42 | extern bool CT_brute_shutdown;
43 | extern bool CT_brute;
44 | extern bool CT_brute_initialized;
45 | extern bool CT_brute_dlp_initialized;
46 | extern bool CT_brute_nosym;
47 | extern bool CT_brute_symverify;
48 |
49 | struct BRUTE_DATA
50 | {
51 | unsigned int magic1;
52 | unsigned int magic2;
53 | unsigned int md5;
54 | unsigned char* encrypted_data;
55 | unsigned int encrypted_size;
56 | };
57 |
58 | extern BRUTE_DATA* CT_current_brute;
59 |
60 | bool InitializeSymBruteLibrary(HWND hwndDlg);
61 | bool InitializeDlpBruteLibrary(HWND hwndDlg);
62 | void cbBruteError(const char* error_msg);
63 | void cbBrutePrintFound(unsigned long hash, unsigned long key);
64 | void cbBruteProgess(double checked, double all, time_t* start);
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/functions/CertTool_debugger.h:
--------------------------------------------------------------------------------
1 | #ifndef _CT_DEBUGGER_H
2 | #define _CT_DEBUGGER_H
3 |
4 | #include "CertTool_global.h"
5 | #include "CertTool_parser.h"
6 |
7 | extern bool CT_isdebugging;
8 |
9 | void CT_cbGetSalt();
10 | void CT_RetrieveSaltValue();
11 | void CT_cbEndBigLoop();
12 | void CT_cbTeaDecrypt();
13 | void CT_cbMagicJump();
14 | void CT_cbMagicValue();
15 | UINT CT_DetermineRegisterFromByte(unsigned char byte);
16 | void CT_SortArray(unsigned int* a, int size);
17 | void CT_cbGetOtherSeed();
18 | void CT_cbOtherSeeds();
19 | void CT_cbReturnSeed1();
20 | void CT_cbSeed1();
21 | void CT_cbCertificateFunction();
22 | void CT_cbVirtualProtect();
23 | void CT_cbOpenMutexA();
24 | void CT_cbEntry();
25 | DWORD WINAPI CT_FindCertificates(void* lpvoid);
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/functions/CertTool_decrypt.h:
--------------------------------------------------------------------------------
1 | #ifndef _CT_DECRYPT_H
2 | #define _CT_DECRYPT_H
3 |
4 | #include "CertTool_global.h"
5 |
6 | extern unsigned long CT_a;
7 |
8 | unsigned long CT_mult(long p, long q);
9 | unsigned long CT_NextRandomRange(long range);
10 | unsigned char* CT_GetCryptBytes(unsigned int seed, unsigned int size);
11 | unsigned char* CT_Decrypt(unsigned char** data, unsigned char** rand, unsigned int size);
12 | void CT_DecryptCerts();
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/functions/CertTool_dialog.h:
--------------------------------------------------------------------------------
1 | #ifndef _CT_DIALOG_H
2 | #define _CT_DIALOG_H
3 |
4 | #include "CertTool_global.h"
5 | #include "CertTool_brute.h"
6 | #include "CertTool_debugger.h"
7 | #include "help_dialog.h"
8 |
9 | BOOL CALLBACK CT_DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/functions/CertTool_global.h:
--------------------------------------------------------------------------------
1 | #ifndef _CT_GLOBAL_H
2 | #define _CT_GLOBAL_H
3 |
4 | #include "_global.h"
5 |
6 | extern HWND CT_shared;
7 |
8 | extern char CT_szFileName[256];
9 | extern char CT_szLogFile[256];
10 | extern char CT_szAktLogFile[256];
11 | extern char CT_szCryptCertFile[256];
12 | extern char CT_szRawCertFile[256];
13 | extern char CT_szStolenKeysRaw[256];
14 | extern char CT_szStolenKeysLog[256];
15 |
16 | extern bool CT_logtofile;
17 | extern unsigned int CT_time1;
18 |
19 | struct CERT_DATA
20 | {
21 | unsigned char* raw_data;
22 | unsigned char* encrypted_data;
23 | char* projectid;
24 | char* customer_service;
25 | char* website;
26 | char* unknown_string;
27 | unsigned char* stolen_keys;
28 | unsigned int stolen_keys_size;
29 | unsigned int stolen_keys_diff;
30 | unsigned char* intercepted_libs;
31 | unsigned int intercepted_libs_size;
32 | unsigned int projectid_diff;
33 | unsigned int initial_diff;
34 | unsigned int raw_size;
35 | unsigned int encrypted_size;
36 | unsigned int first_dw;
37 | unsigned int magic1;
38 | unsigned int magic2;
39 | unsigned int salt;
40 | unsigned int decrypt_seed[4]; //initial, projectid, certificate, stolen keys
41 | unsigned int decrypt_addvals[4];
42 | bool checksumv8;
43 | bool zero_md5_symverify;
44 | unsigned int timestamp;
45 | };
46 |
47 | extern CERT_DATA* CT_cert_data;
48 |
49 | void CT_FatalError(const char* msg);
50 | int CT_NextSeed(int data);
51 | unsigned int CT_FindCertificateFunctionOld(BYTE* d, unsigned int size);
52 | unsigned int CT_FindCertificateFunctionNew(BYTE* d, unsigned int size);
53 | unsigned int CT_FindCertificateMarkers(BYTE* d, unsigned int size);
54 | unsigned int CT_FindCertificateMarkers2(BYTE* d, unsigned int size);
55 | unsigned int CT_FindCertificateEndMarkers(BYTE* mem_addr, unsigned int size);
56 | unsigned int CT_FindMagicPattern(BYTE* d, unsigned int size, unsigned int* ebp_sub);
57 | unsigned int CT_FindEndInitSymVerifyPattern(BYTE* d, unsigned int size);
58 | unsigned int CT_FindPubMd5MovePattern(BYTE* d, unsigned int size);
59 | unsigned int CT_FindDecryptKey1Pattern(BYTE* d, unsigned int size);
60 | unsigned int CT_FindMagicJumpPattern(BYTE* d, unsigned int size, unsigned short* data);
61 | unsigned int CT_FindECDSAVerify(BYTE* d, unsigned int size);
62 | unsigned int CT_FindPushFFPattern(BYTE* d, unsigned int size);
63 | unsigned int CT_FindTeaDecryptPattern(BYTE* d, unsigned int size);
64 | unsigned int CT_FindNextDwordPattern(BYTE* d, unsigned int size);
65 | unsigned int CT_FindReturnPattern(BYTE* d, unsigned int size);
66 | unsigned int CT_FindReturnPattern2(BYTE* d, unsigned int size);
67 | unsigned int CT_FindPush100Pattern(BYTE* d, unsigned int size);
68 | unsigned int CT_FindCall1Pattern(BYTE* d, unsigned int size);
69 | unsigned int CT_FindCall2Pattern(BYTE* d, unsigned int size);
70 | unsigned int CT_FindAndPattern1(BYTE* d, unsigned int size);
71 | unsigned int CT_FindAndPattern2(BYTE* d, unsigned int size);
72 | unsigned int CT_FindStdcallPattern(BYTE* d, unsigned int size);
73 | unsigned int CT_FindVerifySymPattern(BYTE* d, unsigned int size);
74 | unsigned int CT_FindEndLoopPattern(BYTE* d, unsigned int size);
75 |
76 | #endif
77 |
--------------------------------------------------------------------------------
/functions/CertTool_parser.h:
--------------------------------------------------------------------------------
1 | #ifndef _CT_PARSER_H
2 | #define _CT_PARSER_H
3 |
4 | #include "CertTool_global.h"
5 | #include "CertTool_decrypt.h"
6 | #include "CertTool_brute.h"
7 |
8 | extern bool CT_created_log;
9 | extern bool CT_isparsing;
10 |
11 | void CT_AddToLog(HWND list, const char* text);
12 | void CT_AddLogMessage(HWND list, const char* text);
13 | void CT_ParseCerts();
14 |
15 | #define v400h 0x42400000
16 | #define v410420l 0x42100000
17 | #define v410420h 0x42B00000
18 | #define v430604l 0x42A00000
19 | #define v430604h 0x48F00000
20 | #define v620740l 0x48900000
21 | #define v620740h 0x4C900000
22 | #define v800h 0x4C300000
23 |
24 | #define fcustomerservice 0x1
25 | #define fwebsite 0x10
26 | #define funknown 0x100
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/functions/EVLog_debugger.h:
--------------------------------------------------------------------------------
1 | #ifndef _EV_DEBUGGER_H
2 | #define _EV_DEBUGGER_H
3 |
4 | #include "EVLog_global.h"
5 |
6 | void RemoveListDuplicates(HWND hwndDlg, UINT id);
7 | unsigned int EV_FindSetEnvPattern(BYTE* d, unsigned int size, bool skip_first);
8 | unsigned int EV_FindSetEnvPatternOld(BYTE* d, unsigned int size, bool skip_first);
9 | unsigned int EV_FindSetEnvPatternOldOld(BYTE* d, unsigned int size, bool skip_first);
10 | void EV_FatalError(const char* msg);
11 | void EV_BreakDebugger();
12 | void EV_cbEndLog();
13 | void EV_log_var_valW(const wchar_t* varname, const wchar_t* varvalue);
14 | void EV_log_var_valA(const char* varname, const char* varvalue);
15 | void EV_cbSetEnvW();
16 | void EV_cbSetEnvA();
17 | void EV_cbVirtualProtect();
18 | void EV_cbOpenMutexA();
19 | void EV_cbEntry();
20 | DWORD WINAPI EV_DebugThread(LPVOID lpStartAddress);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/functions/EVLog_global.cpp:
--------------------------------------------------------------------------------
1 | #include "EVLog_global.h"
2 |
3 | //Debugger
4 | HWND EV_shared;
5 | HWND EV_list_hwnd;
6 | char EV_szFileName[256] = "";
7 |
8 |
--------------------------------------------------------------------------------
/functions/EVLog_global.h:
--------------------------------------------------------------------------------
1 | #ifndef _EV_GLOBAL_H
2 | #define _EV_GLOBAL_H
3 |
4 | #include "_global.h"
5 |
6 | //Debugger
7 | extern HWND EV_shared;
8 | extern HWND EV_list_hwnd;
9 | extern char EV_szFileName[256];
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/functions/EVLog_maindlg.h:
--------------------------------------------------------------------------------
1 | #ifndef _EV_MAINDLG_H
2 | #define _EV_MAINDLG_H
3 |
4 | #include "EVLog_global.h"
5 | #include "EVLog_debugger.h"
6 | #include "help_dialog.h"
7 |
8 | BOOL CALLBACK EV_DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/functions/InlineHelper_codegen.cpp:
--------------------------------------------------------------------------------
1 | #include "InlineHelper_codegen.h"
2 |
3 | /**********************************************************************
4 | * Functions
5 | *********************************************************************/
6 | void IH_GenerateAsmCode(char* codeText, IH_InlineHelperData_t targetData)
7 | {
8 | char crc_replace_code[2048] = "";
9 | if(targetData.Arma960)
10 | {
11 | sprintf(crc_replace_code, "mov dword ptr ds:[ebp-0x%X],0x%X\r\nmov eax,dword ptr ds:[esp+4]\r\nmov eax,dword ptr ds:[eax+0x%X]\r\nmov dword ptr ds:[eax],0x%X\r\nmov dword ptr ds:[eax+4],0x%X\r\nmov dword ptr ds:[eax+8],0x%X\r\nmov dword ptr ds:[eax+0xC],0x%X",
12 | targetData.CRCBase,
13 | targetData.CrcOriginalVals[0],
14 | targetData.Arma960_add,
15 | targetData.CrcOriginalVals[1],
16 | targetData.CrcOriginalVals[2],
17 | targetData.CrcOriginalVals[3],
18 | targetData.CrcOriginalVals[4]);
19 | }
20 | else
21 | {
22 | sprintf(crc_replace_code, "mov dword ptr ds:[ebp-0x%X],0x%X\r\nmov dword ptr ds:[ebp-0x%X],0x%X\r\nmov dword ptr ds:[ebp-0x%X],0x%X\r\nmov dword ptr ds:[ebp-0x%X],0x%X\r\nmov dword ptr ds:[ebp-0x%X],0x%X",
23 | targetData.CRCBase,
24 | targetData.CrcOriginalVals[0],
25 | targetData.CRCBase + 8,
26 | targetData.CrcOriginalVals[1],
27 | targetData.CRCBase + 12,
28 | targetData.CrcOriginalVals[2],
29 | targetData.CRCBase + 16,
30 | targetData.CrcOriginalVals[3],
31 | targetData.CRCBase + 20,
32 | targetData.CrcOriginalVals[4]);
33 | }
34 | unsigned int imgbase = targetData.ImageBase;
35 | sprintf(codeText, template_text,
36 | targetData.EmptyEntry - imgbase,
37 | targetData.EmptyEntry + 6 - imgbase,
38 | targetData.OutputDebugStringA_Addr - imgbase,
39 | targetData.VirtualProtect_Addr - imgbase,
40 | targetData.VirtualProtect_Addr - imgbase,
41 | targetData.OutputDebugCount,
42 | targetData.OutputDebugStringA_Addr - imgbase,
43 | crc_replace_code,
44 | targetData.OEP - imgbase,
45 | targetData.SecurityAddrRegister);
46 | }
47 |
--------------------------------------------------------------------------------
/functions/InlineHelper_codegen.h:
--------------------------------------------------------------------------------
1 | #ifndef _IH_CODEGEN_H
2 | #define _IH_CODEGEN_H
3 |
4 | #include "InlineHelper_global.h"
5 | #include "..\template.h"
6 |
7 | /**********************************************************************
8 | * Prototypes
9 | *********************************************************************/
10 | void IH_GenerateAsmCode(char* codeText, IH_InlineHelperData_t targetData);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/functions/InlineHelper_debugger.h:
--------------------------------------------------------------------------------
1 | #ifndef _IH_DEBUGGER_H
2 | #define _IH_DEBUGGER_H
3 |
4 | #include "InlineHelper_global.h"
5 | #include "InlineHelper_codegen.h"
6 |
7 |
8 | /**********************************************************************
9 | * Prototypes
10 | *********************************************************************/
11 | BYTE IH_FindCrcStart(BYTE* data);
12 | unsigned int IH_FindFreeSpace(BYTE* d, unsigned int size);
13 | void IH_GetFreeSpaceAddr(void);
14 | void IH_GetImportTableAddresses();
15 | void IH_cbOutputDebugStringA();
16 | void IH_cbVirtualProtect();
17 | void IH_cbOpenMutexA();
18 | void IH_cbEntryPoint();
19 | void IH_cbDllEntryPoint();
20 | DWORD WINAPI IH_DebugThread(LPVOID lpStartAddress);
21 | bool IH_Debugger(char* szFileName, IH_InlineHelperData_t* ptrTargetData, cbStd EndingCallback, cbErrorMessage ErrorMessageCallback);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/functions/InlineHelper_decrypt.h:
--------------------------------------------------------------------------------
1 | #ifndef _IH_DECRYPT_H
2 | #define _IH_DECRYPT_H
3 |
4 | #include "InlineHelper_global.h"
5 |
6 |
7 | /**********************************************************************
8 | * Prototypes
9 | *********************************************************************/
10 | void IHD_FatalError(const char* msg);
11 | unsigned int IHD_FindJump(BYTE* d, unsigned int size, char* reg);
12 | void IHD_cbOEP();
13 | void IHD_cbJumpOEP();
14 | void IHD_cbGuardPage();
15 | void IHD_cbEntry();
16 | DWORD WINAPI IHD_DebugThread(LPVOID lpStartAddress);
17 | void IHD_Debugger(char* szFileName, cbErrorMessage ErrorMessageCallback);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/functions/InlineHelper_dialog.h:
--------------------------------------------------------------------------------
1 | #ifndef _IH_DIALOG_H
2 | #define _IH_DIALOG_H
3 |
4 | #include "InlineHelper_global.h"
5 | #include "InlineHelper_debugger.h"
6 | #include "help_dialog.h"
7 |
8 |
9 | /**********************************************************************
10 | * Prototypes
11 | *********************************************************************/
12 | BOOL CALLBACK IH_DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
13 | void IH_ErrorMessageCallback(char* szMessage, char* szTitle);
14 | void IH_DebugEnd_Callback(void);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/functions/InlineHelper_global.cpp:
--------------------------------------------------------------------------------
1 | #include "InlineHelper_global.h"
2 |
--------------------------------------------------------------------------------
/functions/InlineHelper_global.h:
--------------------------------------------------------------------------------
1 | #ifndef _IH_GLOBAL_H
2 | #define _IH_GLOBAL_H
3 |
4 | #include "_global.h"
5 |
6 |
7 | /**********************************************************************
8 | * Type Definitions
9 | *********************************************************************/
10 | typedef char* (*PLUGINFO)(void);
11 |
12 | typedef void(*PLUGFUNC)(HINSTANCE hInst, HWND hwndDlg, const char* register_vp, const char* progdir, unsigned int imagebase);
13 |
14 | typedef struct _IH_InlineHelperData_t
15 | {
16 | // PE data
17 | long ImageBase; // Process image base
18 | long EntrySectionNumber ; // Number of sections
19 | char SecurityAddrRegister[4]; // Register that contains a pointer to security.dll
20 |
21 | // APIs addresses
22 | unsigned int GetEnvironmentVariableA_Addr;
23 | unsigned int SetEnvironmentVariableA_Addr;
24 | unsigned int LoadLibraryA_Addr;
25 | unsigned int GetProcAddress_Addr;
26 | unsigned int WriteProcessMemory_Addr;
27 | unsigned int OutputDebugStringA_Addr;
28 | unsigned int VirtualProtect_Addr;
29 |
30 | // OEP
31 | unsigned int OEP; // Old entry point (for inline code)
32 |
33 | // Free Space Entry (Empty Entry)
34 | unsigned int EmptyEntry; // Start of free space
35 |
36 | // CRC
37 | unsigned int CrcOriginalVals[5]; // Original CRC values array
38 | int CRCBase; // Stack difference for retrieving the CRC values
39 |
40 | // Output Debug Counter
41 | int OutputDebugCount; // Total count of hits on OutputDebugStringA
42 |
43 | // VirtualProtect info
44 | unsigned int CodeSize;
45 |
46 | // Arma 960 support
47 | bool Arma960;
48 | unsigned int Arma960_add;
49 | } IH_InlineHelperData_t;
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/functions/InlineHelper_plugins.h:
--------------------------------------------------------------------------------
1 | #ifndef _IH_PLUGINS_H
2 | #define _IH_PLUGINS_H
3 |
4 | #include "InlineHelper_global.h"
5 |
6 |
7 | /**********************************************************************
8 | * Prototypes
9 | *********************************************************************/
10 | void IH_GetPluginList(void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/functions/Misc_checksum.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_CHECKSUM_H
2 | #define _MSC_CHECKSUM_H
3 |
4 | #include "Misc_global.h"
5 | #include "Misc_projectid.h"
6 |
7 | unsigned int MakeChecksumV3(unsigned int sym);
8 | unsigned int MakeChecksumV8(unsigned int sym, unsigned int salt);
9 | void MSC_cbGetSalt();
10 | void MSC_RetrieveSaltValue();
11 | void MSC_SALT_cbOpenMutexA2();
12 | void MSC_SALT_cbVirtualProtect();
13 | void MSC_SALT_cbOpenMutexA();
14 | void MSC_SALT_cbEntry();
15 | DWORD WINAPI MSC_GetSalt(void* lpvoid);
16 | unsigned long MSC_CHK_mult(long p, long q);
17 | unsigned long MSC_CHK_NextRandomRange(long range);
18 | unsigned char* MSC_CHK_GetCryptBytes(unsigned int seed, unsigned int size);
19 | unsigned char* MSC_CHK_Decrypt(unsigned char** data, unsigned char** rand, unsigned int size);
20 | bool MSC_CHK_DecryptCerts(unsigned int* seed, unsigned char* raw_data, unsigned int raw_size);
21 | void MSC_CHK_cbGetOtherSeed();
22 | void MSC_CHK_cbOtherSeeds();
23 | void MSC_CHK_cbReturnSeed1();
24 | void MSC_CHK_cbSeed1();
25 | void MSC_CHK_cbCertificateFunction();
26 | void MSC_CHK_cbVirtualProtect();
27 | void MSC_CHK_cbOpenMutexA();
28 | void MSC_CHK_cbEntry();
29 | DWORD WINAPI MSC_FindChecksum(void* lpvoid);
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/functions/Misc_currentsym.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_CURRENTSYM_H
2 | #define _MSC_CURRENTSYM_H
3 |
4 | #include "Misc_global.h"
5 |
6 | unsigned int FindMagicPattern(BYTE* d, unsigned int size);
7 | void MSC_cbGetACP();
8 | void MSC_cbSymGet();
9 | void MSC_cbVirtualProtect();
10 | void MSC_cbOpenMutexA();
11 | void MSC_cbEntry();
12 | DWORD WINAPI MSC_CurSymDebugThread(void* lpvoid);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/functions/Misc_dialog.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_DIALOG_H
2 | #define _MSC_DIALOG_H
3 |
4 | #include "Misc_global.h"
5 | #include "Misc_verifysym.h"
6 | #include "Misc_checksum.h"
7 | #include "Misc_currentsym.h"
8 | #include "Misc_sectiondeleter.h"
9 | #include "help_dialog.h"
10 | #include "LicenceRemoval_debugger.h"
11 |
12 | BOOL CALLBACK MSC_DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/functions/Misc_global.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_GLOBAL_H
2 | #define _MSC_GLOBAL_H
3 |
4 | #include "_global.h"
5 |
6 | //GetCurrentSym
7 | extern HWND MSC_shared;
8 | extern char MSC_szFileName[256];
9 | extern char MSC_program_dir[256];
10 | extern LPPROCESS_INFORMATION MSC_fdProcessInfo ;
11 | extern bool MSC_fdFileIsDll;
12 | extern unsigned int MSC_current_sym;
13 | extern bool MSC_getversion_set;
14 | extern bool MSC_isdebugging;
15 | extern unsigned int MSC_magic_addr;
16 |
17 | //ClockBack
18 | extern char MSC_projectID[65536];
19 |
20 | //ProjectID
21 | extern int MSC_cert_func_count;
22 |
23 | void MSC_FatalError(const char* msg);
24 |
25 | //Checksum
26 | extern unsigned int MSC_checksum;
27 |
28 | extern unsigned int MSC_salt_func_addr;
29 | extern unsigned int MSC_salt_register;
30 | extern unsigned int MSC_salt_breakpoint;
31 | extern unsigned int MSC_project_salt;
32 | extern BYTE MSC_salt_code[61];
33 |
34 | ///arma960 (checksum)
35 | extern int MSC_CHK_return_counter;
36 | extern int MSC_CHK_other_seed_counter;
37 | extern unsigned int MSC_CHK_seeds[5];
38 | extern unsigned char* MSC_CHK_raw_data;
39 | ///arma960 (projectid)
40 | extern int MSC_return_counter;
41 | extern int MSC_other_seed_counter;
42 | extern unsigned int MSC_seeds[5];
43 | extern unsigned char* MSC_raw_data;
44 |
45 | //VerifySym
46 | extern char MSC_VR_certpath[256];
47 | extern char MSC_VR_keyspath[256];
48 | extern char MSC_VR_magic1[10], MSC_VR_magic2[10], MSC_VR_md5_text[10];
49 | extern char* MSC_VR_keys;
50 | extern char* MSC_VR_keys_format;
51 | extern unsigned int* MSC_VR_key_array;
52 | extern unsigned int* MSC_VR_buffer_400;
53 | extern bool MSC_VR_check_all_md5;
54 | extern unsigned int MSC_VR_magic_value_addr;
55 | extern unsigned int MSC_VR_magic_ebp_sub;
56 |
57 | //Section Deleter
58 | extern HWND MSC_SD_list;
59 | extern bool MSC_SD_updated_sections;
60 |
61 | struct SECTION_ANALYSIS
62 | {
63 | int entry_section;
64 | int code_section;
65 | int export_section;
66 | int import_section;
67 | int resource_section;
68 | int relocation_section;
69 | int tls_section;
70 | int first_arma_section;
71 | unsigned char code_section_bytes[2];
72 | bool isDll;
73 | };
74 |
75 | extern SECTION_ANALYSIS MSC_SD_section_info;
76 |
77 | UINT MSC_DetermineRegisterFromByte(unsigned char byte);
78 | void MSC_SortArray(unsigned int* a, int size);
79 | unsigned int MSC_FindReturnPattern(BYTE* d, unsigned int size);
80 | unsigned int MSC_FindReturnPattern2(BYTE* d, unsigned int size);
81 | unsigned int MSC_FindPush100Pattern(BYTE* d, unsigned int size);
82 | unsigned int MSC_FindCall1Pattern(BYTE* d, unsigned int size);
83 | unsigned int MSC_FindCall2Pattern(BYTE* d, unsigned int size);
84 | unsigned int MSC_FindAndPattern1(BYTE* d, unsigned int size);
85 | unsigned int MSC_FindAndPattern2(BYTE* d, unsigned int size);
86 | unsigned int MSC_FindStdcallPattern(BYTE* d, unsigned int size);
87 |
88 | #endif
89 |
--------------------------------------------------------------------------------
/functions/Misc_projectid.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_PROJECTID_H
2 | #define _MSC_PROJECTID_H
3 |
4 | #include "Misc_global.h"
5 |
6 | unsigned int MSC_FindCertificateFunctionOld(BYTE* d, unsigned int size);
7 | unsigned int MSC_FindCertificateFunctionNew(BYTE* d, unsigned int size);
8 | unsigned int MSC_FindCertificateMarkers(BYTE* d, unsigned int size);
9 | unsigned int MSC_FindCertificateMarkers2(BYTE* d, unsigned int size);
10 | unsigned long MSC_mult(long p, long q);
11 | unsigned long MSC_NextRandomRange(long range);
12 | unsigned char* MSC_GetCryptBytes(unsigned int seed, unsigned int size);
13 | unsigned char* MSC_Decrypt(unsigned char** data, unsigned char** rand, unsigned int size);
14 | char* MSC_DecryptCerts(unsigned int* seed, unsigned char* raw_data, unsigned int raw_size);
15 | void MSC_cbGetOtherSeed();
16 | void MSC_cbOtherSeeds();
17 | void MSC_cbReturnSeed1();
18 | void MSC_cbSeed1();
19 | void MSC_cbCertificateFunction();
20 | void MSC_PRJ_cbVirtualProtect();
21 | void MSC_PRJ_cbOpenMutexA();
22 | void MSC_PRJ_cbEntry();
23 | DWORD WINAPI MSC_GetProjectID(void* lpvoid);
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/functions/Misc_sectiondeleter.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_SECTIONDELETER_H
2 | #define _MSC_SECTIONDELETER_H
3 |
4 | #include "Misc_global.h"
5 |
6 | bool MSC_SD_IsArmadilloProtected(char* va);
7 | unsigned int MSC_SD_HasOverlay(char* va, unsigned int filesize);
8 | bool MSC_SD_DumpOverlay(const char* filename);
9 | bool MSC_SD_IsValidPe(char* va);
10 | bool MSC_SD_RemoveWatermark(HWND hwndDlg);
11 | void MSC_SD_LoadFile(HWND hwndDlg);
12 | bool MSC_SD_RemoveSection(HWND hwndDlg, int i);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/functions/Misc_verifysym.h:
--------------------------------------------------------------------------------
1 | #ifndef _MSC_VERIFYSYM_H
2 | #define _MSC_VERIFYSYM_H
3 |
4 | #include "Misc_global.h"
5 |
6 | #define max_bufsize 65535*100
7 |
8 | unsigned int MSC_FindMagicPattern(BYTE* d, unsigned int size, unsigned int* ebp_sub);
9 | void MSC_cbMagicValue();
10 | void MSC_VR_cbVirtualProtect();
11 | void MSC_VR_cbOpenMutexA();
12 | void MSC_VR_cbEntry();
13 | DWORD WINAPI MSC_VR_GetMagic(void* lpvoid);
14 | unsigned int MSC_VR_GenerateNumber_core(int push_value, int* in_value);
15 | unsigned int MSC_VR_GenerateNumberDword(int* in_value);
16 | void MSC_VR_TEA_Decrypt(unsigned int* k, unsigned char* data, unsigned int length, int flag);
17 | void MSC_VR_TEA_Decrypt_Nrounds(unsigned int* k, unsigned int* data, unsigned int rounds);
18 | int MSC_VR_brute(unsigned int _magic1, unsigned int _magic2, unsigned int _sym, unsigned int _md5_ecdsa, unsigned char* data, unsigned int data_size);
19 | void MSC_VR_StepProgressBar(int total_keys);
20 | DWORD WINAPI MSC_VR_BruteThread(LPVOID arg);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/functions/VersionFind_decode.h:
--------------------------------------------------------------------------------
1 | #ifndef _VF_DECODE_H
2 | #define _VF_DECODE_H
3 |
4 | #include "VersionFind_global.h"
5 |
6 | /**********************************************************************
7 | * Constant Defines
8 | *********************************************************************/
9 | #define BACKUPKEY_NOKEYS 0 // No Registry Keys at All
10 | #define BACKUPKEY_NOBACKUP 1 // Main Key Only, No Backup Keys
11 | #define BACKUPKEY_FIXED 2 // Fixed Backup Keys
12 | #define BACKUPKEY_VARIABLE 3 // Variable Backup Keys
13 |
14 | #define COMPRESSION_MINIMAL 0 // Minimal/Fastest Compression
15 | #define COMPRESSION_BETTER 1 // Better/Slower Compression
16 | #define COMPRESSION_BEST 2 // Best/Slowest Compression
17 |
18 | #define SPLASH_NONE 0 // No Splash Screen
19 | #define SPLASH_DEFAULT 1 // Show Default Box
20 | #define SPLASH_BITMAP 2 // Show Bitmap
21 |
22 |
23 | /**********************************************************************
24 | * Type Definitions
25 | *********************************************************************/
26 | typedef struct _EXTRA_OPTIONS
27 | {
28 | unsigned int raw_extra_options;
29 | bool has_other_options; //For logging
30 | int splash_type; //Splash Screen Type
31 | bool standard_hwid; //Enhanced hardware ID in registration dialog
32 | bool enhanced_hwid; //Standard hardware ID in registration dialog
33 | bool enhanced_softice; //Enhanced SoftICE Detection
34 | bool no_clockback; //Don't Report Clock-Back
35 | bool no_clockforward; //Don't Report Clock-Forward
36 | bool screensaver_protocols; //Use Screen Saver Protocols
37 | bool disable_info; //Disable INFO command
38 | bool ignore_info; //Ignore INFO command
39 | bool disable_register; //Disable REGISTER command
40 | bool disable_unregister; //Disable UNREGISTER command
41 | bool autorevert; //Auto-Revert On Invalid Key
42 | } EXTRA_OPTIONS;
43 |
44 | typedef struct _ARMA_OPTIONS
45 | {
46 | unsigned int raw_options; // Raw value
47 | char version[11]; // Version string
48 | int backupkey; // Backup Key Options
49 | int compression; // Compression Options
50 | bool nosectioncrypt; // Standard or Minimal?
51 |
52 | // Protection Options
53 | bool debug_blocker; // Debug-Blocker
54 | bool copymem2; // CopyMem2
55 | bool iat_elimination; // Enable Import Table Elimination
56 | bool code_splicing; // Enable Strategic Code Splicing
57 | bool nanomites; // Enable Nanomites Processing
58 | bool mem_patch_protection; // Enable Memory-Patching Protections
59 |
60 | // Other Options
61 | bool has_other_options;
62 | bool external_envvars; // Store Environment Vars Externally
63 | bool allow_one_copy; // Allow Only One Copy
64 | bool disable_monitor; // Disable Monitoring Thread
65 | bool esellerate; // Use eSellerate Edition Keys
66 | bool digital_river; // Use Digital River Edition Keys
67 | bool dontfallback; // Don't Fall Back to Stand-Alone Mode
68 | EXTRA_OPTIONS* extra_options; // More options
69 | } ARMA_OPTIONS;
70 |
71 |
72 | /**********************************************************************
73 | * Prototypes
74 | *********************************************************************/
75 | void FillArmaExtraOptionsStruct(unsigned int raw, EXTRA_OPTIONS* eo);
76 | void FillArmaOptionsStruct(unsigned int raw, const char* ver, ARMA_OPTIONS* op, EXTRA_OPTIONS* eo, bool bIsMinimal);
77 | void VF_PrintArmaOptionsStructLog(ARMA_OPTIONS* op, char* log, unsigned int raw_options, unsigned int extra_options);
78 |
79 | #endif
80 |
--------------------------------------------------------------------------------
/functions/VersionFind_dialog.h:
--------------------------------------------------------------------------------
1 | #ifndef _VF_DIALOG_H
2 | #define _VF_DIALOG_H
3 |
4 | #include "VersionFind_global.h"
5 | #include "VersionFind_decode.h"
6 | #include "VersionFind_extraoptions.h"
7 | #include "VersionFind_rawoptions.h"
8 | #include "VersionFInd_version.h"
9 |
10 | #include "help_dialog.h"
11 |
12 | /**********************************************************************
13 | * Prototypes
14 | *********************************************************************/
15 | BOOL CALLBACK VF_DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
16 | DWORD WINAPI VF_DebugThread(void* lpVoid);
17 | void VF_ErrorMessageCallback(char* szMessage, char* szTitle);
18 | void CheckButton(int id);
19 | void UncheckButton(int id);
20 | void EnableWin(int id, bool a);
21 | void ResetContent(bool clear_all);
22 | void PrintArmaOptionsStruct(ARMA_OPTIONS* op, char* log, unsigned int raw_options, unsigned int extra_options);
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/functions/VersionFind_extraoptions.h:
--------------------------------------------------------------------------------
1 | #ifndef _VF_EXTRAOPTIONS_H
2 | #define _VF_EXTRAOPTIONS_H
3 |
4 | #include "VersionFind_global.h"
5 |
6 |
7 | /**********************************************************************
8 | * Prototypes
9 | *********************************************************************/
10 | void VF_ExtraOptions(char* szFileName, unsigned int* extra_options, cbErrorMessage errorCallback);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/functions/VersionFind_global.cpp:
--------------------------------------------------------------------------------
1 | #include "VersionFind_global.h"
2 |
3 |
4 | /**********************************************************************
5 | * Functions
6 | *********************************************************************/
7 | unsigned int VF_FindUsbPattern(BYTE* d, unsigned int size)
8 | {
9 | for(unsigned int i = 0; i < size; i++) //55534220646576696365
10 | if(d[i] == 0x55 && d[i + 1] == 0x53 && d[i + 2] == 0x42 && d[i + 3] == 0x20 && d[i + 4] == 0x64 && d[i + 5] == 0x65 && d[i + 6] == 0x76 && d[i + 7] == 0x69 && d[i + 8] == 0x63 && d[i + 9] == 0x65)
11 | {
12 | while(d[i] != 0)
13 | i--;
14 | return i + 1;
15 | }
16 | return 0;
17 | }
18 |
19 |
20 | unsigned int VF_FindAnd20Pattern(BYTE* d, unsigned int size)
21 | {
22 | for(unsigned int i = 0; i < size; i++) //83E?20
23 | if(d[i] == 0x83 && (d[i + 1] >> 4) == 0x0E && d[i + 2] == 0x20)
24 | return i;
25 | return 0;
26 | }
27 |
28 |
29 | unsigned int VF_Find40000Pattern(BYTE* d, unsigned int size)
30 | {
31 | for(unsigned int i = 0; i < size; i++) //00000400
32 | if(d[i] == 0x00 && d[i + 1] == 0x00 && d[i + 2] == 0x04 && d[i + 3] == 0x00)
33 | return i;
34 | return 0;
35 | }
36 |
37 | unsigned int VF_FindShrPattern(BYTE* d, unsigned int size)
38 | {
39 | for(unsigned int i = 0; i < size; i++) //C1E?0?
40 | if(d[i] == 0xC1 && (d[i + 1] >> 4) == 0x0E && (d[i + 2] >> 4) == 0x00)
41 | return i;
42 | return 0;
43 | }
44 |
45 | bool VF_IsMinimalProtection(char* szFileName, ULONG_PTR va, long parSectionNumber)
46 | {
47 | int offset = GetPE32Data(szFileName, parSectionNumber, UE_SECTIONRAWOFFSET);
48 | BYTE firstbytes[2] = {0};
49 | memcpy(firstbytes, (void*)(va + offset), 2);
50 | if(firstbytes[0] == 0x60 && firstbytes[1] == 0xE8)
51 | return false;
52 | return true;
53 | }
54 |
55 |
56 | void VF_FatalError(const char* szMessage, cbErrorMessage ErrorMessageCallback)
57 | {
58 | ErrorMessageCallback((char*)szMessage, (char*)"Fatal Error!");
59 | StopDebug();
60 | }
61 |
62 |
63 | unsigned int VF_FindarmVersion(BYTE* d, unsigned int size)
64 | {
65 | for(unsigned int i = 0; i < size; i++) //3C61726D56657273696F6E (
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | #include "..\resource.h"
18 | #include "..\TitanEngine\TitanEngine.h"
19 | #include "..\BeaEngine/BeaEngine.h"
20 |
21 | #include "keygen\keygen_main.h"
22 |
23 | /**********************************************************************
24 | * Standard Callbacks
25 | *********************************************************************/
26 | typedef void (*cbErrorMessage)(char*, char*);
27 | typedef void (*cbGenericTwoArg)(void*, void*);
28 | typedef void (*cbStd)();
29 |
30 | extern char sg_szAKTDirectory[256];
31 | extern char sg_szPluginIniFilePath[256];
32 | extern char sg_loaded_binary[256];
33 | extern char sg_security_code[256];
34 |
35 | extern HINSTANCE hInst;
36 | extern bool log_version;
37 | extern char program_dir[256];
38 |
39 | UINT DetermineRegisterFromText(char* reg_text);
40 | unsigned int FindDwordInMemory(BYTE* dump_addr, unsigned dword_to_find, unsigned int filesize);
41 | void LeftClick();
42 | void PasteFromClipboard(char* d, int maxlen);
43 | void CopyToClipboard(const char* text);
44 | char* FormatTextHex(const char* text);
45 | void SetLevelList(HWND hwndDlg);
46 | void NoFocus();
47 | bool IsHexChar(char c);
48 | void FormatHex(char* string);
49 | int StringToByteArray(const char* s, unsigned char* d, int d_len);
50 | int ByteArrayToString(unsigned char* s, char* d, int s_len, int d_len);
51 | char* EncodeShortV3(unsigned char* keybytes, int keylength, bool level10);
52 | int DecodeShortV3(const char* serial, bool level10, unsigned char* dest, int dest_len);
53 | unsigned int FindBAADF00DPattern(BYTE* d, unsigned int size);
54 | unsigned int FindSalt1Pattern(BYTE* d, unsigned int size);
55 | unsigned int FindSalt2Pattern(BYTE* d, unsigned int size);
56 | bool IsArmadilloProtected(ULONG_PTR va);
57 | unsigned int Find960Pattern(BYTE* d, unsigned int size);
58 | unsigned int FindEB6APattern(BYTE* d, unsigned int size);
59 | unsigned int FindCallPattern(BYTE* d, unsigned int size);
60 | bool FixIsDebuggerPresent(HANDLE hProcess, bool hide);
61 | void* malloc2(size_t size);
62 | void free2(void* address);
63 | void UpdateHorizontalScrollLen(HWND list, const char* string);
64 | const char* wpmerror();
65 | const char* rpmerror();
66 | bool BrowseFileOpen(HWND owner, const char* filter, const char* defext, char* filename, int filename_size, const char* init_dir);
67 |
68 | /**
69 | Structures
70 | */
71 | typedef struct _NTPEB
72 | {
73 | BOOLEAN InheritedAddressSpace;
74 | BOOLEAN ReadImageFileExecOptions;
75 | BOOLEAN BeingDebugged;
76 | BOOLEAN Spare;
77 | HANDLE Mutant;
78 | PVOID ImageBaseAddress;
79 | VOID* LoaderData;
80 | VOID* ProcessParameters;
81 | PVOID SubSystemData;
82 | PVOID ProcessHeap;
83 | PVOID FastPebLock;
84 | void* FastPebLockRoutine;
85 | void* FastPebUnlockRoutine;
86 | ULONG EnvironmentUpdateCount;
87 | PVOID* KernelCallbackTable;
88 | PVOID EventLogSection;
89 | PVOID EventLog;
90 | void* FreeList;
91 | ULONG TlsExpansionCounter;
92 | PVOID TlsBitmap;
93 | ULONG TlsBitmapBits[0x2];
94 | PVOID ReadOnlySharedMemoryBase;
95 | PVOID ReadOnlySharedMemoryHeap;
96 | PVOID* ReadOnlyStaticServerData;
97 | PVOID AnsiCodePageData;
98 | PVOID OemCodePageData;
99 | PVOID UnicodeCaseTableData;
100 | ULONG NumberOfProcessors;
101 | ULONG NtGlobalFlag;
102 | BYTE Spare2[0x4];
103 | LARGE_INTEGER CriticalSectionTimeout;
104 | ULONG HeapSegmentReserve;
105 | ULONG HeapSegmentCommit;
106 | ULONG HeapDeCommitTotalFreeThreshold;
107 | ULONG HeapDeCommitFreeBlockThreshold;
108 | ULONG NumberOfHeaps;
109 | ULONG MaximumNumberOfHeaps;
110 | PVOID** ProcessHeaps;
111 | PVOID diSharedHandleTable;
112 | PVOID ProcessStarterHelper;
113 | PVOID GdiDCAttributeList;
114 | PVOID LoaderLock;
115 | ULONG OSMajorVersion;
116 | ULONG OSMinorVersion;
117 | ULONG OSBuildNumber;
118 | ULONG OSPlatformId;
119 | ULONG ImageSubSystem;
120 | ULONG ImageSubSystemMajorVersion;
121 | ULONG ImageSubSystemMinorVersion;
122 | ULONG GdiHandleBuffer[0x22];
123 | ULONG PostProcessInitRoutine;
124 | ULONG TlsExpansionBitmap;
125 | BYTE TlsExpansionBitmapBits[0x80];
126 | ULONG SessionId;
127 | } NTPEB, *PNTPEB;
128 |
129 |
130 | #endif
131 |
--------------------------------------------------------------------------------
/functions/about.cpp:
--------------------------------------------------------------------------------
1 | #include "about.h"
2 |
3 | BOOL CALLBACK DlgAbout(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
4 | {
5 | switch(uMsg)
6 | {
7 | case WM_INITDIALOG:
8 | {
9 | MessageBeep(MB_ICONINFORMATION);
10 | char stc_txt[50] = "";
11 | sprintf(stc_txt, "%s (%s)", caption, date_compile);
12 | SetDlgItemTextA(hwndDlg, IDC_STC_TITLE, stc_txt);
13 | }
14 | return TRUE;
15 |
16 | case WM_COMMAND:
17 | {
18 | switch(LOWORD(wParam))
19 | {
20 | case IDC_BTN_OK:
21 | {
22 | EndDialog(hwndDlg, 0);
23 | }
24 | return TRUE;
25 | }
26 | }
27 | return TRUE;
28 | }
29 | return FALSE;
30 | }
31 |
--------------------------------------------------------------------------------
/functions/about.h:
--------------------------------------------------------------------------------
1 | #ifndef _ABOUT_H
2 | #define _ABOUT_H
3 |
4 | #include "_global.h"
5 |
6 | #define caption "Armadillo Key Tool v0.4"
7 | #define date_compile "Jun 2017"
8 |
9 | BOOL CALLBACK DlgAbout(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/functions/analysis.h:
--------------------------------------------------------------------------------
1 | #ifndef _ANALYSIS_H
2 | #define _ANALYSIS_H
3 |
4 | #include "_global.h"
5 | #include "help_dialog.h"
6 |
7 | BOOL CALLBACK DlgAnalysis(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/functions/encdec.cpp:
--------------------------------------------------------------------------------
1 | #include "encdec.h"
2 |
3 | BOOL CALLBACK DlgEncDec(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
4 | {
5 | switch(uMsg)
6 | {
7 | case WM_INITDIALOG:
8 | {
9 | }
10 | return TRUE;
11 |
12 | case WM_CLOSE:
13 | {
14 | EndDialog(hwndDlg, 0);
15 | }
16 | return TRUE;
17 |
18 | case WM_HELP:
19 | {
20 | char id[10] = "";
21 | sprintf(id, "%d", IDS_HELPKEYFUNCTIONS);
22 | SetEnvironmentVariableA("HELPID", id);
23 | SetEnvironmentVariableA("HELPTITLE", "Key Functions Help");
24 | DialogBox(hInst, MAKEINTRESOURCE(DLG_HELP), hwndDlg, DlgHelp);
25 | }
26 | return TRUE;
27 |
28 | case WM_COMMAND:
29 | {
30 | switch(LOWORD(wParam))
31 | {
32 | case IDC_BTN_DECODE:
33 | {
34 | char serial[512] = "";
35 | char keybytes_string[1024] = "";
36 | unsigned char keybytes[512] = {0};
37 | if(GetDlgItemTextA(hwndDlg, IDC_EDT_ENCODED, serial, 512))
38 | {
39 | int keylength = DecodeShortV3(serial, !!IsDlgButtonChecked(hwndDlg, IDC_CHK_LVL10_DECODE), keybytes, 512);
40 | ByteArrayToString(keybytes, keybytes_string, keylength, 1024);
41 | SetDlgItemTextA(hwndDlg, IDC_EDT_DECODED, keybytes_string);
42 | SetFocus(GetDlgItem(hwndDlg, IDC_EDT_DECODED));
43 | }
44 | }
45 | return TRUE;
46 |
47 | case IDC_BTN_ENCODE:
48 | {
49 | char keybytes_string[1024] = "";
50 | unsigned char keybytes[512] = {0};
51 | char serial[512] = "";
52 | if(GetDlgItemTextA(hwndDlg, IDC_EDT_DECODED, keybytes_string, 1024))
53 | {
54 | int keylength = StringToByteArray(keybytes_string, keybytes, 512);
55 | strcpy(serial, EncodeShortV3(keybytes, keylength, !!IsDlgButtonChecked(hwndDlg, IDC_CHK_LVL10_ENCODE)));
56 | SetDlgItemTextA(hwndDlg, IDC_EDT_ENCODED, serial);
57 | SetFocus(GetDlgItem(hwndDlg, IDC_EDT_ENCODED));
58 | }
59 | }
60 | return TRUE;
61 |
62 | case IDC_BTN_DECRYPT:
63 | {
64 | char encrypted[1024] = "";
65 | unsigned char keybytes[512] = {0};
66 | char decrypted[1024] = "";
67 | char name[1024] = "";
68 | if(GetDlgItemTextA(hwndDlg, IDC_EDT_ENCRYPTED, encrypted, 1024) && GetDlgItemTextA(hwndDlg, IDC_EDT_NAME_DECRYPT, name, 1024))
69 | {
70 | FormatHex(encrypted);
71 | int keylength = StringToByteArray(encrypted, keybytes, 512);
72 | EncryptSignedKey(keybytes, keylength, name, 0);
73 | ByteArrayToString(keybytes, decrypted, keylength, 1024);
74 | SetDlgItemTextA(hwndDlg, IDC_EDT_DECRYPTED, decrypted);
75 | SetFocus(GetDlgItem(hwndDlg, IDC_EDT_DECRYPTED));
76 | }
77 | }
78 | return TRUE;
79 |
80 | case IDC_BTN_ENCRYPT:
81 | {
82 | char decrypted[1024] = "";
83 | unsigned char keybytes[512] = {0};
84 | char encrypted[1024] = "";
85 | char name[1024] = "";
86 | if(GetDlgItemTextA(hwndDlg, IDC_EDT_DECRYPTED, decrypted, 1024) && GetDlgItemTextA(hwndDlg, IDC_EDT_NAME_ENCRYPT, name, 1024))
87 | {
88 | FormatHex(decrypted);
89 | int keylength = StringToByteArray(decrypted, keybytes, 512);
90 | EncryptSignedKey(keybytes, keylength, name, 0);
91 | ByteArrayToString(keybytes, encrypted, keylength, 1024);
92 | SetDlgItemTextA(hwndDlg, IDC_EDT_ENCRYPTED, encrypted);
93 | SetFocus(GetDlgItem(hwndDlg, IDC_EDT_ENCRYPTED));
94 | }
95 | }
96 | return TRUE;
97 | }
98 | }
99 | return TRUE;
100 | }
101 | return FALSE;
102 | }
103 |
--------------------------------------------------------------------------------
/functions/encdec.h:
--------------------------------------------------------------------------------
1 | #ifndef _ENCDEC_H
2 | #define _ENCDEC_H
3 |
4 | #include "_global.h"
5 | #include "help_dialog.h"
6 |
7 | BOOL CALLBACK DlgEncDec(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/functions/help_dialog.cpp:
--------------------------------------------------------------------------------
1 | #include "help_dialog.h"
2 |
3 | bool help_open = false;
4 |
5 | BOOL CALLBACK DlgHelp(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
6 | {
7 | switch(uMsg)
8 | {
9 | case WM_INITDIALOG:
10 | {
11 | SendMessageA(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIconA(hInst, MAKEINTRESOURCE(IDI_ICON1)));
12 | char help_text[4096] = "";
13 | char help_title[2048] = "";
14 | if(!GetEnvironmentVariableA("HELPID", help_text, 2048) || !GetEnvironmentVariableA("HELPTITLE", help_title, 2048) || help_open)
15 | {
16 | EndDialog(hwndDlg, 0);
17 | return TRUE;
18 | }
19 | help_open = true;
20 | SetWindowTextA(hwndDlg, help_title);
21 | int id = 0;
22 | sscanf(help_text, "%d", &id);
23 | if(!id)
24 | {
25 | EndDialog(hwndDlg, 0);
26 | return TRUE;
27 | }
28 | if(!LoadStringA(hInst, id, help_text, 4096))
29 | {
30 | EndDialog(hwndDlg, 0);
31 | return TRUE;
32 | }
33 | SetDlgItemTextA(hwndDlg, IDC_EDT_HELPTEXT, help_text);
34 | }
35 | return TRUE;
36 |
37 | case WM_CLOSE:
38 | {
39 | help_open = false;
40 | EndDialog(hwndDlg, 0);
41 | }
42 | return TRUE;
43 | }
44 | return FALSE;
45 | }
46 |
--------------------------------------------------------------------------------
/functions/help_dialog.h:
--------------------------------------------------------------------------------
1 | #ifndef _HELP_DIALOG_H
2 | #define _HELP_DIALOG_H
3 |
4 | #include "_global.h"
5 |
6 | BOOL CALLBACK DlgHelp(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_bigint.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENBIGINT_H
2 | #define _KEYGENBIGINT_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | #define BITS_PER_DIGIT 8
10 |
11 | /*
12 | In the typedefs below, DIGIT must be at least eight bits long (I don't know
13 | of any computer where this wouldn't be true), and WORKING_DIGIT must be at
14 | least twice the size of DIGIT. Modify them as needed.
15 | */
16 |
17 | #if BITS_PER_DIGIT==8
18 | typedef unsigned char DIGIT; /* This must be a minimum of 8 bits long! */
19 | typedef unsigned short WORKING_DIGIT; /* This must be at least twice the size of DIGIT! */
20 | #define DIGIT_HIBIT 0x80
21 | #define WORKING_DIGIT_HIBIT 0x8000
22 | #define DIGIT_MASK 0xFF
23 | #define OVERFLOW_DIGIT 0x100
24 | #elif BITS_PER_DIGIT==16
25 | typedef unsigned short DIGIT;
26 | typedef unsigned long WORKING_DIGIT;
27 | #define DIGIT_HIBIT 0x8000
28 | #define WORKING_DIGIT_HIBIT 0x80000000
29 | #define DIGIT_MASK 0xFFFF
30 | #define OVERFLOW_DIGIT 0x10000L
31 | #else
32 | #error Invalid BITS_PER_DIGIT, must be 8 or 16.
33 | #endif
34 |
35 | struct BigIntBase
36 | {
37 | int length, alloc, negative;
38 | DIGIT* digits;
39 | };
40 |
41 | typedef struct BigIntBase* BigInt;
42 |
43 | /* Basic housekeeping functions */
44 | BigInt BigInt_Create(void);
45 | void BigInt_Destroy(BigInt n);
46 | void BigInt_Copy(BigInt target, BigInt source);
47 | void BigInt_Set(BigInt n, signed long init);
48 | void BigInt_SetU(BigInt n, unsigned long init);
49 | signed long BigInt_Get(BigInt n);
50 | unsigned long BigInt_GetU(BigInt n);
51 | int BigInt_Compare(BigInt a, BigInt b);
52 | BigInt BigInt_Zero(void);
53 | BigInt BigInt_One(void);
54 |
55 | /* Mathematical operator functions */
56 | void BigInt_Add(BigInt a, BigInt b, BigInt answer);
57 | void BigInt_Subtract(BigInt a, BigInt b, BigInt answer);
58 | void BigInt_Multiply(BigInt a, BigInt b, BigInt answer);
59 | int BigInt_Divide(BigInt a, BigInt b, BigInt answer, BigInt remainder);
60 | void BigInt_Power(BigInt n, BigInt exp, BigInt answer);
61 |
62 | /* Logical operator functions */
63 | void BigInt_And(BigInt a, BigInt b, BigInt answer);
64 | void BigInt_Or(BigInt a, BigInt b, BigInt answer);
65 | void BigInt_Xor(BigInt a, BigInt b, BigInt answer);
66 | void BigInt_Shift(BigInt n, int places, BigInt answer); /* Negative 'places' shifts right */
67 | void BigInt_Invert(BigInt n);
68 |
69 | /* Specialized functions */
70 | void BigInt_Modulus(BigInt n, BigInt mod, BigInt answer);
71 | void BigInt_PowerModulus(BigInt n, BigInt exp, BigInt modulus, BigInt answer);
72 | void BigInt_GCD(BigInt n, BigInt m, BigInt answer);
73 | int BigInt_ModularInverse(BigInt n, BigInt m, BigInt answer);
74 | int BigInt_IsEven(BigInt n);
75 | int BigInt_IsOdd(BigInt n);
76 | int BigInt_IsZero(BigInt n);
77 | int BigInt_IsOne(BigInt n);
78 |
79 | /* String functions */
80 | bool BigInt_FromString(const char* source, int base, BigInt dest);
81 | bool BigInt_FromDecString(const char* source, BigInt dest);
82 | bool BigInt_FromHexString(const char* source, BigInt dest);
83 | bool BigInt_ToHexString(BigInt n, char* d);
84 | void BigInt_ToString(BigInt s, int base, char* d);
85 |
86 | #endif
87 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_blowfish.cpp:
--------------------------------------------------------------------------------
1 | #include "keygen_blowfish.h"
2 |
3 | /*
4 | ---------------
5 | Encryption Code
6 | ---------------
7 |
8 | The decryption code is also included here, although it isn't needed for
9 | creating keys.
10 | */
11 |
12 | unsigned long F(CipherKey* bc, unsigned long x)
13 | {
14 | return ((bc->S[0][(x >> 24) & 0xFF] + bc->S[1][(x >> 16) & 0xFF])
15 | ^ bc->S[2][(x >> 8) & 0xFF]) + bc->S[3][x & 0xFF];
16 | }
17 |
18 | void encipher(CipherKey* c, unsigned long* xl, unsigned long* xr)
19 | {
20 | unsigned long Xl = *xl, Xr = *xr, temp;
21 | short i;
22 |
23 | for(i = 0; i < N; ++i)
24 | {
25 | Xl = Xl ^ c->P[i];
26 | Xr = F(c, Xl)^Xr;
27 | temp = Xl;
28 | Xl = Xr;
29 | Xr = temp;
30 | }
31 | temp = Xl;
32 | Xl = Xr;
33 | Xr = temp;
34 | Xr = Xr ^ c->P[N];
35 | Xl = Xl ^ c->P[N + 1];
36 | *xl = Xl;
37 | *xr = Xr;
38 | }
39 |
40 | void decipher(CipherKey* c, unsigned long* xl, unsigned long* xr)
41 | {
42 | unsigned long Xl = *xl, Xr = *xr, temp;
43 | short i;
44 |
45 | for(i = N + 1; i > 1; --i)
46 | {
47 | Xl = Xl ^ c->P[i];
48 | Xr = F(c, Xl)^Xr;
49 | temp = Xl;
50 | Xl = Xr;
51 | Xr = temp;
52 | }
53 | temp = Xl;
54 | Xl = Xr;
55 | Xr = temp;
56 | Xr = Xr ^ c->P[1];
57 | Xl = Xl ^ c->P[0];
58 | *xl = Xl;
59 | *xr = Xr;
60 | }
61 |
62 | void initialize(CipherKey* c, const char* keybytes, int keylength, unsigned long seed)
63 | {
64 | int i, j, k;
65 |
66 | const unsigned long ps[18] =
67 | {
68 | 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,
69 | 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
70 | 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,
71 | };
72 | unsigned long datal = 0, datar = 0;
73 |
74 | /* Initialize P array */
75 | for(i = 0; i < 18; ++i) c->P[i] = ps[i];
76 |
77 | /* Initialize S-boxes with pseudo-random number generator */
78 | InitRandomGenerator(seed);
79 | for(i = 0; i < 4; ++i) for(j = 0; j < 256; ++j) c->S[i][j] = NextRandomNumber();
80 |
81 | for(i = 0, j = 0; i < N + 2; ++i)
82 | {
83 | unsigned long data = 0;
84 | for(k = 0; k < 4; ++k)
85 | {
86 | data = (data << 8) | keybytes[j];
87 | if(++j >= keylength) j = 0;
88 | }
89 | c->P[i] ^= data;
90 | }
91 |
92 | #ifdef DEBUG
93 | printf("PData:\n");
94 | for(i = 0; i < N + 2; i += 2)
95 | {
96 | encipher(c, &datal, &datar);
97 | c->P[i] = datal;
98 | c->P[i + 1] = datar;
99 |
100 | printf(" datal=%08X, datar=%08X\n", datal, datar);
101 | }
102 |
103 | printf("\nSData:\n");
104 | for(i = 0; i < 4; ++i) for(j = 0; j < 256; j += 2)
105 | {
106 | encipher(c, &datal, &datar);
107 | c->S[i][j] = datal;
108 | c->S[i][j + 1] = datar;
109 |
110 | printf(" datal=%08X, datar=%08X\n", datal, datar);
111 | }
112 | #else
113 | for(i = 0; i < N + 2; i += 2)
114 | {
115 | encipher(c, &datal, &datar);
116 | c->P[i] = datal;
117 | c->P[i + 1] = datar;
118 | }
119 | for(i = 0; i < 4; ++i)
120 | {
121 | for(j = 0; j < 256; j += 2)
122 | {
123 | encipher(c, &datal, &datar);
124 | c->S[i][j] = datal;
125 | c->S[i][j + 1] = datar;
126 | }
127 | }
128 | #endif
129 | }
130 |
131 | CipherKey* CreateCipherKey(const char* keybytes, int length)
132 | {
133 | CipherKey* newkey = (CipherKey*)malloc(sizeof(CipherKey));
134 | initialize(newkey, keybytes, length, 0x31415921);
135 | return newkey;
136 | }
137 |
138 | void ReleaseCipherKey(CipherKey* key)
139 | {
140 | free(key);
141 | }
142 |
143 | void Encipher(CipherKey* key, char* buffer, int length)
144 | {
145 | unsigned long* p, *e;
146 | length &= (~0x07); /* Round down to the next-lower multiple of 8 bytes */
147 | for(p = (unsigned long*)buffer, e = p + (length / 4); p < e; p += 2)
148 | encipher(key, p, p + 1);
149 | }
150 |
151 | void Decipher(CipherKey* key, char* buffer, int length)
152 | {
153 | unsigned long* p, *e;
154 | length &= (~0x07); /* Round down to the next-lower multiple of 8 bytes */
155 | for(p = (unsigned long*)buffer, e = p + (length / 4); p < e; p += 2)
156 | decipher(key, p, p + 1);
157 | }
158 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_blowfish.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENBLOWFISH_H
2 | #define _KEYGENBLOWFISH_H
3 |
4 | #include "keygen_random.h"
5 |
6 | #include
7 |
8 | const int MAXKEYBYTES = 56; /* 448-bit maximum key; additional bits ignored. */
9 | const int N = 16;
10 |
11 | typedef struct CipherKeyStruct
12 | {
13 | unsigned long S[4][256];
14 | unsigned long P[18];
15 | } CipherKey;
16 |
17 | unsigned long F(CipherKey* bc, unsigned long x);
18 | void encipher(CipherKey* c, unsigned long* xl, unsigned long* xr);
19 | void decipher(CipherKey* c, unsigned long* xl, unsigned long* xr);
20 | void initialize(CipherKey* c, const char* keybytes, int keylength, unsigned long seed);
21 | CipherKey* CreateCipherKey(const char* keybytes, int length);
22 | void ReleaseCipherKey(CipherKey* key);
23 | void Encipher(CipherKey* key, char* buffer, int length);
24 | void Decipher(CipherKey* key, char* buffer, int length);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_crc32.cpp:
--------------------------------------------------------------------------------
1 | #include "keygen_crc32.h"
2 |
3 | /*
4 | ------------
5 | CRC Function
6 | ------------
7 |
8 | Note that this function does not release its allocated memory (table32). The
9 | code assumes that the operating system releases all of a program's allocated
10 | memory when the program exits. If your system does not, you must explicitly
11 | add a function to release it, and call it before your program exits.
12 | */
13 |
14 | CRC32* table32 = 0;
15 |
16 | unsigned long reflect(unsigned long source, int b)
17 | {
18 | unsigned long sourcemask = 0x01, targetmask = (0x01 << (b - 1)), target = 0;
19 | while(targetmask)
20 | {
21 | if(source & sourcemask) target |= targetmask;
22 | sourcemask <<= 1;
23 | targetmask >>= 1;
24 | }
25 | return target;
26 | }
27 |
28 | /* 'calc' is the macro for the actual CRC calculations. */
29 | #define calc(crc, table, c) { crc=table[alphamask&(*c^crc)]^(crc>>8); }
30 |
31 | CRC32 crc32(const char* s, unsigned long length, CRC32 crc)
32 | {
33 | const int BITS = 32;
34 | const int alphabits = 8; /* Number of bits in a character */
35 | const int alphabet = (1L << alphabits); /* Number of symbols in table */
36 | const int alphamask = (alphabet - 1); /* Mask for these bits */
37 | const CRC32 poly32 = 0x04C11DB7; /* CRC32 standard */
38 | const CRC32 topbit = (CRC32)(1L << (BITS - 1));
39 | const char* c, *e;
40 | int x, b;
41 | CRC32 r;
42 |
43 | if(!table32)
44 | {
45 | table32 = (CRC32*)malloc(alphabet * sizeof(CRC32));
46 | for(x = 0; x < alphabet; ++x)
47 | {
48 | r = reflect(x, alphabits) << (BITS - alphabits);
49 | for(b = 0; b < alphabits; ++b)
50 | {
51 | if(r & topbit)
52 | r = (r << 1)^poly32;
53 | else
54 | r <<= 1;
55 | }
56 | table32[x] = (CRC32)(reflect(r, BITS));
57 | }
58 | }
59 |
60 | for(c = s, e = s + length; c < e; ++c)
61 | calc(crc, table32, c);
62 | return crc;
63 | }
64 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_crc32.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENCRC32_H
2 | #define _KEYGENCRC32_H
3 |
4 | #include
5 |
6 | typedef unsigned long CRC32;
7 | const CRC32 NewCRC32 = 0xFFFFFFFF;
8 |
9 | unsigned long reflect(unsigned long source, int b);
10 | CRC32 crc32(const char* s, unsigned long length, CRC32 crc);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_info.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENINFO_H
2 | #define _KEYGENINFO_H
3 |
4 | #include "keygen_misc.h"
5 | #include "keygen_blowfish.h"
6 | #include "keygen_bigint.h"
7 | #include "keygen_crc32.h"
8 |
9 | #include
10 | #include
11 |
12 | /*
13 | -----------------------------------------------
14 | Key information functions, to take a key apart.
15 | -----------------------------------------------
16 | */
17 |
18 | struct KeyInformation
19 | {
20 | unsigned short createdyear, createdmonth, createdday;
21 | unsigned short otherinfo[5];
22 | unsigned long symkey;
23 | unsigned long uninstallcode;
24 | char keystring[256];
25 | int keystring_length;
26 | };
27 |
28 | int hexdigit(char c);
29 | const char* GetTwoHexDigits(const char* c, unsigned char* value);
30 | char RetrieveKeyInfo(int level_input, const char* name_, unsigned long hardwareID, const char* origkey_, struct KeyInformation* keyinfo, HWND hwndDlg, UINT control_id);
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_main.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENMAIN_H
2 | #define _KEYGENMAIN_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #define USECLOCKTICKS
11 | #include "keygen_misc.h"
12 | #include "keygen_bigint.h"
13 | #include "keygen_md5.h"
14 | #include "keygen_random.h"
15 | #include "keygen_ecc.h"
16 | #include "keygen_blowfish.h"
17 | #include "keygen_crc32.h"
18 | #include "keygen_info.h"
19 |
20 | #define KS_V1 -1
21 | #define KS_V2 0
22 | #define KS_V3 1
23 | #define KS_SHORTV3 2
24 |
25 | extern const int primeoffsetcount, primeoffsets[];
26 |
27 | const char* CreateKey(unsigned int symmetric_key, unsigned int sym_xor, const char* regname, unsigned short otherinfo, unsigned long hardwareID, short today, HWND log);
28 | unsigned char* AddByte(unsigned char* c, unsigned char n);
29 | unsigned char* AddShort(unsigned char* c, unsigned short n);
30 | unsigned char* AddLong(unsigned char* c, unsigned long n);
31 | void mystrrev(char* str);
32 | CRC32 GetKeyCRC(char* keytext, int period);
33 | void GetKeyMD5(unsigned long* i, const char* keytext, int period);
34 | void GenerateKeyNumberFromString(char* string, BigInt p, BigInt* keynumber, int keysystem, int v3level);
35 | int MakeEccSignature(unsigned char* keybytes, int* keylength, char* name_to_make_key_for, int level, const char* prvt_text, const char* public_text, bool baboon, HWND log);
36 | int MakeSignature(unsigned char* keybytes, int* keylength, char* name_encryptkey, int level, const char* pvt_kg_txt, const char* y_kg_txt, bool baboon, HWND log);
37 | void EncryptSignedKey(unsigned char* keybytes, int keylength, char* encryptkey, HWND log);
38 | const char* CreateSignedKey(int level, unsigned int symmetric_key, unsigned int sym_xor, const char* pvt_kg_txt, const char* y_kg_txt, const char* keystring, short today, const char* _name_to_make_key_for, unsigned long hardwareID, unsigned short otherinfo1, unsigned short otherinfo2, unsigned short otherinfo3, unsigned short otherinfo4, unsigned short otherinfo5, bool baboon, HWND log = 0);
39 | unsigned short MakeDate(unsigned int year, unsigned int month, unsigned int day);
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_md5.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENMD5_H
2 | #define _KEYGENMD5_H
3 |
4 | #include
5 |
6 | void TransformBlock(unsigned long* i, const unsigned char* in);
7 | void md5(unsigned long* i, const void* bytes, unsigned long length);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_misc.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENMISC_H
2 | #define _KEYGENMISC_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | void AddLogMessage(HWND log, const char* m, bool first);
9 | int ByteArray2String(unsigned char* s, char* d, int s_len, int d_len);
10 | int String2ByteArray(const char* s, unsigned char* d, int d_len);
11 | void CookText(char* target, const char* source);
12 | void InterpretDate(unsigned short keymade, unsigned short* year, unsigned short* month, unsigned short* day);
13 | unsigned long hextoint(const char* string);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_random.cpp:
--------------------------------------------------------------------------------
1 | #include "keygen_random.h"
2 |
3 | /*
4 | -------------
5 | GetRandomSeed
6 | -------------
7 |
8 | The GetRandomSeed function is designed to seed the random number generator.
9 | For compatibility with various standard C libraries, we can only make a
10 | unique seed once every second. If you need to create signed keys faster
11 | than that, and ensure that they are unique, then you'll have to customize
12 | this function to either use something that increments more quickly, or that
13 | stores the result somewhere to ensure that it never returns the same value
14 | twice. We've included a preprocessor definition, USECLOCKTICKS, that
15 | attempts to do this using the clock() function, but it may not work on all
16 | platforms.
17 | */
18 |
19 | unsigned long GetRandomSeed(void)
20 | {
21 | #ifdef FOR_TESTING
22 | return 1000;
23 | #else
24 | #ifdef USECLOCKTICKS
25 | return (unsigned long)time(0) + clock();
26 | #else
27 | return (unsigned long)time(0);
28 | #endif
29 | #endif
30 | }
31 |
32 |
33 |
34 | /*
35 | -------------------------------
36 | Pseudo-Random Number Generators
37 | -------------------------------
38 | */
39 |
40 | #define m 100000000L
41 | #define m1 10000L
42 | #define b 31415821L
43 |
44 | unsigned long a;
45 | unsigned long aa[4];
46 |
47 | unsigned long mult(long p, long q)
48 | {
49 | unsigned long p1 = p / m1, p0 = p % m1, q1 = q / m1, q0 = q % m1;
50 | return (((p0 * q1 + p1 * q0) % m1) * m1 + p0 * q0) % m;
51 | }
52 |
53 | void InitRandomGenerator(unsigned long seed)
54 | {
55 | a = seed;
56 | }
57 |
58 | unsigned long NextRandomRange(long range)
59 | {
60 | a = (mult(a, b) + 1) % m;
61 | return (((a / m1) * range) / m1);
62 | }
63 |
64 | unsigned long NextRandomNumber(void)
65 | {
66 | long n1 = NextRandomRange(256);
67 | long n2 = NextRandomRange(256);
68 | long n3 = NextRandomRange(256);
69 | long n4 = NextRandomRange(256);
70 | return (n1 << 24) | (n2 << 16) | (n3 << 8) | n4;
71 | }
72 |
73 | /* Improved version, for ECC keys */
74 |
75 | void InitRandomGenerator128(unsigned long* seed)
76 | {
77 | memcpy(aa, seed, sizeof(unsigned long) * 4);
78 | }
79 |
80 | void NextRandomNumber128(unsigned long* i)
81 | {
82 | /* Take the existing four double-words and print some form of them to a
83 | string. Then do the same with a new seed value. Then create the MD5
84 | signature of that string -- that's the new 128-bit number. */
85 | unsigned long ii[5];
86 | char string[256], *c;
87 | int x, y;
88 |
89 | memcpy(ii, aa, sizeof(unsigned long) * 4);
90 | ii[4] = GetRandomSeed();
91 |
92 | c = string;
93 | for(x = 0; x < 5; ++x)
94 | {
95 | for(y = 0; y < 8; ++y)
96 | {
97 | *c++ = (char)('A' + (ii[x] & 0x0F));
98 | ii[x] >>= 4;
99 | }
100 | }
101 | md5(aa, string, c - string);
102 | memcpy(i, aa, sizeof(unsigned long) * 4);
103 | }
104 |
105 | #undef b
106 | #undef m1
107 | #undef m
108 |
--------------------------------------------------------------------------------
/functions/keygen/keygen_random.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENRANDOM_H
2 | #define _KEYGENRANDOM_H
3 |
4 | #define USECLOCKTICKS
5 |
6 | #include "keygen_md5.h"
7 |
8 | #include
9 | #include
10 |
11 | unsigned long GetRandomSeed(void);
12 |
13 | unsigned long mult(long p, long q);
14 | void InitRandomGenerator(unsigned long seed);
15 | unsigned long NextRandomRange(long range);
16 | unsigned long NextRandomNumber(void);
17 | void InitRandomGenerator128(unsigned long* seed);
18 | void NextRandomNumber128(unsigned long* i);
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/functions/keygenerate.h:
--------------------------------------------------------------------------------
1 | #ifndef _KEYGENERATE_H
2 | #define _KEYGENERATE_H
3 |
4 | #include "_global.h"
5 | #include "help_dialog.h"
6 |
7 | void KG_GenerateEcdsaParameters(const char* encryptiontemplate, char* private_text, char* basepoint_text, char* public_x_text, char* public_y_text);
8 | bool KG_GeneratePvtY(int level, char* keytemplate, char* pvt_text, char* y_text);
9 | unsigned int KG_GenerateSymmetric(int level, char* encryption_template);
10 | BOOL CALLBACK KG_DlgKeyGenerate(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/main.h:
--------------------------------------------------------------------------------
1 | #ifndef _MAIN_H
2 | #define _MAIN_H
3 |
4 | #define _WIN32_WINNT 0x0501
5 | #define WINVER 0x0501
6 | #define _WIN32_IE 0x0500
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include "resource.h"
13 | #include "tabs.h"
14 |
15 | #include "functions/_global.h"
16 |
17 | #include "functions/help_dialog.h"
18 | #include "functions/about.h"
19 | #include "functions/CertTool_dialog.h"
20 | #include "functions/encdec.h"
21 | #include "functions/InlineHelper_dialog.h"
22 | #include "functions/InlineHelper_plugins.h"
23 | #include "functions/keygenerate.h"
24 | #include "functions/Misc_dialog.h"
25 | #include "functions/EVLog_maindlg.h"
26 | #include "functions/analysis.h"
27 | #include "functions/VersionFind_dialog.h"
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/new_inline_templ.asm:
--------------------------------------------------------------------------------
1 | <$.%X>
2 | pushad
3 | call @f
4 | @@:
5 | pop ebp
6 | sub ebp, %X ; newentry+5-imagebase
7 |
8 | ; Store imagebase
9 | call @f
10 | @getimagebase:
11 | mov ebp, 0FFFFFFFF
12 | ret
13 | @@:
14 | pop eax
15 | mov dword ptr ds:[eax+1],ebp
16 |
17 | ; Get API addresses
18 | mov ebx, dword ptr ds:[ebp+%X] ; OutputDebugStringA
19 | lea esi, dword ptr ds:[ebp+%X] ; VirtualProtect
20 |
21 | ; change page protection
22 | call @f
23 | "\x00\x00\x00\x00" ; oldprotect
24 | @@:
25 | push 40 ; newprotect
26 | push 50 ; size
27 | push ebx ; OutputDebugStringA
28 | call dword ptr ds:[esi] ; VirtualProtect
29 |
30 | ; IAT Hook VirtualProtect
31 | call @vp_hook_end
32 |
33 | @hook_VirtualProtect:
34 | pushad
35 | pushfd
36 | call @getimagebase
37 |
38 | ; restore IAT hook
39 | push esi
40 | push eax
41 | lea esi, dword ptr ds:[ebp+%X] ; VirtualProtect
42 | call @getvirtualprotect
43 | xchg dword ptr ds:[esi],eax
44 | pop eax
45 | pop esi
46 |
47 | ; go to the user code
48 | jmp @usercode
49 |
50 | @vp_hook_end:
51 | pop ebp
52 | xchg dword ptr ds:[esi],ebp
53 |
54 | ; store old VirtualProtect
55 | call @f
56 | @getvirtualprotect:
57 | mov eax,0FFFFFFFF
58 | ret
59 | @@:
60 | pop eax
61 | mov dword ptr ds:[eax+1],ebp
62 |
63 | ; hook OutputDebugStringA
64 | call @od_skip
65 | @od_original_bytes:
66 | call @f
67 | "\x90\x90\x90\x90\x90"
68 | @@:
69 | jmp short @od_hook_back
70 | @od_skip:
71 | pop edi
72 | add edi,5
73 | mov esi,ebx
74 | mov ecx,5
75 | rep movs byte ptr es:[edi],byte ptr ds:[esi]
76 | sub esi,5
77 | mov byte ptr ds:[esi],0E9
78 | call @od_hook_end
79 |
80 | @hook_OutputDebugStringA:
81 | call @f
82 | "\x%02X" ;counter
83 | @@:
84 | pop eax
85 | dec byte ptr ds:[eax]
86 | jz short @od_execute_hook
87 | xor eax,eax
88 | inc eax
89 | ret 4
90 | @od_execute_hook:
91 | push edi
92 | push esi
93 | push ecx
94 | push ebp
95 | jmp short @od_original_bytes
96 | @od_hook_back:
97 | pop esi
98 | call @getimagebase
99 | mov eax,dword ptr ds:[ebp+%X] ; OutputDebugStringA
100 | mov edi,eax
101 | mov ecx,5
102 | rep movs byte ptr es:[edi],byte ptr ds:[esi]
103 | pop ebp
104 | pop ecx
105 | pop esi
106 | pop edi
107 |
108 | ; patch CRC values
109 | push eax
110 | %s
111 | pop eax
112 |
113 | jmp eax ; OutputDebugStringA
114 |
115 | ; continue hooking OutputDebugStringA
116 | @od_hook_end:
117 | pop eax
118 | sub eax,5
119 | sub eax,esi
120 | mov dword ptr ds:[esi+1],eax
121 |
122 | ; restore registers and jmp to oep
123 | popad
124 | jmp $.%X ;rva of oep
125 |
126 | @usercode:
127 | ;PLACE YOUR CODE AFTER THIS (security base is in %s, imagebase in EBP)
128 | ;PLACE YOUR CODE BEFORE THIS
129 | popfd
130 | popad
131 | call @getvirtualprotect
132 | jmp eax
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/Arma_InlineHelper_Plugin_ECDSA_Replace.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/ECDSA_Full_Replace.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {883B09E7-8DBB-4FEE-B92B-487CFC6A95A9}
11 | ECDSA_Full_Replace
12 | ECDSA_Replace
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/ECDSA_Full_Replace.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 | Header Files
36 |
37 |
38 | Header Files
39 |
40 |
41 | Header Files
42 |
43 |
44 | Header Files
45 |
46 |
47 | Header Files
48 |
49 |
50 | Header Files
51 |
52 |
53 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/ECDSA_Full_Replace.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/src/format.h:
--------------------------------------------------------------------------------
1 | #define base_code_format "\0lea edi, dword ptr ds:[%s+0x%X]\r\n\
2 | mov byte ptr ds:[edi],0xE9\r\n\
3 | lea ebx, dword ptr es:[@cert_replace]\r\n\
4 | sub ebx,edi\r\n\
5 | lea ebx, dword ptr ds:[ebx-5]\r\n\
6 | mov dword ptr ds:[edi+1],ebx\r\n\
7 | lea edi, dword ptr ds:[%s+0x%X]\r\n\
8 | mov word ptr ds:[edi],0xB890\r\n\
9 | mov dword ptr ds:[edi+2],0x%s"
10 |
11 | #define base_code_format2 "\0lea edi, dword ptr ds:[%s+0x%X]\r\n\
12 | mov byte ptr ds:[edi],0xE9\r\n\
13 | lea ebx, dword ptr es:[@cert_replace]\r\n\
14 | sub ebx,edi\r\n\
15 | lea ebx, dword ptr ds:[ebx-5]\r\n\
16 | mov dword ptr ds:[edi+1],ebx\r\n"
17 |
18 | #define repl_code_format "\0@cert_replace:\r\n\
19 | cmp dword ptr ds:[eax],0x%s\r\n\
20 | je @do_job\r\n\
21 | ret\r\n\
22 | @do_job:\r\n\
23 | pushad\r\n\
24 | lea edi,dword ptr ds:[eax+0x%s]\r\n\
25 | lea esi,dword ptr ds:[@public]\r\n\
26 | mov ecx,0x%X\r\n\
27 | rep movsb\r\n\
28 | popad\r\n\
29 | ret\r\n\
30 | @public:\r\n\
31 | \"%s\\0\""
32 |
33 | #define repl_code_format2 "\0@cert_replace:\r\n\
34 | cmp dword ptr ds:[eax],0x%s\r\n\
35 | je @do_job\r\n\
36 | ret\r\n\
37 | @do_job:\r\n\
38 | pushad\r\n\
39 | mov byte ptr ds:[eax+2],0x%s\r\n\
40 | lea edi,dword ptr ds:[eax+0x%s]\r\n\
41 | lea esi,dword ptr ds:[@public]\r\n\
42 | mov ecx,0x%X\r\n\
43 | rep movsb\r\n\
44 | popad\r\n\
45 | ret\r\n\
46 | @public:\r\n\
47 | \"%s\\0\""
48 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/src/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 | #include "format.h"
9 |
10 | #define DLL_EXPORT extern "C" __declspec(dllexport)
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/src/random.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include "md5.h"
3 |
4 | /*
5 | -------------
6 | GetRandomSeed
7 | -------------
8 |
9 | The GetRandomSeed function is designed to seed the random number generator.
10 | For compatibility with various standard C libraries, we can only make a
11 | unique seed once every second. If you need to create signed keys faster
12 | than that, and ensure that they are unique, then you'll have to customize
13 | this function to either use something that increments more quickly, or that
14 | stores the result somewhere to ensure that it never returns the same value
15 | twice. We've included a preprocessor definition, USECLOCKTICKS, that
16 | attempts to do this using the clock() function, but it may not work on all
17 | platforms.
18 | */
19 |
20 | static unsigned long GetRandomSeed(void)
21 | {
22 | #ifdef FOR_TESTING
23 | return 1000;
24 | #else
25 | #ifdef USECLOCKTICKS
26 | return time(0) + clock();
27 | #else
28 | return time(0);
29 | #endif
30 | #endif
31 | }
32 |
33 |
34 |
35 | /*
36 | -------------------------------
37 | Pseudo-Random Number Generators
38 | -------------------------------
39 | */
40 |
41 | #define m 100000000L
42 | #define m1 10000L
43 | #define b 31415821L
44 |
45 | static unsigned long a;
46 |
47 | static unsigned long mult(long p, long q)
48 | {
49 | unsigned long p1 = p / m1, p0 = p % m1, q1 = q / m1, q0 = q % m1;
50 | return (((p0 * q1 + p1 * q0) % m1) * m1 + p0 * q0) % m;
51 | }
52 |
53 | static void InitRandomGenerator(unsigned long seed)
54 | {
55 | a = seed;
56 | }
57 |
58 | static unsigned long NextRandomRange(long range)
59 | {
60 | a = (mult(a, b) + 1) % m;
61 | return (((a / m1) * range) / m1);
62 | }
63 |
64 | static unsigned long NextRandomNumber(void)
65 | {
66 | long n1 = NextRandomRange(256);
67 | long n2 = NextRandomRange(256);
68 | long n3 = NextRandomRange(256);
69 | long n4 = NextRandomRange(256);
70 | return (n1 << 24) | (n2 << 16) | (n3 << 8) | n4;
71 | }
72 |
73 | /* Improved version, for ECC keys */
74 |
75 | static unsigned long aa[4];
76 |
77 | static void InitRandomGenerator128(unsigned long* seed)
78 | {
79 | memcpy(aa, seed, sizeof(unsigned long) * 4);
80 | }
81 |
82 | static void NextRandomNumber128(unsigned long* i)
83 | {
84 | /* Take the existing four double-words and print some form of them to a
85 | string. Then do the same with a new seed value. Then create the MD5
86 | signature of that string -- that's the new 128-bit number. */
87 | unsigned long ii[5];
88 | char string[256], *c;
89 | int x, y;
90 |
91 | memcpy(ii, aa, sizeof(unsigned long) * 4);
92 | ii[4] = GetRandomSeed();
93 |
94 | c = string;
95 | for(x = 0; x < 5; ++x)
96 | {
97 | for(y = 0; y < 8; ++y)
98 | {
99 | *c++ = (char)('A' + (ii[x] & 0x0F));
100 | ii[x] >>= 4;
101 | }
102 | }
103 | md5(aa, string, c - string);
104 | memcpy(i, aa, sizeof(unsigned long) * 4);
105 | }
106 |
107 | #undef b
108 | #undef m1
109 | #undef m
110 |
111 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/src/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE_BASE 1001
7 | #define IDC_BTN_COPY_BASE 1002
8 | #define IDC_EDT_CODE_REPL 1003
9 | #define IDC_BTN_COPY_REPL 1004
10 | #define IDC_BTN_SAVE 1005
11 | #define IDC_BTN_ABOUT 1007
12 | #define IDC_EDT_PUBVALS_OLD 1008
13 | #define IDC_EDT_PUBVALS_OLD_LEN 1009
14 | #define IDC_EDT_PUBVALS_NEW 1010
15 | #define IDC_EDT_PUBVALS_NEW_LEN 1011
16 | #define IDC_CHK_PROJECTID 1012
17 | #define IDC_EDT_TEMPLATE 1013
18 | #define IDC_LIST_CERTS 1014
19 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Full_Replace/src/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.11
2 | // Copyright (C) 2006-2012
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 359, 356
18 | STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_GROUP | WS_POPUP | WS_SYSMENU
19 | EXSTYLE WS_EX_ACCEPTFILES
20 | CAPTION "ECDSA Replace Full"
21 | FONT 8, "Courier New"
22 | {
23 | PUSHBUTTON "&Copy", IDC_BTN_COPY_BASE, 144, 340, 31, 10
24 | EDITTEXT IDC_EDT_TEMPLATE, 4, 187, 350, 12, ES_AUTOHSCROLL | ES_READONLY
25 | EDITTEXT IDC_EDT_CODE_BASE, 4, 237, 171, 100, ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
26 | EDITTEXT IDC_EDT_CODE_REPL, 182, 237, 171, 100, WS_HSCROLL | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_READONLY
27 | PUSHBUTTON "C&opy", IDC_BTN_COPY_REPL, 182, 340, 31, 10
28 | LTEXT "Base Code:", IDC_STATIC, 4, 227, 40, 8, SS_LEFT
29 | LTEXT "Replace Code:", IDC_STATIC, 182, 227, 53, 8, SS_LEFT
30 | LTEXT "Certificates:", IDC_STATIC, 4, 3, 53, 8, SS_LEFT
31 | PUSHBUTTON "A&bout", IDC_BTN_ABOUT, 316, 340, 37, 13
32 | EDITTEXT IDC_EDT_PUBVALS_OLD, 4, 162, 333, 12, ES_AUTOHSCROLL | ES_READONLY
33 | EDITTEXT IDC_EDT_PUBVALS_NEW, 4, 212, 333, 12, ES_AUTOHSCROLL | ES_READONLY
34 | LTEXT "Original Value:", IDC_STATIC, 4, 152, 61, 8, SS_LEFT
35 | LTEXT "Replace Value:", IDC_STATIC, 4, 202, 57, 8, SS_LEFT
36 | EDITTEXT IDC_EDT_PUBVALS_OLD_LEN, 339, 162, 14, 12, ES_READONLY
37 | EDITTEXT IDC_EDT_PUBVALS_NEW_LEN, 339, 212, 14, 12, ES_READONLY
38 | LTEXT "Len:", IDC_STATIC, 338, 152, 15, 8, SS_LEFT
39 | LTEXT "Len:", IDC_STATIC, 338, 202, 15, 8, SS_LEFT
40 | AUTOCHECKBOX "New Project&ID", IDC_CHK_PROJECTID, 291, 227, 62, 8
41 | LTEXT "Template:", IDC_STATIC, 4, 177, 54, 8, SS_LEFT
42 | LISTBOX IDC_LIST_CERTS, 4, 17, 350, 117, WS_TABSTOP | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
43 | PUSHBUTTON "Save Info", IDC_BTN_SAVE, 308, 137, 46, 12
44 | }
45 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/Arma_InlineHelper_Plugin_ECDSA_Replace.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/ECDSA_Replace.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {7A8400CF-5473-461A-A880-EE1DD0F5EFD0}
11 | ECDSA_Replace
12 | ECDSA_Replace_Old
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/ECDSA_Replace.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 | Header Files
36 |
37 |
38 | Header Files
39 |
40 |
41 | Header Files
42 |
43 |
44 | Header Files
45 |
46 |
47 | Header Files
48 |
49 |
50 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/ECDSA_Replace.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/src/format.h:
--------------------------------------------------------------------------------
1 | #define base_code_format "lea edi, dword ptr ds:[%s+0x%X]\r\n\
2 | mov byte ptr ds:[edi],0xE9\r\n\
3 | call @cert_replace_end\r\n\
4 | %s\r\n\
5 | @cert_replace_end:\r\n\
6 | pop ebx\r\n\
7 | sub ebx,edi\r\n\
8 | lea ebx, dword ptr ds:[ebx-5]\r\n\
9 | mov dword ptr ds:[edi+1],ebx\r\n\
10 | lea edi, dword ptr ds:[%s+0x%X]\r\n\
11 | mov word ptr ds:[edi],0xB890\r\n\
12 | mov dword ptr ds:[edi+2],0x%s"
13 |
14 | #define base_code_format2 "lea edi, dword ptr ds:[%s+0x%X]\r\n\
15 | mov byte ptr ds:[edi],0xE9\r\n\
16 | call @cert_replace_end\r\n\
17 | %s\r\n\
18 | @cert_replace_end:\r\n\
19 | pop ebx\r\n\
20 | sub ebx,edi\r\n\
21 | lea ebx, dword ptr ds:[ebx-5]\r\n\
22 | mov dword ptr ds:[edi+1],ebx\r\n"
23 |
24 | #define repl_code_format2 "cmp dword ptr ds:[eax],0x%s\r\n\
25 | je short @do_job\r\n\
26 | ret\r\n\
27 | @do_job:\r\n\
28 | pushad\r\n\
29 | lea edi,dword ptr ds:[eax+0x%s]\r\n\
30 | call @f\r\n\
31 | \"%s\\0\"\r\n\
32 | @@:\r\n\
33 | pop esi\r\n\
34 | mov ecx,0x%X\r\n\
35 | rep movsb\r\n\
36 | popad\r\n\
37 | ret"
38 |
39 | #define repl_code_format "cmp dword ptr ds:[eax],0x%s\r\n\
40 | je short @do_job\r\n\
41 | ret\r\n\
42 | @do_job:\r\n\
43 | pushad\r\n\
44 | mov byte ptr ds:[eax+0x%X],0x%s\r\n\
45 | lea edi,dword ptr ds:[eax+0x%s]\r\n\
46 | call @f\r\n\
47 | \"%s\\0\"\r\n\
48 | @@:\r\n\
49 | pop esi\r\n\
50 | mov ecx,0x%X\r\n\
51 | rep movsb\r\n\
52 | popad\r\n\
53 | ret"
54 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/src/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 | #include "format.h"
9 |
10 | #define DLL_EXPORT extern "C" __declspec(dllexport)
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/src/random.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include "md5.h"
3 |
4 | /*
5 | -------------
6 | GetRandomSeed
7 | -------------
8 |
9 | The GetRandomSeed function is designed to seed the random number generator.
10 | For compatibility with various standard C libraries, we can only make a
11 | unique seed once every second. If you need to create signed keys faster
12 | than that, and ensure that they are unique, then you'll have to customize
13 | this function to either use something that increments more quickly, or that
14 | stores the result somewhere to ensure that it never returns the same value
15 | twice. We've included a preprocessor definition, USECLOCKTICKS, that
16 | attempts to do this using the clock() function, but it may not work on all
17 | platforms.
18 | */
19 |
20 | static unsigned long GetRandomSeed(void)
21 | {
22 | #ifdef FOR_TESTING
23 | return 1000;
24 | #else
25 | #ifdef USECLOCKTICKS
26 | return time(0) + clock();
27 | #else
28 | return time(0);
29 | #endif
30 | #endif
31 | }
32 |
33 |
34 |
35 | /*
36 | -------------------------------
37 | Pseudo-Random Number Generators
38 | -------------------------------
39 | */
40 |
41 | #define m 100000000L
42 | #define m1 10000L
43 | #define b 31415821L
44 |
45 | static unsigned long a;
46 |
47 | static unsigned long mult(long p, long q)
48 | {
49 | unsigned long p1 = p / m1, p0 = p % m1, q1 = q / m1, q0 = q % m1;
50 | return (((p0 * q1 + p1 * q0) % m1) * m1 + p0 * q0) % m;
51 | }
52 |
53 | static void InitRandomGenerator(unsigned long seed)
54 | {
55 | a = seed;
56 | }
57 |
58 | static unsigned long NextRandomRange(long range)
59 | {
60 | a = (mult(a, b) + 1) % m;
61 | return (((a / m1) * range) / m1);
62 | }
63 |
64 | static unsigned long NextRandomNumber(void)
65 | {
66 | long n1 = NextRandomRange(256);
67 | long n2 = NextRandomRange(256);
68 | long n3 = NextRandomRange(256);
69 | long n4 = NextRandomRange(256);
70 | return (n1 << 24) | (n2 << 16) | (n3 << 8) | n4;
71 | }
72 |
73 | /* Improved version, for ECC keys */
74 |
75 | static unsigned long aa[4];
76 |
77 | static void InitRandomGenerator128(unsigned long* seed)
78 | {
79 | memcpy(aa, seed, sizeof(unsigned long) * 4);
80 | }
81 |
82 | static void NextRandomNumber128(unsigned long* i)
83 | {
84 | /* Take the existing four double-words and print some form of them to a
85 | string. Then do the same with a new seed value. Then create the MD5
86 | signature of that string -- that's the new 128-bit number. */
87 | unsigned long ii[5];
88 | char string[256], *c;
89 | int x, y;
90 |
91 | memcpy(ii, aa, sizeof(unsigned long) * 4);
92 | ii[4] = GetRandomSeed();
93 |
94 | c = string;
95 | for(x = 0; x < 5; ++x)
96 | {
97 | for(y = 0; y < 8; ++y)
98 | {
99 | *c++ = (char)('A' + (ii[x] & 0x0F));
100 | ii[x] >>= 4;
101 | }
102 | }
103 | md5(aa, string, c - string);
104 | memcpy(i, aa, sizeof(unsigned long) * 4);
105 | }
106 |
107 | #undef b
108 | #undef m1
109 | #undef m
110 |
111 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/src/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE 1000
7 | #define IDC_LIST_CERTS 1005
8 | #define IDC_BTN_ABOUT 1007
9 | #define IDC_EDT_PUBVALS_OLD 1008
10 | #define IDC_EDT_PUBVALS_OLD_LEN 1009
11 | #define IDC_EDT_PUBVALS_NEW 1010
12 | #define IDC_EDT_PUBVALS_NEW_LEN 1011
13 | #define IDC_CHK_PROJECTID 1012
14 | #define IDC_EDT_TEMPLATE 1013
15 | #define IDC_BTN_COPY_CODE 1014
16 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Replace/src/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.11
2 | // Copyright (C) 2006-2012
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 359, 242
18 | STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_GROUP | WS_POPUP | WS_SYSMENU
19 | EXSTYLE WS_EX_ACCEPTFILES
20 | CAPTION "ECDSA_Replace"
21 | FONT 8, "Courier New"
22 | {
23 | EDITTEXT IDC_EDT_TEMPLATE, 4, 67, 349, 12, ES_AUTOHSCROLL
24 | EDITTEXT IDC_EDT_CODE, 4, 123, 349, 100, WS_HSCROLL | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_READONLY
25 | PUSHBUTTON "C&opy", IDC_BTN_COPY_CODE, 4, 225, 31, 10
26 | COMBOBOX IDC_LIST_CERTS, 4, 16, 350, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
27 | LTEXT "Inline Code:", IDC_STATIC, 4, 113, 53, 8, SS_LEFT
28 | LTEXT "Certificate:", IDC_STATIC, 4, 5, 49, 8, SS_LEFT
29 | PUSHBUTTON "A&bout", IDC_BTN_ABOUT, 320, 227, 37, 13
30 | EDITTEXT IDC_EDT_PUBVALS_OLD, 4, 42, 333, 12, ES_AUTOHSCROLL | ES_READONLY
31 | EDITTEXT IDC_EDT_PUBVALS_NEW, 4, 92, 333, 12, ES_AUTOHSCROLL | ES_READONLY
32 | LTEXT "Original Value:", IDC_STATIC, 4, 32, 61, 8, SS_LEFT
33 | LTEXT "Replace With:", IDC_STATIC, 4, 82, 54, 8, SS_LEFT
34 | EDITTEXT IDC_EDT_PUBVALS_OLD_LEN, 339, 42, 14, 12, ES_READONLY
35 | EDITTEXT IDC_EDT_PUBVALS_NEW_LEN, 339, 92, 14, 12, ES_READONLY
36 | LTEXT "Len:", IDC_STATIC, 339, 32, 15, 8, SS_LEFT
37 | LTEXT "Len:", IDC_STATIC, 339, 82, 15, 8, SS_LEFT
38 | AUTOCHECKBOX "New Project&ID", IDC_CHK_PROJECTID, 291, 111, 62, 8
39 | LTEXT "Template:", IDC_STATIC, 4, 57, 54, 8, SS_LEFT
40 | }
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/Arma_InlineHelper_Plugin_ECDSA_Verify.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/ECDSA_Verify.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {85D8F26C-67F9-4B9C-9779-137ED5844F26}
11 | ECDSA_Verify
12 | ECDSA_Verify
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/ECDSA_Verify.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/ECDSA_Verify.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE 1001
7 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_ECDSA_Verify/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.9
2 | // Copyright (C) 2006-2011
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 186, 42
18 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
19 | CAPTION "ECDSA_Verify"
20 | FONT 8, "Courier New"
21 | {
22 | EDITTEXT IDC_EDT_CODE, 3, 5, 179, 22, ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
23 | CTEXT "Created by Mr. eXoDia // T.P.o.D.T 2012", IDC_STATIC, 3, 31, 178, 8, SS_CENTER
24 | }
25 |
26 |
27 |
28 | //
29 | // Manifest resources
30 | //
31 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
32 | 1 RT_MANIFEST ".\\manifest.xml"
33 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/Arma_InlineHelper_Plugin_EnableInfo.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/EnableInfo.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {551E5EBE-0580-4372-BF74-F8F27E164789}
11 | EnableInfo
12 | EnableInfo
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/EnableInfo.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/EnableInfo.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE 1001
7 | #define IDC_BTN_COPY 1002
8 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableInfo/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.11
2 | // Copyright (C) 2006-2012
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 144, 59
18 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
19 | CAPTION "EnableInfo"
20 | FONT 8, "Courier New"
21 | {
22 | EDITTEXT IDC_EDT_CODE, 3, 5, 139, 36, ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
23 | DEFPUSHBUTTON "&Copy", IDC_BTN_COPY, 50, 45, 43, 12
24 | }
25 |
26 |
27 |
28 | //
29 | // Manifest resources
30 | //
31 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
32 | 1 RT_MANIFEST ".\\manifest.xml"
33 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/Arma_InlineHelper_Plugin_EnableRegister.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/Arma_InlineHelper_Plugin_EnableRegister_build_log.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Arma_InlineHelper_Plugin_EnableRegister build log
4 |
5 |
6 |
7 | Build started on: 16-02-2013 at 00:36.45
8 | Build ended on: 16-02-2013 at 00:36.47
9 | -------------- Build: Release in Arma_InlineHelper_Plugin_EnableRegister ---------------
10 | windres.exe -J rc -O coff -i H:\CODEBL~1\Arma_InlineHelper_Plugin_EnableRegister\resource.rc -o obj\resource.res
11 | mingw32-g++.exe -fomit-frame-pointer -Os -Wall -DBUILD_DLL -I"H:\Program Files\MySQL\MySQL Connector C 6.0.2" -I"H:\Program Files\MySQL\MySQL Connector C 6.0.2\include" -I"H:\Program Files\MySQL\MySQL Connector C 6.0.2\lib" -I"H:\Program Files\MySQL\MySQL Connector C 6.0.2\bin" -IH:\SQLite -I"H:\Program Files\ATI Stream\bin\x86" -I"H:\Program Files\ATI Stream\include" -I"H:\Program Files\ATI Stream\lib" -c H:\CodeBlocks\Arma_InlineHelper_Plugin_EnableRegister\main.cpp -o obj\main.o
12 | mingw32-g++.exe -shared -Wl,--dll -L"H:\Program Files\MySQL\MySQL Connector C 6.0.2" -L"H:\Program Files\MySQL\MySQL Connector C 6.0.2\lib" -L"H:\Program Files\MySQL\MySQL Connector C 6.0.2\include" -L"H:\Program Files\MySQL\MySQL Connector C 6.0.2\bin" obj\main.o obj\resource.res -o bin\EnableRegister.dll -s -luser32 -lcomctl32
13 | Output size is 9.00 KB
14 | Process terminated with status 0 (0 minutes, 2 seconds)
15 | 0 errors, 0 warnings (0 minutes, 2 seconds)
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/EnableRegister.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {E3A208EC-FDEF-4C4E-94B8-992AAE8705B5}
11 | EnableRegister
12 | EnableRegister
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/EnableRegister.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/EnableRegister.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/main.cpp:
--------------------------------------------------------------------------------
1 | #include "main.h"
2 |
3 | ///Plugin details.
4 | char plugin_name[] = "EnableRegister (v7.40+)";
5 |
6 | ///Global variables.
7 | char dll_dump[MAX_PATH] = "";
8 | char register_used[10] = "";
9 | unsigned int patch_addr = 0;
10 | unsigned char register_byte = 0;
11 |
12 | void CopyToClipboard(const char* text) ///Copies a string to the clipboard.
13 | {
14 | HGLOBAL hText;
15 | char* pText;
16 |
17 | hText = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, strlen(text) + 1);
18 | pText = (char*)GlobalLock(hText);
19 | strcpy(pText, text);
20 |
21 | OpenClipboard(0);
22 | EmptyClipboard();
23 | if(!SetClipboardData(CF_OEMTEXT, hText))
24 | {
25 | MessageBeep(MB_ICONERROR);
26 | }
27 | MessageBeep(MB_ICONINFORMATION);
28 | CloseClipboard();
29 | }
30 |
31 | unsigned int FindPattern(BYTE* d, unsigned int size, unsigned char* return_byte)
32 | {
33 | for(unsigned int i = 0; i < size; i++) //008000000F95??88
34 | if(d[i] == 0x00 && d[i + 1] == 0x80 && d[i + 2] == 0x00 && d[i + 3] == 0x00 && d[i + 4] == 0x0F && d[i + 5] == 0x95 && d[i + 7] == 0x88)
35 | {
36 | *return_byte = d[i + 6] ^ 0x70;
37 | return i + 4;
38 | }
39 | return 0;
40 | }
41 |
42 | unsigned int FindPatchAddr()
43 | {
44 | HANDLE hFile = CreateFileA(dll_dump, GENERIC_ALL, 0, 0, OPEN_EXISTING, 0, 0);
45 | if(hFile == INVALID_HANDLE_VALUE)
46 | return 0;
47 |
48 | DWORD high = 0, filesize = GetFileSize(hFile, &high);
49 | BYTE* mem_addr = (BYTE*)malloc(filesize);
50 | if(!ReadFile(hFile, mem_addr, filesize, &high, 0))
51 | {
52 | CloseHandle(hFile);
53 | free(mem_addr);
54 | return 0;
55 | }
56 | CloseHandle(hFile);
57 | unsigned int retn = FindPattern(mem_addr, filesize, ®ister_byte);
58 | free(mem_addr);
59 | return retn;
60 | }
61 |
62 | BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
63 | {
64 | switch(uMsg)
65 | {
66 | case WM_INITDIALOG:
67 | {
68 | char code_text[255] = "";
69 | patch_addr = FindPatchAddr();
70 | if(!patch_addr)
71 | {
72 | MessageBoxA(hwndDlg, "Something went wrong, try loading a .exe file first...", "Error!", MB_ICONERROR);
73 | EndDialog(hwndDlg, 0);
74 | }
75 | else
76 | {
77 | unsigned int patch_dword = 0x88900100 ^ register_byte;
78 | sprintf(code_text, "lea edi, dword ptr ds:[%s+0x%X]\r\nmov dword ptr ds:[edi],0x%X", register_used, patch_addr, patch_dword);
79 | SetDlgItemTextA(hwndDlg, IDC_EDT_CODE, code_text);
80 | }
81 | }
82 | return TRUE;
83 |
84 | case WM_CLOSE:
85 | {
86 | EndDialog(hwndDlg, 0);
87 | }
88 | return TRUE;
89 |
90 | case WM_COMMAND:
91 | {
92 | switch(LOWORD(wParam))
93 | {
94 | case IDC_BTN_COPY:
95 | {
96 | char code_text[255] = "";
97 | GetDlgItemTextA(hwndDlg, IDC_EDT_CODE, code_text, 255);
98 | CopyToClipboard(code_text);
99 | }
100 | return TRUE;
101 | }
102 | }
103 | return TRUE;
104 | }
105 | return FALSE;
106 | }
107 |
108 | DLL_EXPORT const char* PluginInfo(void)
109 | {
110 | return plugin_name;
111 | }
112 |
113 | DLL_EXPORT void PluginFunction(HINSTANCE hInst, HWND hwndDlg, const char* register_vp, const char* program_dir, unsigned int imagebase)
114 | {
115 | sprintf(dll_dump, "%s\\security_code.mem", program_dir);
116 | strcpy(register_used, register_vp);
117 | InitCommonControls();
118 | DialogBox(hInst, MAKEINTRESOURCE(DLG_MAIN), hwndDlg, (DLGPROC)DlgMain);
119 | }
120 |
121 | extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
122 | {
123 | return TRUE;
124 | }
125 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE 1001
7 | #define IDC_BTN_COPY 1002
8 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_EnableRegister/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.11
2 | // Copyright (C) 2006-2012
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 144, 44
18 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
19 | CAPTION "EnableRegister"
20 | FONT 8, "Courier New"
21 | {
22 | EDITTEXT IDC_EDT_CODE, 3, 5, 139, 22, ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
23 | DEFPUSHBUTTON "&Copy", IDC_BTN_COPY, 51, 29, 43, 12
24 | }
25 |
26 |
27 |
28 | //
29 | // Manifest resources
30 | //
31 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
32 | 1 RT_MANIFEST ".\\manifest.xml"
33 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/Arma_InlineHelper_Plugin_GetEnvA.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/Arma_InlineHelper_Plugin_GetEnvA.cscope_file_list:
--------------------------------------------------------------------------------
1 | "G:\CodeBlocks\Arma_InlineHelper_Plugin_GetEnvA\src\main.cpp"
2 | "G:\CodeBlocks\Arma_InlineHelper_Plugin_GetEnvA\src\main.h"
3 | "G:\CodeBlocks\Arma_InlineHelper_Plugin_GetEnvA\src\resource.h"
4 | "G:\CodeBlocks\Arma_InlineHelper_Plugin_GetEnvA\src\resource.rc"
5 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/GetEnvA.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {14C94B6F-CD87-4246-9E11-13DA93EB2CA7}
11 | GetEnvA
12 | GetEnvA
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/GetEnvA.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/GetEnvA.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/data.txt:
--------------------------------------------------------------------------------
1 | start:
2 |
3 | lea edi, dword ptr ds:[eax+47340] ; Security!GetEnvA
4 | mov byte ptr ds:[edi],0E9
5 | mov eax, dword ptr ds:[690098] ; GetEnvironmentVariableA
6 | sub eax,edi
7 | sub eax,5
8 | inc edi
9 | mov dword ptr ds:[edi], eax
10 | mov ebx,dword ptr ds:[690070] ; SetEnvironmentVariableA
11 | jmp @over_data
12 |
13 | format 0: lea edi, dword ptr ds:[eax+0%X]\r\nmov byte ptr ds:[edi],0E9\r\nmov eax, dword ptr ds:[0%X]\r\nsub eax,edi\r\nsub eax,5\r\ninc edi\r\nmov dword ptr ds:[edi], eax\r\nmov ebx,dword ptr ds:[0%X]\r\njmp @over_data\r\n
14 | format 1: push @%d_val\r\npush @%d_var\r\ncall ebx\r\n
15 | format 2: @%d_var:\r\n\"%s\\0\"\r\n@%d_val:\r\n\"%s\\0\"\r\n
16 |
17 | final:
18 |
19 | sprintf(current_code, "%s@over_data:\r\n", current_code);
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/src/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/src/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/src/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define DLG_LIST 103
7 | #define IDC_EDT_CODE 1001
8 | #define IDC_BTN_CLEAR 1002
9 | #define IDC_BTN_COPY 1006
10 | #define IDC_BTN_ABOUT 1007
11 | #define IDC_LIST_VARS 1009
12 | #define IDC_BTN_ADD 1013
13 | #define IDC_BTN_EDIT 1014
14 | #define IDC_BTN_DELETE 1015
15 | #define IDC_EDT_VAR 1016
16 | #define IDC_EDT_VAL 1018
17 | #define IDC_BTN_SAVE 1021
18 | #define IDC_BTN_CANCEL 1022
19 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetEnvA/src/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.9
2 | // Copyright (C) 2006-2011
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_LIST DIALOG 0, 0, 140, 34
18 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
19 | CAPTION "Add Variable"
20 | FONT 8, "Courier New"
21 | {
22 | LTEXT "Var:", IDC_STATIC, 3, 5, 17, 8, SS_LEFT
23 | EDITTEXT IDC_EDT_VAR, 20, 4, 75, 12, ES_AUTOHSCROLL | ES_UPPERCASE
24 | EDITTEXT IDC_EDT_VAL, 20, 19, 75, 12, ES_AUTOHSCROLL
25 | LTEXT "Val:", IDC_STATIC, 3, 20, 17, 8, SS_LEFT
26 | DEFPUSHBUTTON "Save", IDC_BTN_SAVE, 98, 4, 39, 12
27 | PUSHBUTTON "Cancel", IDC_BTN_CANCEL, 98, 19, 39, 12
28 | }
29 |
30 |
31 |
32 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
33 | DLG_MAIN DIALOG 0, 0, 186, 193
34 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
35 | EXSTYLE WS_EX_ACCEPTFILES
36 | CAPTION "Environment Variable Injector"
37 | FONT 8, "Courier New"
38 | {
39 | LISTBOX IDC_LIST_VARS, 5, 17, 179, 63, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
40 | PUSHBUTTON "&Add", IDC_BTN_ADD, 33, 83, 33, 10
41 | PUSHBUTTON "&Edit", IDC_BTN_EDIT, 70, 83, 33, 10
42 | PUSHBUTTON "&Delete", IDC_BTN_DELETE, 106, 83, 33, 10
43 | PUSHBUTTON "C&lear", IDC_BTN_CLEAR, 143, 83, 33, 10
44 | EDITTEXT IDC_EDT_CODE, 5, 97, 179, 78, WS_VSCROLL | ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
45 | PUSHBUTTON "&Copy", IDC_BTN_COPY, 78, 178, 33, 10
46 | DEFPUSHBUTTON "A&bout", IDC_BTN_ABOUT, 154, 3, 29, 12
47 | LTEXT "Code:", IDC_STATIC, 5, 88, 21, 8, SS_LEFT
48 | LTEXT "Vars:", IDC_STATIC, 5, 7, 21, 8, SS_LEFT
49 | }
50 |
51 |
52 |
53 | //
54 | // Manifest resources
55 | //
56 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
57 | 1 RT_MANIFEST ".\\manifest.xml"
58 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/Arma_InlineHelper_Plugin_GetProcAdress.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/GetProcAddress.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {60937C81-EE51-435E-ADC1-B9CA2254FFCC}
11 | GetProcAddress
12 | GetProcAddress
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/GetProcAddress.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/GetProcAddress.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_API 1004
7 | #define IDC_EDT_DLL 1005
8 | #define IDC_EDT_CODE 1006
9 | #define IDC_BTN_COPY 1007
10 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_GetProcAdress/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.11
2 | // Copyright (C) 2006-2012
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 193, 166
18 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
19 | CAPTION "GetProcAdress"
20 | FONT 8, "Courier New"
21 | {
22 | EDITTEXT IDC_EDT_API, 3, 11, 108, 12, ES_AUTOHSCROLL
23 | EDITTEXT IDC_EDT_DLL, 3, 33, 108, 12, ES_AUTOHSCROLL
24 | EDITTEXT IDC_EDT_CODE, 3, 55, 187, 92, ES_MULTILINE | ES_READONLY | ES_WANTRETURN
25 | LTEXT "API:", IDC_STATIC, 3, 1, 19, 8, SS_LEFT
26 | LTEXT "DLL:", IDC_STATIC, 3, 24, 19, 8, SS_LEFT
27 | LTEXT "Code:", IDC_STATIC, 3, 46, 20, 8, SS_LEFT
28 | DEFPUSHBUTTON "&Copy", IDC_BTN_COPY, 3, 150, 46, 12
29 | }
30 |
31 |
32 |
33 | //
34 | // Manifest resources
35 | //
36 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
37 | 1 RT_MANIFEST ".\\manifest.xml"
38 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/Arma_InlineHelper_Plugin_HWID.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/HWID.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {06F88E38-AEAA-4FA0-8E67-D1AF9293C33C}
11 | HWID
12 | HWID
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/HWID.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/HWID.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/Readme.txt:
--------------------------------------------------------------------------------
1 | This is a sample plugin for ArmaInlineHelper v0.07 and higher.
2 |
3 | Every plugin should have two functions. One that returns the plugin name
4 | and one that actually does something.
5 |
6 | Just see main.cpp for more information.
7 |
8 | PS: Install plugins by copying them in the "Plugins" directory.
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/patterns.txt:
--------------------------------------------------------------------------------
1 | Asm:
2 | mov eax,0FFFFFFFF
3 | retn 8
4 |
5 | Bytes:
6 | B8 FF FF FF FF C2 08 00
7 |
8 | Pattern to find function (Standard+Enhanced):
9 | 55 8B EC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 01 00 00 00 ?? ?? 74
10 |
11 |
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE 1001
7 | #define IDC_EDT_HWID 1003
8 | #define IDC_BTN_COPY 1006
9 | #define IDC_BTN_ABOUT 1007
10 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_HWID/resource.rc:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include "resource.h"
5 |
6 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
7 | DLG_MAIN DIALOG 0, 0, 186, 59
8 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
9 | CAPTION "Fingerprint Patcher"
10 | FONT 8, "Courier New"
11 | {
12 | LTEXT "New Fingerprint:", IDC_STATIC, 4, 4, 65, 8, SS_LEFT
13 | EDITTEXT IDC_EDT_CODE, 4, 17, 179, 37, ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
14 | DEFPUSHBUTTON "Copy Code", IDC_BTN_COPY, 111, 3, 42, 12
15 | PUSHBUTTON "About", IDC_BTN_ABOUT, 154, 3, 29, 12
16 | EDITTEXT IDC_EDT_HWID, 69, 3, 40, 12, ES_CENTER | ES_UPPERCASE
17 | }
18 |
19 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
20 | 1 RT_MANIFEST ".\\manifest.xml"
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/Arma_InlineHelper_Plugin_NGEN_Enable.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/NGEN_Enable.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 | {161BBE36-9CE4-4082-9A09-9EFF67437A6F}
11 | NGEN_Enable
12 | NGEN_Enable
13 |
14 |
15 |
16 | DynamicLibrary
17 | false
18 | true
19 | MultiByte
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | .dll
30 | $(SolutionDir)bin\plugins\
31 |
32 |
33 |
34 | Level3
35 | MaxSpeed
36 | true
37 | true
38 | MultiThreaded
39 | BUILD_DLL;_WINDLL;%(PreprocessorDefinitions)
40 |
41 |
42 | true
43 | true
44 | true
45 | comctl32.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)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/NGEN_Enable.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 | Source Files
20 |
21 |
22 |
23 |
24 | Resource Files
25 |
26 |
27 |
28 |
29 | Header Files
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/NGEN_Enable.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/main.cpp:
--------------------------------------------------------------------------------
1 | #include "main.h"
2 |
3 | ///Plugin details.
4 | char plugin_name[] = "Re-Enable NGEN (v7.20+?)";
5 |
6 | ///Global variables.
7 | char dll_dump[MAX_PATH] = "";
8 | char register_used[10] = "";
9 | unsigned int patch_addr = 0;
10 | unsigned char register_byte = 0;
11 |
12 | void CopyToClipboard(const char* text) ///Copies a string to the clipboard.
13 | {
14 | HGLOBAL hText;
15 | char* pText;
16 |
17 | hText = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, strlen(text) + 1);
18 | pText = (char*)GlobalLock(hText);
19 | strcpy(pText, text);
20 |
21 | OpenClipboard(0);
22 | EmptyClipboard();
23 | if(!SetClipboardData(CF_OEMTEXT, hText))
24 | {
25 | MessageBeep(MB_ICONERROR);
26 | }
27 | MessageBeep(MB_ICONINFORMATION);
28 | CloseClipboard();
29 | }
30 |
31 | unsigned int FindPattern(BYTE* d, unsigned int size)
32 | {
33 | for(unsigned int i = 0; i < size; i++) //03??????????5?8D??????????5?E8????????83C41485C074
34 | if(d[i] == 0x03 && (d[i + 6] >> 4) == 0x05 && d[i + 7] == 0x8D && (d[i + 13] >> 4) == 0x05 && d[i + 14] == 0xE8 && d[i + 19] == 0x83 && d[i + 20] == 0xC4 && d[i + 21] == 0x14 && d[i + 22] == 0x85 && d[i + 23] == 0xC0 && d[i + 24] == 0x74)
35 | return i + 14;
36 | return 0;
37 | }
38 |
39 | unsigned int FindPatchAddr()
40 | {
41 | HANDLE hFile = CreateFileA(dll_dump, GENERIC_ALL, 0, 0, OPEN_EXISTING, 0, 0);
42 | if(hFile == INVALID_HANDLE_VALUE)
43 | return 0;
44 |
45 | DWORD high = 0, filesize = GetFileSize(hFile, &high);
46 | BYTE* mem_addr = (BYTE*)malloc(filesize);
47 | if(!ReadFile(hFile, mem_addr, filesize, &high, 0))
48 | {
49 | CloseHandle(hFile);
50 | free(mem_addr);
51 | return 0;
52 | }
53 | CloseHandle(hFile);
54 | unsigned int retn = FindPattern(mem_addr, filesize);
55 | free(mem_addr);
56 | return retn;
57 | }
58 |
59 | BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
60 | {
61 | switch(uMsg)
62 | {
63 | case WM_INITDIALOG:
64 | {
65 | char code_text[255] = "";
66 | patch_addr = FindPatchAddr();
67 | if(!patch_addr)
68 | {
69 | MessageBoxA(hwndDlg, "Something went wrong, try loading a .exe file first...", "Error!", MB_ICONERROR);
70 | EndDialog(hwndDlg, 0);
71 | }
72 | else
73 | {
74 | sprintf(code_text, "lea edi, dword ptr ds:[%s+0x%X]\r\nmov word ptr ds:[edi],0x3EB", register_used, patch_addr);
75 | SetDlgItemTextA(hwndDlg, IDC_EDT_CODE, code_text);
76 | }
77 | }
78 | return TRUE;
79 |
80 | case WM_CLOSE:
81 | {
82 | EndDialog(hwndDlg, 0);
83 | }
84 | return TRUE;
85 |
86 | case WM_COMMAND:
87 | {
88 | switch(LOWORD(wParam))
89 | {
90 | case IDC_BTN_COPY:
91 | {
92 | char code_text[255] = "";
93 | GetDlgItemTextA(hwndDlg, IDC_EDT_CODE, code_text, 255);
94 | CopyToClipboard(code_text);
95 | }
96 | return TRUE;
97 | }
98 | }
99 | return TRUE;
100 | }
101 | return FALSE;
102 | }
103 |
104 | DLL_EXPORT const char* PluginInfo(void)
105 | {
106 | return plugin_name;
107 | }
108 |
109 | DLL_EXPORT void PluginFunction(HINSTANCE hInst, HWND hwndDlg, const char* register_vp, const char* program_dir, unsigned int imagebase)
110 | {
111 | sprintf(dll_dump, "%s\\security_code.mem", program_dir);
112 | strcpy(register_used, register_vp);
113 | InitCommonControls();
114 | DialogBox(hInst, MAKEINTRESOURCE(DLG_MAIN), hwndDlg, (DLGPROC)DlgMain);
115 | }
116 |
117 | extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
118 | {
119 | return TRUE;
120 | }
121 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/main.h:
--------------------------------------------------------------------------------
1 | #ifndef __MAIN_H__
2 | #define __MAIN_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include "resource.h"
8 |
9 | #define DLL_EXPORT extern "C" __declspec(dllexport)
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/resource.h:
--------------------------------------------------------------------------------
1 | #ifndef IDC_STATIC
2 | #define IDC_STATIC (-1)
3 | #endif
4 |
5 | #define DLG_MAIN 101
6 | #define IDC_EDT_CODE 1001
7 | #define IDC_BTN_COPY 1002
8 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_NGEN_Enable/resource.rc:
--------------------------------------------------------------------------------
1 | // Generated by ResEdit 1.5.11
2 | // Copyright (C) 2006-2012
3 | // http://www.resedit.net
4 |
5 | #include
6 | #include
7 | #include
8 | #include "resource.h"
9 |
10 |
11 |
12 |
13 | //
14 | // Dialog resources
15 | //
16 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
17 | DLG_MAIN DIALOG 0, 0, 144, 44
18 | STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
19 | CAPTION "Re-Enable NGEN"
20 | FONT 8, "Courier New"
21 | {
22 | EDITTEXT IDC_EDT_CODE, 3, 5, 139, 22, ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
23 | DEFPUSHBUTTON "&Copy", IDC_BTN_COPY, 51, 29, 43, 12
24 | }
25 |
26 |
27 |
28 | //
29 | // Manifest resources
30 | //
31 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
32 | 1 RT_MANIFEST ".\\manifest.xml"
33 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_Tester/Arma_InlineHelper_Plugin_Tester.cbp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_Tester/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | HINSTANCE PLUGIN_INST;
6 | typedef char* (__stdcall* PLUGINFO)(void);
7 | typedef void(__stdcall* PLUGFUNC)(HINSTANCE hInst, HWND hwndDlg, const char* register_vp, const char* progdir, unsigned int imagebase);
8 | PLUGINFO PluginInfo;
9 | PLUGFUNC PluginFunction;
10 |
11 | int main()
12 | {
13 | char curdir[256] = "", search_string[256] = "";
14 | GetModuleFileNameA(GetModuleHandle(0), curdir, 256);
15 | int len = strlen(curdir);
16 | while(curdir[len] != '\\')
17 | len--;
18 | curdir[len] = 0;
19 | sprintf(search_string, "%s\\*.dll", curdir);
20 | InitCommonControls();
21 | WIN32_FIND_DATA search_struct;
22 | HANDLE hSearch;
23 | hSearch = FindFirstFileA(search_string, &search_struct);
24 | if(hSearch == INVALID_HANDLE_VALUE)
25 | {
26 | puts("Error while searching *.dll!\n");
27 | system("pause");
28 | return 0;
29 | }
30 | strcpy(search_string, search_struct.cFileName);
31 | printf(" Plugin DLL : %s\n", search_string);
32 | FindClose(hSearch);
33 | PLUGIN_INST = LoadLibraryA(search_string);
34 | if(!PLUGIN_INST)
35 | {
36 | puts("Error loading plugin DLL!\n");
37 | system("pause");
38 | return 0;
39 | }
40 | PluginInfo = (PLUGINFO)GetProcAddress(PLUGIN_INST, "PluginInfo");
41 | if(!PluginInfo)
42 | {
43 | puts("Error loading PluginInfo!\n");
44 | system("pause");
45 | return 0;
46 | }
47 | PluginFunction = (PLUGFUNC)GetProcAddress(PLUGIN_INST, "PluginFunction");
48 | if(!PluginFunction)
49 | {
50 | puts("Error loading PluginFunction!\n");
51 | system("pause");
52 | return 0;
53 | }
54 | printf("Plugin Name : %s\n\n", PluginInfo());
55 | PluginFunction(PLUGIN_INST, 0, "EAX", curdir, 0x400000);
56 | puts("Testing ended!\n");
57 | return 0;
58 | }
59 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_Tester/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/plugins/Arma_InlineHelper_Plugin_Tester/resource.rc:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | 1 RT_MANIFEST ".\\manifest.xml"
4 |
--------------------------------------------------------------------------------
/realign/realign.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/realign/realign.dll
--------------------------------------------------------------------------------
/realign/realign.h:
--------------------------------------------------------------------------------
1 |
2 | /*****************************************************************************
3 |
4 | Realign.h
5 | ---------
6 |
7 | for version: 1.5
8 |
9 | Include file for Realign.dll.
10 |
11 | by yoda
12 |
13 | *****************************************************************************/
14 |
15 | #ifndef __Realign_h__
16 | #define __Realign_h__
17 |
18 | //
19 | // constants
20 | //
21 | #define REALIGN_MODE_NORMAL 0
22 | #define REALIGN_MODE_HARDCORE 1
23 | #define REALIGN_MODE_NICE 2
24 |
25 | // Macro to check the success of the functions "RealignPE" and "WipeReloc".
26 | // For a full list of error codes have a look at "realignDLL.c".
27 | #define REALIGNDLLAPI_SUCCESS(RetValue) (RetValue < 0xF0000000 && RetValue > 30)
28 |
29 | // return type definition and success checking macro for "ReBasePEImage"
30 | typedef enum _ReBaseErr
31 | {
32 | RB_OK = 0,
33 | RB_INVALIDPE,
34 | RB_NORELOCATIONINFO,
35 | RB_INVALIDRVA,
36 | RB_INVALIDNEWBASE,
37 | RB_ACCESSVIOLATION
38 | } ReBaseErr;
39 |
40 | #define rbOK(ret)(ret == RB_OK)
41 |
42 | //
43 | // function prototypes
44 | //
45 |
46 | #ifdef __cplusplus
47 | extern "C"
48 | {
49 | #endif // __cplusplus
50 |
51 | BOOL __stdcall TruncateFile(CHAR* szFilePath, DWORD dwNewFsize);
52 | DWORD __stdcall RealignPE(LPVOID AddressOfMapFile, DWORD dwFsize, BYTE bRealignMode);
53 | DWORD __stdcall WipeReloc(void* pMap, DWORD dwFsize);
54 | BOOL __stdcall ValidatePE(void* pPEImage, DWORD dwFileSize);
55 | ReBaseErr __stdcall ReBasePEImage(void* pPE, DWORD dwNewBase);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif // __cplusplus
60 |
61 | #endif // __Realign_h__
62 |
--------------------------------------------------------------------------------
/realign/realign.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/realign/realign.lib
--------------------------------------------------------------------------------
/realign/realign_static.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/realign/realign_static.lib
--------------------------------------------------------------------------------
/realign/realign_supp.h:
--------------------------------------------------------------------------------
1 | // realign_supp.h : supplement header file for realign.dll
2 | // Author: DLL to Lib version 2.00
3 | // Date: Monday, May 20, 2013
4 | // Description: The declaration of the realign.dll's entry-point function.
5 | // Prototype: BOOL WINAPI xxx_DllMain(HINSTANCE hinstance, DWORD fdwReason, LPVOID lpvReserved);
6 | // Parameters:
7 | // hinstance
8 | // Handle to current instance of the application. Use AfxGetInstanceHandle()
9 | // to get the instance handle if your project has MFC support.
10 | // fdwReason
11 | // Specifies a flag indicating why the entry-point function is being called.
12 | // lpvReserved
13 | // Specifies further aspects of DLL initialization and cleanup. Should always
14 | // be set to NULL;
15 | // Comment: Please see the help document for detail information about the entry-point
16 | // function
17 | // Homepage: http://www.binary-soft.com
18 | // Technical Support: support@binary-soft.com
19 | /////////////////////////////////////////////////////////////////////
20 |
21 | #if !defined(D2L_REALIGN_SUPP_H__5C026254_54EE_5687_6503_167E03AE66A6__INCLUDED_)
22 | #define D2L_REALIGN_SUPP_H__5C026254_54EE_5687_6503_167E03AE66A6__INCLUDED_
23 |
24 | #if _MSC_VER > 1000
25 | #pragma once
26 | #endif // _MSC_VER > 1000
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif
31 |
32 |
33 | #include
34 |
35 | /* This is realign.dll's entry-point function. You should call it to do necessary
36 | initialization and finalization. */
37 |
38 | BOOL WINAPI REALIGN_DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
39 |
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif
44 |
45 | #endif // !defined(D2L_REALIGN_SUPP_H__5C026254_54EE_5687_6503_167E03AE66A6__INCLUDED_)
--------------------------------------------------------------------------------
/release.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | rmdir /S /Q release
3 | mkdir release
4 | mkdir release\plugins
5 |
6 | copy bin\armabrut_opencl.dll release\
7 | copy bin\armabrut_opencl.exe release\
8 | copy bin\brute_opencl.cl release\
9 | copy bin\BeaEngine.dll release\
10 | copy bin\brute_dlp.dll release\
11 | copy bin\brute_sym.dll release\
12 | copy bin\TitanEngine.dll release\
13 | copy bin\Armadillo_KeyTool.exe release\
14 | copy bin\plugins\*.dll release\plugins\
--------------------------------------------------------------------------------
/source_nav.proj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrexodia/akt/f1c4e18bb86dc8d2ee9371505b6625da6b0292c4/source_nav.proj
--------------------------------------------------------------------------------
/tabs.h:
--------------------------------------------------------------------------------
1 | #ifndef _TABS_H
2 | #define _TABS_H
3 |
4 | #define _WIN32_WINNT 0x0501
5 | #define WINVER 0x0501
6 | #define _WIN32_IE 0x0500
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | #define MAX_TABS 10
14 |
15 | //Tab structure, contains all needed information
16 | typedef struct tag_dlghdr
17 | {
18 | DLGPROC father_proc; //used for automatic tab switching
19 | int total_tabs; //tab counter
20 | HWND hwndTab; //tab control
21 | HWND hwndDisplay; //current child dialog box
22 | DLGTEMPLATE* apRes[MAX_TABS]; //dialog template
23 | DLGPROC windowProc[MAX_TABS]; //window procedure
24 | WNDPROC tabWndProcOld; //original wndproc from tab...
25 | HINSTANCE dlg_hinst[MAX_TABS]; //hinst for the dialog
26 | HWND dlg_hwnd[MAX_TABS]; //different window handles
27 | UINT dlg_id[MAX_TABS]; //dialog id (resource id)
28 | bool auto_resize_window; //auto_resize flags
29 | bool auto_resize_tab_control; //auto_resize flags
30 | bool accept_files[MAX_TABS]; //accept files flag
31 | bool handles_help[MAX_TABS]; //Handles the WM_HELP message?
32 | RECT tabRect; //child window placing
33 | char* tab_name[MAX_TABS]; //tab name
34 | } DLGHDR;
35 |
36 | void WINAPI OnChildDialogInit(HWND hwndDlg);
37 | BOOL CALLBACK tab_hook(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
38 | void OnSelChanged(HWND hwndDlg);
39 | void SelectTab(HWND hwndDlg, int id);
40 | BOOL CALLBACK notify_hook(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
41 | BOOL CALLBACK DropFileSubClass(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
42 | DLGTEMPLATE* DoLockDlgRes(HINSTANCE hInstance, LPCTSTR lpszResName);
43 | void InitTabStruct(HWND hwndDlg, UINT tab_id, bool auto_resize_window, bool auto_resize_tab_control);
44 | void print_rect(RECT* r, const char* title);
45 | void AddTabbedDialog(HINSTANCE hInstance, HWND hwndDlg, const char* tab_title, UINT dlg_id, DLGPROC dlg_proc, bool accept_files, bool handles_help);
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/template.h:
--------------------------------------------------------------------------------
1 | #define template_text "<$.%X>\r\n\
2 | pushad\r\n\
3 | call @f\r\n\
4 | @@:\r\n\
5 | pop ebp\r\n\
6 | sub ebp, 0x%X ; newentry+5-imagebase\r\n\
7 | \r\n\
8 | ; Store imagebase\r\n\
9 | call @f\r\n\
10 | @getimagebase:\r\n\
11 | mov ebp, 0xFFFFFFFF\r\n\
12 | ret\r\n\
13 | @@:\r\n\
14 | pop eax\r\n\
15 | mov dword ptr ds:[eax+1],ebp\r\n\
16 | \r\n\
17 | ; Get API addresses\r\n\
18 | mov ebx, dword ptr ds:[ebp+0x%X] ; OutputDebugStringA\r\n\
19 | lea esi, dword ptr ds:[ebp+0x%X] ; VirtualProtect\r\n\
20 | \r\n\
21 | ; change page protection\r\n\
22 | call @f\r\n\
23 | \"\\x00\\x00\\x00\\x00\" ; oldprotect\r\n\
24 | @@:\r\n\
25 | push 0x40 ; newprotect\r\n\
26 | push 0x50 ; size\r\n\
27 | push ebx ; OutputDebugStringA\r\n\
28 | call dword ptr ds:[esi] ; VirtualProtect\r\n\
29 | \r\n\
30 | ; IAT Hook VirtualProtect\r\n\
31 | call @vp_hook_end\r\n\
32 | \r\n\
33 | @hook_VirtualProtect:\r\n\
34 | pushad\r\n\
35 | pushfd\r\n\
36 | call @getimagebase\r\n\
37 | \r\n\
38 | ; restore IAT hook\r\n\
39 | push esi\r\n\
40 | push eax\r\n\
41 | lea esi, dword ptr ds:[ebp+0x%X] ; VirtualProtect\r\n\
42 | call @getvirtualprotect\r\n\
43 | xchg dword ptr ds:[esi],eax\r\n\
44 | pop eax\r\n\
45 | pop esi\r\n\
46 | \r\n\
47 | ; go to the user code\r\n\
48 | jmp @usercode\r\n\
49 | \r\n\
50 | @vp_hook_end:\r\n\
51 | pop ebp\r\n\
52 | xchg dword ptr ds:[esi],ebp\r\n\
53 | \r\n\
54 | ; store old VirtualProtect\r\n\
55 | call @f\r\n\
56 | @getvirtualprotect:\r\n\
57 | mov eax,0xFFFFFFFF\r\n\
58 | ret\r\n\
59 | @@:\r\n\
60 | pop eax\r\n\
61 | mov dword ptr ds:[eax+1],ebp\r\n\
62 | \r\n\
63 | ; hook OutputDebugStringA\r\n\
64 | call @od_skip\r\n\
65 | @od_original_bytes:\r\n\
66 | call @f\r\n\
67 | \"\\x90\\x90\\x90\\x90\\x90\"\r\n\
68 | @@:\r\n\
69 | jmp short @od_hook_back\r\n\
70 | @od_skip:\r\n\
71 | pop edi\r\n\
72 | add edi,5\r\n\
73 | mov esi,ebx\r\n\
74 | mov ecx,5\r\n\
75 | rep movsb\r\n\
76 | sub esi,5\r\n\
77 | mov byte ptr ds:[esi],0xE9\r\n\
78 | call @od_hook_end\r\n\
79 | \r\n\
80 | @hook_OutputDebugStringA:\r\n\
81 | call @f\r\n\
82 | \"\\x%02X\" ;counter\r\n\
83 | @@:\r\n\
84 | pop eax\r\n\
85 | dec byte ptr ds:[eax]\r\n\
86 | jz short @od_execute_hook\r\n\
87 | xor eax,eax\r\n\
88 | inc eax\r\n\
89 | ret 4\r\n\
90 | @od_execute_hook:\r\n\
91 | push edi\r\n\
92 | push esi\r\n\
93 | push ecx\r\n\
94 | push ebp\r\n\
95 | jmp short @od_original_bytes\r\n\
96 | @od_hook_back:\r\n\
97 | pop esi\r\n\
98 | call @getimagebase\r\n\
99 | mov eax,dword ptr ds:[ebp+0x%X] ; OutputDebugStringA\r\n\
100 | mov edi,eax\r\n\
101 | mov ecx,5\r\n\
102 | rep movsb\r\n\
103 | pop ebp\r\n\
104 | pop ecx\r\n\
105 | pop esi\r\n\
106 | pop edi\r\n\
107 | \r\n\
108 | ; patch CRC values\r\n\
109 | push eax\r\n\
110 | %s\r\n\
111 | pop eax\r\n\
112 | \r\n\
113 | jmp eax ; OutputDebugStringA\r\n\
114 | \r\n\
115 | ; continue hooking OutputDebugStringA\r\n\
116 | @od_hook_end:\r\n\
117 | pop eax\r\n\
118 | sub eax,5\r\n\
119 | sub eax,esi\r\n\
120 | mov dword ptr ds:[esi+1],eax\r\n\
121 | \r\n\
122 | ; restore registers and jmp to oep\r\n\
123 | popad\r\n\
124 | jmp $.%X ;rva of oep\r\n\
125 | \r\n\
126 | @usercode:\r\n\
127 | ;PLACE YOUR CODE AFTER THIS (security base is in %s, imagebase in EBP)\r\n\
128 | ;PLACE YOUR CODE BEFORE THIS\r\n\
129 | popfd\r\n\
130 | popad\r\n\
131 | call @getvirtualprotect\r\n\
132 | jmp eax"
133 |
--------------------------------------------------------------------------------