├── pe-packer-x64 ├── pe-packer-x64 │ ├── asmjit │ │ ├── .gitignore │ │ ├── tools │ │ │ ├── tablegen-a64.sh │ │ │ ├── enumgen.sh │ │ │ ├── tablegen-x86.sh │ │ │ └── tablegen.sh │ │ ├── configure_vs2022_x64.bat │ │ ├── configure_vs2022_x86.bat │ │ ├── configure.sh │ │ ├── .editorconfig │ │ ├── asmjit │ │ │ ├── asmjit-scope-end.h │ │ │ ├── asmjit-scope-begin.h │ │ │ ├── core │ │ │ │ ├── target.cpp │ │ │ │ ├── errorhandler.cpp │ │ │ │ ├── osutils.cpp │ │ │ │ ├── builder_p.h │ │ │ │ ├── instdb_p.h │ │ │ │ ├── formatter_p.h │ │ │ │ ├── osutils.h │ │ │ │ ├── environment.cpp │ │ │ │ ├── misc_p.h │ │ │ │ ├── logger.cpp │ │ │ │ ├── target.h │ │ │ │ ├── raconstraints_p.h │ │ │ │ └── emithelper_p.h │ │ │ ├── arm │ │ │ │ ├── armglobals.h │ │ │ │ ├── a64func_p.h │ │ │ │ ├── a64formatter_p.h │ │ │ │ ├── a64instapi_p.h │ │ │ │ ├── a64builder.h │ │ │ │ ├── a64assembler.h │ │ │ │ ├── a64builder.cpp │ │ │ │ ├── armformatter_p.h │ │ │ │ ├── a64emithelper_p.h │ │ │ │ ├── a64compiler.cpp │ │ │ │ └── a64formatter.cpp │ │ │ ├── ujit.h │ │ │ ├── ujit │ │ │ │ ├── vecconsttable.cpp │ │ │ │ └── unicompiler_utils_p.h │ │ │ ├── host.h │ │ │ ├── x86 │ │ │ │ ├── x86func_p.h │ │ │ │ ├── x86formatter_p.h │ │ │ │ ├── x86instapi_p.h │ │ │ │ ├── x86builder.cpp │ │ │ │ └── x86compiler.cpp │ │ │ ├── asmjit.h │ │ │ ├── support │ │ │ │ └── arenapool.h │ │ │ └── a64.h │ │ ├── configure_sanitizers.sh │ │ ├── db │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ └── isa_aarch64_sme.json │ │ ├── asmjit-testing │ │ │ ├── commons │ │ │ │ ├── performancetimer.h │ │ │ │ ├── cmdline.h │ │ │ │ └── random.h │ │ │ └── tests │ │ │ │ ├── asmjit_test_unicompiler_avx2fma.cpp │ │ │ │ └── asmjit_test_compiler.h │ │ └── LICENSE.md │ ├── gui │ │ └── gui_app.hpp │ ├── core │ │ ├── adasm.hpp │ │ ├── mba.hpp │ │ ├── adasm.cpp │ │ ├── asmjit_compat.hpp │ │ └── core.hpp │ ├── pe_lib │ │ ├── pe_checksum.h │ │ ├── pe_factory.cpp │ │ ├── pe_exception.cpp │ │ ├── pe_properties.cpp │ │ ├── pe_factory.h │ │ ├── pe_bliss.h │ │ ├── stdint_defs.h │ │ ├── pe_bliss_resources.h │ │ ├── pe_directory.h │ │ ├── pe_rebuilder.h │ │ ├── resource_data_info.h │ │ ├── version_info_types.h │ │ ├── resource_data_info.cpp │ │ ├── pe_directory.cpp │ │ ├── resource_internal.h │ │ ├── pe_rich_data.h │ │ ├── resource_bitmap_writer.h │ │ ├── message_table.h │ │ ├── resource_version_info_writer.h │ │ ├── entropy.h │ │ ├── resource_message_list_reader.h │ │ ├── resource_bitmap_reader.h │ │ ├── resource_string_table_reader.h │ │ ├── message_table.cpp │ │ ├── resource_version_info_reader.h │ │ ├── resource_bitmap_writer.cpp │ │ └── pe_checksum.cpp │ ├── utils │ │ ├── arguments.hpp │ │ ├── utils.hpp │ │ └── arguments.cpp │ └── handler │ │ └── handler.hpp ├── vendor │ └── imgui │ │ ├── misc │ │ ├── fonts │ │ │ ├── DroidSans.ttf │ │ │ ├── ProggyTiny.ttf │ │ │ ├── ProggyClean.ttf │ │ │ ├── Cousine-Regular.ttf │ │ │ ├── Karla-Regular.ttf │ │ │ └── Roboto-Medium.ttf │ │ ├── debuggers │ │ │ ├── imgui.gdb │ │ │ ├── README.txt │ │ │ ├── imgui.natstepfilter │ │ │ └── imgui.natvis │ │ ├── cpp │ │ │ ├── README.txt │ │ │ └── imgui_stdlib.h │ │ ├── README.txt │ │ └── single_file │ │ │ └── imgui_single_file.h │ │ ├── examples │ │ ├── libs │ │ │ ├── glfw │ │ │ │ ├── lib-vc2010-32 │ │ │ │ │ └── glfw3.lib │ │ │ │ ├── lib-vc2010-64 │ │ │ │ │ └── glfw3.lib │ │ │ │ └── COPYING.txt │ │ │ └── usynergy │ │ │ │ └── README.txt │ │ ├── example_android_opengl3 │ │ │ ├── android │ │ │ │ ├── build.gradle │ │ │ │ ├── .gitignore │ │ │ │ ├── settings.gradle │ │ │ │ └── app │ │ │ │ │ ├── build.gradle │ │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── java │ │ │ │ │ └── MainActivity.kt │ │ │ └── CMakeLists.txt │ │ ├── example_null │ │ │ ├── build_win32.bat │ │ │ ├── main.cpp │ │ │ └── example_null.vcxproj.filters │ │ ├── example_apple_metal │ │ │ ├── README.md │ │ │ ├── Makefile │ │ │ ├── macOS │ │ │ │ └── Info-macOS.plist │ │ │ └── iOS │ │ │ │ ├── Info-iOS.plist │ │ │ │ └── LaunchScreen.storyboard │ │ ├── example_win32_opengl3 │ │ │ ├── build_mingw.bat │ │ │ └── build_win32.bat │ │ ├── example_win32_directx9 │ │ │ └── build_win32.bat │ │ ├── example_sdl3_sdlrenderer3 │ │ │ └── build_win32.bat │ │ ├── example_glfw_opengl2 │ │ │ └── build_win32.bat │ │ ├── example_glfw_opengl3 │ │ │ └── build_win32.bat │ │ ├── example_sdl2_sdlrenderer2 │ │ │ ├── build_win32.bat │ │ │ └── README.md │ │ ├── example_sdl2_opengl2 │ │ │ ├── build_win32.bat │ │ │ └── README.md │ │ ├── example_sdl2_opengl3 │ │ │ └── build_win32.bat │ │ ├── example_win32_directx12 │ │ │ └── build_win32.bat │ │ ├── example_allegro5 │ │ │ ├── imconfig_allegro5.h │ │ │ ├── README.md │ │ │ └── example_allegro5.vcxproj.filters │ │ ├── example_win32_vulkan │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ └── example_win32_vulkan.vcxproj.filters │ │ ├── example_win32_directx10 │ │ │ ├── build_win32.bat │ │ │ └── example_win32_directx10.vcxproj.filters │ │ ├── example_win32_directx11 │ │ │ ├── build_win32.bat │ │ │ └── example_win32_directx11.vcxproj.filters │ │ ├── example_sdl3_directx11 │ │ │ ├── build_win32.bat │ │ │ └── example_sdl3_directx11.vcxproj.filters │ │ ├── example_sdl2_directx11 │ │ │ ├── build_win32.bat │ │ │ └── example_sdl2_directx11.vcxproj.filters │ │ ├── example_sdl3_sdlgpu3 │ │ │ ├── build_win64.bat │ │ │ ├── example_sdl3_sdlgpu3.vcxproj.filters │ │ │ └── Makefile │ │ ├── example_apple_opengl2 │ │ │ └── Makefile │ │ ├── example_sdl3_opengl3 │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ └── README.md │ │ ├── example_glfw_vulkan │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ └── CMakeLists.txt │ │ ├── example_sdl3_vulkan │ │ │ ├── build_win32.bat │ │ │ └── build_win64.bat │ │ ├── README.txt │ │ ├── example_sdl2_vulkan │ │ │ ├── build_win64.bat │ │ │ └── build_win32.bat │ │ ├── example_sdl2_metal │ │ │ └── Makefile │ │ ├── example_glfw_metal │ │ │ └── Makefile │ │ ├── example_sdl3_metal │ │ │ └── Makefile │ │ └── example_glut_opengl2 │ │ │ └── Makefile │ │ ├── backends │ │ ├── vulkan │ │ │ ├── build_instructions.txt │ │ │ ├── generate_spv.sh │ │ │ ├── glsl_shader.frag │ │ │ └── glsl_shader.vert │ │ ├── sdlgpu3 │ │ │ ├── shader.frag │ │ │ ├── shader.vert │ │ │ └── build_instructions.txt │ │ ├── imgui_impl_null.h │ │ ├── imgui_impl_dx9.h │ │ └── imgui_impl_android.h │ │ ├── .gitattributes │ │ ├── LICENSE.txt │ │ ├── .editorconfig │ │ └── .gitignore └── pe-packer-x64.sln └── README.md /pe-packer-x64/pe-packer-x64/asmjit/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /build_* 3 | .vscode 4 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/gui/gui_app.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int run_gui(); 4 | 5 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/tools/tablegen-a64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | node ./tablegen-a64.js 4 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/tools/enumgen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | node ./enumgen.js $@ 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 参考项目https://github.com/notcpuid/pe-packer 将其转换为支持x64 修改一些版本适配问题 切勿用于违法途径 仅供研究 2 | 定期跟新新技术,别j8来问我能不能过360!!! 3 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/tools/tablegen-x86.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | node ./tablegen-x86.js $@ 4 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/configure_vs2022_x64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cmake . -B build_x64 -G"Visual Studio 17" -A x64 -DASMJIT_TEST=ON 3 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/configure_vs2022_x86.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cmake . -B build_x86 -G"Visual Studio 17" -A Win32 -DASMJIT_TEST=ON 3 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/tools/tablegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | node ./tablegen-a32.js $@ 4 | node ./tablegen-a64.js $@ 5 | node ./tablegen-x86.js $@ 6 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangtangtang0x10/pepackerx64/HEAD/pe-packer-x64/vendor/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/vulkan/build_instructions.txt: -------------------------------------------------------------------------------- 1 | 2 | Script to rebuild shaders stored inside imgui_impl_vulkan.h 3 | (You don't need to copy this folder if you are using the backend as-is) 4 | 5 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/core/adasm.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "core.hpp" 3 | 4 | class c_adasm { 5 | public: 6 | c_adasm(c_core& g_core); 7 | void jmp_label_skip(); 8 | private: 9 | c_core& m_core; 10 | }; 11 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "== [configure debug] ==" 4 | cmake --preset debug "$@" 5 | echo "" 6 | 7 | echo "== [configure release] ==" 8 | cmake --preset release "$@" 9 | echo "" 10 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_checksum.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "stdint_defs.h" 4 | 5 | namespace pe_bliss 6 | { 7 | //Calculate checksum of image (performs no checks on PE structures) 8 | uint32_t calculate_checksum(std::istream& file); 9 | } 10 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/core/mba.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "core.hpp" 3 | 4 | class c_mba { 5 | public: 6 | c_mba(c_core& g_core); 7 | struct options {}; 8 | void mba_code(c_mba::options opt); 9 | private: 10 | c_core& m_core; 11 | void gen_math_operations(); 12 | }; 13 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | alias(libs.plugins.android.application) apply false 4 | alias(libs.plugins.kotlin.android) apply false 5 | } 6 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org for more details. 2 | root = true 3 | 4 | [*.{cpp,h,natvis}] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_style = space 8 | indent_size = 2 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/vulkan/generate_spv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## -V: create SPIR-V binary 3 | ## -x: save binary output as text-based 32-bit hexadecimal numbers 4 | ## -o: output file 5 | glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag 6 | glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert 7 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_null/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /utf-8 /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib 4 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/asmjit-scope-end.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifdef _WIN32 7 | #pragma pop_macro("min") 8 | #pragma pop_macro("max") 9 | #endif 10 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/android/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.iml 3 | .gradle 4 | .idea 5 | .DS_Store 6 | /captures 7 | .externalNativeBuild 8 | .cxx 9 | local.properties 10 | 11 | # Android Studio puts a Gradle wrapper here, that we don't want: 12 | gradle/ 13 | !gradle/libs.versions.toml 14 | gradlew* 15 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/utils/arguments.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace arguments { 5 | extern int argc; 6 | extern char** argv; 7 | 8 | void init(int v_argc, char** v_argv); 9 | bool has(const char* flag); 10 | const char* get(const char* flag); 11 | std::string get_after(const char* key, int offset = 0); 12 | } 13 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/libs/usynergy/README.txt: -------------------------------------------------------------------------------- 1 | 2 | uSynergy client -- Implementation for the embedded Synergy client library 3 | version 1.0.0, July 7th, 2012 4 | Copyright (c) 2012 Alex Evans 5 | 6 | This is a copy of the files once found at: 7 | https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro 8 | 9 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/configure_sanitizers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "== [configure release-asan] ==" 4 | cmake --preset release-asan "$@" 5 | echo "" 6 | 7 | echo "== [configure release-msan] ==" 8 | cmake --preset release-msan "$@" 9 | echo "" 10 | 11 | echo "== [configure release-ubsan] ==" 12 | cmake --preset release-ubsan "$@" 13 | echo "" 14 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/sdlgpu3/shader.frag: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) out vec4 fColor; 3 | 4 | layout(set=2, binding=0) uniform sampler2D sTexture; 5 | 6 | layout(location = 0) in struct 7 | { 8 | vec4 Color; 9 | vec2 UV; 10 | } In; 11 | 12 | void main() 13 | { 14 | fColor = In.Color * texture(sTexture, In.UV.st); 15 | } 16 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/vulkan/glsl_shader.frag: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) out vec4 fColor; 3 | 4 | layout(set=0, binding=0) uniform sampler2D sTexture; 5 | 6 | layout(location = 0) in struct { 7 | vec4 Color; 8 | vec2 UV; 9 | } In; 10 | 11 | void main() 12 | { 13 | fColor = In.Color * texture(sTexture, In.UV.st); 14 | } 15 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_factory.cpp: -------------------------------------------------------------------------------- 1 | #include "pe_factory.h" 2 | #include "pe_properties_generic.h" 3 | 4 | namespace pe_bliss 5 | { 6 | pe_base pe_factory::create_pe(std::istream& file, bool read_debug_raw_data) 7 | { 8 | return pe_base::get_pe_type(file) == pe_type_32 9 | ? pe_base(file, pe_properties_32(), read_debug_raw_data) 10 | : pe_base(file, pe_properties_64(), read_debug_raw_data); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/db/index.js: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | "use strict"; 7 | 8 | exports.base = require("./base.js"); 9 | exports.aarch32 = require("./aarch32.js"); 10 | exports.aarch64 = require("./aarch64.js"); 11 | exports.x86 = require("./x86.js"); 12 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_apple_metal/README.md: -------------------------------------------------------------------------------- 1 | # iOS / OSX Metal example 2 | 3 | ## Introduction 4 | 5 | This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9. 6 | 7 | Consider basing your work off the example_glfw_metal/ or example_sdl2_metal/ examples. They are better supported and will be portable unlike this one. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/asmjit-scope-begin.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifdef _WIN32 7 | #pragma push_macro("min") 8 | #pragma push_macro("max") 9 | 10 | #ifdef min 11 | #undef min 12 | #endif 13 | 14 | #ifdef max 15 | #undef max 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_opengl3/build_mingw.bat: -------------------------------------------------------------------------------- 1 | @REM Build for MINGW64 or 32 from MSYS2. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_opengl3 4 | @set INCLUDES=-I../.. -I../../backends 5 | @set SOURCES=main.cpp ../../backends/imgui_impl_opengl3.cpp ../../backends/imgui_impl_win32.cpp ../../imgui*.cpp 6 | @set LIBS=-lopengl32 -lgdi32 -ldwmapi 7 | mkdir %OUT_DIR% 8 | g++ -DUNICODE %INCLUDES% %SOURCES% -o %OUT_DIR%/%OUT_EXE%.exe --static -mwindows %LIBS% %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_exception.cpp: -------------------------------------------------------------------------------- 1 | #include "pe_exception.h" 2 | 3 | namespace pe_bliss 4 | { 5 | //PE exception class constructors 6 | pe_exception::pe_exception(const char* text, exception_id id) 7 | :std::runtime_error(text), id_(id) 8 | {} 9 | 10 | pe_exception::pe_exception(const std::string& text, exception_id id) 11 | :std::runtime_error(text), id_(id) 12 | {} 13 | 14 | //Returns exception ID 15 | pe_exception::exception_id pe_exception::get_id() const 16 | { 17 | return id_; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/target.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #include 8 | 9 | ASMJIT_BEGIN_NAMESPACE 10 | 11 | Target::Target() noexcept 12 | : _environment{}, 13 | _cpu_features{}, 14 | _cpu_hints{} {} 15 | Target::~Target() noexcept {} 16 | 17 | ASMJIT_END_NAMESPACE 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_properties.cpp: -------------------------------------------------------------------------------- 1 | #include "pe_properties.h" 2 | 3 | namespace pe_bliss 4 | { 5 | //Destructor 6 | pe_properties::~pe_properties() 7 | {} 8 | 9 | //Clears PE characteristics flag 10 | void pe_properties::clear_characteristics_flags(uint16_t flags) 11 | { 12 | set_characteristics(get_characteristics() & ~flags); 13 | } 14 | 15 | //Sets PE characteristics flag 16 | void pe_properties::set_characteristics_flags(uint16_t flags) 17 | { 18 | set_characteristics(get_characteristics() | flags); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_factory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "pe_base.h" 5 | 6 | namespace pe_bliss 7 | { 8 | class pe_factory 9 | { 10 | public: 11 | //Creates pe_base class instance from PE or PE+ istream 12 | //If read_bound_import_raw_data, raw bound import data will be read (used to get bound import info) 13 | //If read_debug_raw_data, raw debug data will be read (used to get image debug info) 14 | static pe_base create_pe(std::istream& file, bool read_debug_raw_data = true); 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_bliss.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pe_base.h" 3 | #include "pe_rebuilder.h" 4 | #include "pe_factory.h" 5 | #include "pe_bound_import.h" 6 | #include "pe_debug.h" 7 | #include "pe_dotnet.h" 8 | #include "pe_exception_directory.h" 9 | #include "pe_exports.h" 10 | #include "pe_imports.h" 11 | #include "pe_load_config.h" 12 | #include "pe_relocations.h" 13 | #include "pe_resources.h" 14 | #include "pe_rich_data.h" 15 | #include "pe_tls.h" 16 | #include "pe_properties_generic.h" 17 | #include "pe_checksum.h" 18 | #include "entropy.h" 19 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.c text 4 | *.cpp text 5 | *.h text 6 | *.m text 7 | *.mm text 8 | *.md text 9 | *.txt text 10 | *.html text 11 | *.bat text 12 | *.frag text 13 | *.vert text 14 | *.mkb text 15 | *.icf text 16 | 17 | *.sln text eol=crlf 18 | *.vcxproj text eol=crlf 19 | *.vcxproj.filters text eol=crlf 20 | *.natvis text eol=crlf 21 | 22 | Makefile text eol=lf 23 | *.sh text eol=lf 24 | *.pbxproj text eol=lf 25 | *.storyboard text eol=lf 26 | *.plist text eol=lf 27 | 28 | *.png binary 29 | *.ttf binary 30 | *.lib binary 31 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/sdlgpu3/shader.vert: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) in vec2 aPos; 3 | layout(location = 1) in vec2 aUV; 4 | layout(location = 2) in vec4 aColor; 5 | 6 | layout(set=1,binding=0) uniform UBO 7 | { 8 | vec2 uScale; 9 | vec2 uTranslate; 10 | } ubo; 11 | 12 | layout(location = 0) out struct 13 | { 14 | vec4 Color; 15 | vec2 UV; 16 | } Out; 17 | 18 | void main() 19 | { 20 | Out.Color = aColor; 21 | Out.UV = aUV; 22 | gl_Position = vec4(aPos * ubo.uScale + ubo.uTranslate, 0, 1); 23 | gl_Position.y *= -1.0f; 24 | } 25 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/armglobals.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_ARMGLOBALS_H_INCLUDED 7 | #define ASMJIT_ARM_ARMGLOBALS_H_INCLUDED 8 | 9 | #include 10 | #include 11 | 12 | //! \namespace asmjit::arm 13 | //! \ingroup asmjit_arm 14 | //! 15 | //! API shared between AArch32 & AArch64 backends. 16 | 17 | #endif // ASMJIT_ARM_ARMGLOBALS_H_INCLUDED 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/stdint_defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef _MSC_VER 3 | #if _MSC_VER < 1600 4 | namespace pe_bliss 5 | { 6 | //stdint.h definitions for MSVC 2008 and earlier, as 7 | //it doesn't have them 8 | typedef signed char int8_t; 9 | typedef short int16_t; 10 | typedef int int32_t; 11 | 12 | typedef unsigned char uint8_t; 13 | typedef unsigned short uint16_t; 14 | typedef unsigned int uint32_t; 15 | 16 | typedef long long int64_t; 17 | typedef unsigned long long uint64_t; 18 | } 19 | #else 20 | #include 21 | #endif 22 | #else 23 | #include 24 | #endif 25 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/vulkan/glsl_shader.vert: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) in vec2 aPos; 3 | layout(location = 1) in vec2 aUV; 4 | layout(location = 2) in vec4 aColor; 5 | 6 | layout(push_constant) uniform uPushConstant { 7 | vec2 uScale; 8 | vec2 uTranslate; 9 | } pc; 10 | 11 | out gl_PerVertex { 12 | vec4 gl_Position; 13 | }; 14 | 15 | layout(location = 0) out struct { 16 | vec4 Color; 17 | vec2 UV; 18 | } Out; 19 | 20 | void main() 21 | { 22 | Out.Color = aColor; 23 | Out.UV = aUV; 24 | gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); 25 | } 26 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_directx9/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx9 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%DXSDK_DIR%/Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_dx9.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_sdlrenderer3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl3_sdlrenderer3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_sdlrenderer3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/ujit.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_UJIT_H_INCLUDED 7 | #define ASMJIT_UJIT_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #endif // ASMJIT_UJIT_H_INCLUDED 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/core/adasm.cpp: -------------------------------------------------------------------------------- 1 | #include "adasm.hpp" 2 | #include "utils/utils.hpp" 3 | 4 | using namespace asmjit; 5 | 6 | c_adasm::c_adasm(c_core& g_core) : m_core(g_core) {} 7 | 8 | void c_adasm::jmp_label_skip() { 9 | Label skip_cc = m_core.get_assembler()->new_label(); 10 | m_core.get_assembler()->jz(skip_cc); 11 | m_core.get_assembler()->jnz(skip_cc); 12 | m_core.get_assembler()->db(0xE9); 13 | if (m_core.obf_fake_instr) { 14 | for (int i = 0; i < random_value(0x1, 0x100); ++i) { 15 | m_core.get_assembler()->db(random_value(0x10, 0xFF)); 16 | } 17 | } 18 | m_core.get_assembler()->bind(skip_cc); 19 | } 20 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_bliss_resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "file_version_info.h" 3 | #include "message_table.h" 4 | #include "pe_resource_manager.h" 5 | #include "pe_resource_viewer.h" 6 | #include "version_info_editor.h" 7 | #include "version_info_viewer.h" 8 | #include "resource_bitmap_reader.h" 9 | #include "resource_bitmap_writer.h" 10 | #include "resource_cursor_icon_reader.h" 11 | #include "resource_cursor_icon_writer.h" 12 | #include "resource_version_info_reader.h" 13 | #include "resource_version_info_writer.h" 14 | #include "resource_string_table_reader.h" 15 | #include "resource_message_list_reader.h" 16 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glfw_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_glfw_opengl2 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glfw_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_glfw_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_sdlrenderer2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_sdlrenderer_ 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_directory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "stdint_defs.h" 3 | 4 | namespace pe_bliss 5 | { 6 | //Class representing image directory data 7 | class image_directory 8 | { 9 | public: 10 | //Default constructor 11 | image_directory(); 12 | //Constructor from data 13 | image_directory(uint32_t rva, uint32_t size); 14 | 15 | //Returns RVA 16 | uint32_t get_rva() const; 17 | //Returns size 18 | uint32_t get_size() const; 19 | 20 | //Sets RVA 21 | void set_rva(uint32_t rva); 22 | //Sets size 23 | void set_size(uint32_t size); 24 | 25 | private: 26 | uint32_t rva_; 27 | uint32_t size_; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_opengl2 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/debuggers/imgui.gdb: -------------------------------------------------------------------------------- 1 | # GDB configuration to aid debugging experience 2 | 3 | # To enable these customizations edit $HOME/.gdbinit (or ./.gdbinit if local gdbinit is enabled) and add: 4 | # add-auto-load-safe-path /path/to/imgui.gdb 5 | # source /path/to/imgui.gdb 6 | # 7 | # More Information at: 8 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html 9 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/Init-File-in-the-Current-Directory.html#Init-File-in-the-Current-Directory 10 | 11 | # Disable stepping into trivial functions 12 | skip -rfunction Im(Vec2|Vec4|Strv|Vector|Span)::.+ 13 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_directx12/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx12 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_dx12.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=d3d12.lib d3dcompiler.lib dxgi.lib 7 | mkdir Debug 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_rebuilder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace pe_bliss 5 | { 6 | class pe_base; 7 | //Rebuilds PE image, writes resulting image to ostream "out". If strip_dos_header == true, DOS header will be stripped a little 8 | //If change_size_of_headers == true, SizeOfHeaders will be recalculated automatically 9 | //If save_bound_import == true, existing bound import directory will be saved correctly (because some compilers and bind.exe put it to PE headers) 10 | void rebuild_pe(pe_base& pe, std::ostream& out, bool strip_dos_header = false, bool change_size_of_headers = true, bool save_bound_import = true); 11 | } 12 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_allegro5/imconfig_allegro5.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE 3 | // See imconfig.h for the full template 4 | // Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices 5 | //----------------------------------------------------------------------------- 6 | 7 | #pragma once 8 | 9 | // Use 32-bit vertex indices because Allegro doesn't support 16-bit ones 10 | // This allows us to avoid converting vertices format at runtime 11 | #define ImDrawIdx int 12 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/utils/utils.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | inline int random_value(int from, int to) { 5 | std::random_device dev; 6 | std::mt19937 rng(dev()); 7 | std::uniform_int_distribution dist6(from, to); 8 | 9 | return dist6(rng); 10 | } 11 | 12 | inline void enable_virtual_terminal_processing() { 13 | HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); 14 | if (hOut == INVALID_HANDLE_VALUE) return; 15 | 16 | DWORD dwMode = 0; 17 | if (!GetConsoleMode(hOut, &dwMode)) return; 18 | 19 | dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; 20 | SetConsoleMode(hOut, dwMode); 21 | } -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | dependencyResolutionManagement { 15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | include ':app' 23 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/errorhandler.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | ASMJIT_BEGIN_NAMESPACE 11 | 12 | ErrorHandler::ErrorHandler() noexcept {} 13 | ErrorHandler::~ErrorHandler() noexcept {} 14 | 15 | void ErrorHandler::handle_error(Error err, const char* message, BaseEmitter* origin) { 16 | Support::maybe_unused(err, message, origin); 17 | } 18 | 19 | ASMJIT_END_NAMESPACE 20 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=/libpath:%VULKAN_SDK%\lib32 vulkan-1.lib 7 | 8 | mkdir %OUT_DIR% 9 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 10 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=/libpath:%VULKAN_SDK%\lib vulkan-1.lib 7 | 8 | mkdir %OUT_DIR% 9 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 10 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_data_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "stdint_defs.h" 4 | 5 | namespace pe_bliss 6 | { 7 | class resource_data_entry; 8 | 9 | //Class representing resource data 10 | class resource_data_info 11 | { 12 | public: 13 | //Constructor from data 14 | resource_data_info(const std::string& data, uint32_t codepage); 15 | //Constructor from data 16 | explicit resource_data_info(const resource_data_entry& data); 17 | 18 | //Returns resource data 19 | const std::string& get_data() const; 20 | //Returns resource codepage 21 | uint32_t get_codepage() const; 22 | 23 | private: 24 | std::string data_; 25 | uint32_t codepage_; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_directx10/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx10 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\backends\imgui_impl_dx10.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/ujit/vecconsttable.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #include 8 | 9 | #if !defined(ASMJIT_NO_UJIT) 10 | 11 | ASMJIT_BEGIN_SUB_NAMESPACE(ujit) 12 | 13 | // REFACTOR [C++20]: Use 'constinit' to make sure the constant is initialized at compile-time. 14 | static constexpr VecConstTable vec_const_table_; 15 | 16 | const VecConstTable vec_const_table = vec_const_table_; 17 | 18 | ASMJIT_END_SUB_NAMESPACE 19 | 20 | #endif // !ASMJIT_NO_UJIT 21 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_win32_directx11 4 | @set INCLUDES=/I..\.. /I..\..\backends /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 9 | 10 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/version_info_types.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "stdint_defs.h" 5 | 6 | namespace pe_bliss 7 | { 8 | //Typedef for version info functions: Name - Value 9 | typedef std::map string_values_map; 10 | //Typedef for version info functions: Language string - String Values Map 11 | //Language String consists of LangID and CharsetID 12 | //E.g. 041904b0 for Russian UNICODE, 040004b0 for Process Default Language UNICODE 13 | typedef std::map lang_string_values_map; 14 | 15 | //Typedef for version info functions: Language - Character Set 16 | typedef std::multimap translation_values_map; 17 | } 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_data_info.cpp: -------------------------------------------------------------------------------- 1 | #include "resource_data_info.h" 2 | #include "pe_resource_viewer.h" 3 | 4 | namespace pe_bliss 5 | { 6 | //Default constructor 7 | resource_data_info::resource_data_info(const std::string& data, uint32_t codepage) 8 | :data_(data), codepage_(codepage) 9 | {} 10 | 11 | //Constructor from data 12 | resource_data_info::resource_data_info(const resource_data_entry& data) 13 | :data_(data.get_data()), codepage_(data.get_codepage()) 14 | {} 15 | 16 | //Returns resource data 17 | const std::string& resource_data_info::get_data() const 18 | { 19 | return data_; 20 | } 21 | 22 | //Returns resource codepage 23 | uint32_t resource_data_info::get_codepage() const 24 | { 25 | return codepage_; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_directory.cpp: -------------------------------------------------------------------------------- 1 | #include "pe_directory.h" 2 | 3 | namespace pe_bliss 4 | { 5 | //Default constructor 6 | image_directory::image_directory() 7 | :rva_(0), size_(0) 8 | {} 9 | 10 | //Constructor from data 11 | image_directory::image_directory(uint32_t rva, uint32_t size) 12 | :rva_(rva), size_(size) 13 | {} 14 | 15 | //Returns RVA 16 | uint32_t image_directory::get_rva() const 17 | { 18 | return rva_; 19 | } 20 | 21 | //Returns size 22 | uint32_t image_directory::get_size() const 23 | { 24 | return size_; 25 | } 26 | 27 | //Sets RVA 28 | void image_directory::set_rva(uint32_t rva) 29 | { 30 | rva_ = rva; 31 | } 32 | 33 | //Sets size 34 | void image_directory::set_size(uint32_t size) 35 | { 36 | size_ = size; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl3_directx11 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | @set OUT_DIR=Debug 3 | @set OUT_EXE=example_sdl2_directx11 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib shell32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/cpp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | imgui_stdlib.h + imgui_stdlib.cpp 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | imgui_scoped.h 7 | [Experimental, not currently in main repository] 8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions. 9 | Try by merging: https://github.com/ocornut/imgui/pull/2197 10 | Discuss at: https://github.com/ocornut/imgui/issues/2096 11 | 12 | imgui-module: 13 | C++20 module binding 14 | https://github.com/stripe2933/imgui-module 15 | 16 | See more C++ related extension (fmt, RAII, syntactic sugar) on Wiki: 17 | https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_internal.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define U16TEXT(t) reinterpret_cast( t ) 4 | 5 | #define StringFileInfo U16TEXT("S\0t\0r\0i\0n\0g\0F\0i\0l\0e\0I\0n\0f\0o\0\0") 6 | #define SizeofStringFileInfo sizeof("S\0t\0r\0i\0n\0g\0F\0i\0l\0e\0I\0n\0f\0o\0\0") 7 | #define VarFileInfo U16TEXT("V\0a\0r\0F\0i\0l\0e\0I\0n\0f\0o\0\0") 8 | #define Translation U16TEXT("T\0r\0a\0n\0s\0l\0a\0t\0i\0o\0n\0\0") 9 | 10 | #define VarFileInfoAligned U16TEXT("V\0a\0r\0F\0i\0l\0e\0I\0n\0f\0o\0\0\0\0") 11 | #define TranslationAligned U16TEXT("T\0r\0a\0n\0s\0l\0a\0t\0i\0o\0n\0\0\0\0") 12 | #define SizeofVarFileInfoAligned sizeof("V\0a\0r\0F\0i\0l\0e\0I\0n\0f\0o\0\0\0\0") 13 | #define SizeofTranslationAligned sizeof("T\0r\0a\0n\0s\0l\0a\0t\0i\0o\0n\0\0\0\0") 14 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_sdlgpu3/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_sdlgpu3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_sdlgpu3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 SDL3.lib shell32.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_apple_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for example_apple_metal, for macOS only (**not iOS**) 2 | CXX = clang++ 3 | EXE = example_apple_opengl2 4 | IMGUI_DIR = ../../ 5 | SOURCES = main.mm 6 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 7 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_osx.mm $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp 8 | 9 | CXXFLAGS = -std=c++11 -ObjC++ -fobjc-arc -Wall -Wextra -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 10 | FRAMEWORKS = -framework Cocoa -framework OpenGL -framework GameController 11 | 12 | all: $(EXE) 13 | 14 | $(EXE): $(SOURCES) 15 | $(CXX) $(CXXFLAGS) $(SOURCES) -o $(EXE) $(FRAMEWORKS) 16 | 17 | run: all 18 | ./$(EXE) 19 | 20 | clean: 21 | rm -f $(EXE) *.o 22 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib shell32.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_opengl3/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_opengl3 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 SDL3.lib opengl32.lib shell32.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_apple_metal/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for example_apple_metal, for macOS only (**not iOS**) 2 | CXX = clang++ 3 | EXE = example_apple_metal 4 | IMGUI_DIR = ../../ 5 | SOURCES = main.mm 6 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 7 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_osx.mm $(IMGUI_DIR)/backends/imgui_impl_metal.mm 8 | 9 | CXXFLAGS = -std=c++11 -ObjC++ -fobjc-arc -Wall -Wextra -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 10 | FRAMEWORKS = -framework AppKit -framework Metal -framework MetalKit -framework QuartzCore -framework GameController 11 | 12 | all: $(EXE) 13 | 14 | $(EXE): $(SOURCES) 15 | $(CXX) $(CXXFLAGS) $^ $(FRAMEWORKS) -o $@ 16 | 17 | run: all 18 | ./$(EXE) 19 | 20 | clean: 21 | rm -f $(EXE) *.o 22 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/db/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "asmdb", 3 | "version": "0.1.0", 4 | "license": "Zlib", 5 | "engines": { "node": ">=8" }, 6 | 7 | "description": "Instructions database and utilities for X86/X64 and ARM (THUMB/A32/A64) architectures.", 8 | "keywords": [ 9 | "asm", "assembler", "database", "instructions", 10 | "arm", "thumb", "thumb2", "a32", "a64", "aarch32", "aarch64", 11 | "x86", "x86_64", "x64", "amd64" 12 | ], 13 | 14 | "homepage": "https://github.com/asmjit/asmjit/db", 15 | "bugs": { 16 | "url": "https://github.com/asmjit/asmjit/issues" 17 | }, 18 | 19 | "contributors": [ 20 | "Petr Kobalicek (kobalicek.com)" 21 | ], 22 | 23 | "main": "index.js", 24 | 25 | "repository" : { 26 | "type": "git", 27 | "url": "https://github.com/asmjit/asmjit.git" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glfw_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_glfw_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 11 | 12 | @set OUT_DIR=Release 13 | mkdir %OUT_DIR% 14 | cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glfw_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup 64-bit command-line compiler. 2 | 3 | @set OUT_EXE=example_glfw_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I..\libs\glfw\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 11 | 12 | @set OUT_DIR=Release 13 | mkdir %OUT_DIR% 14 | cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL3.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl3_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL3_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL3_DIR%\lib\x64 /libpath:%VULKAN_SDK%\lib SDL3.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/core/asmjit_compat.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asmjit/asmjit.h" 3 | 4 | // AsmJit兼容层 - 为旧API提供兼容性 5 | 6 | namespace asmjit_compat { 7 | 8 | // 检查Operand是否为寄存器 9 | inline bool isOperandReg(const asmjit::Operand& op) { 10 | return op.isReg(); 11 | } 12 | 13 | // 检查Operand是否为立即数 14 | inline bool isOperandImm(const asmjit::Operand& op) { 15 | return op.isImm(); 16 | } 17 | 18 | // 获取代码大小 19 | inline size_t getCodeSize(asmjit::CodeHolder* holder) { 20 | return holder->codeSize(); 21 | } 22 | 23 | // 获取代码buffer指针 24 | inline const uint8_t* getBufferData(asmjit::CodeHolder* holder) { 25 | asmjit::CodeBuffer& buf = holder->sectionById(0)->buffer(); 26 | return buf.data(); 27 | } 28 | 29 | // 创建新标签 30 | inline asmjit::Label newLabel(asmjit::x86::Assembler* assembler) { 31 | return assembler->newLabel(); 32 | } 33 | 34 | } // namespace asmjit_compat 35 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/README.txt: -------------------------------------------------------------------------------- 1 | New to Dear ImGui? 2 | - Check out the Getting Started guide: https://github.com/ocornut/imgui/wiki/Getting-Started 3 | - About Backends: docs/BACKENDS.md file, or on the web: https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md 4 | - About Examples: docs/EXAMPLES.md file, or on the web: https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md 5 | 6 | Backends = Helper code to facilitate integration with platforms/graphics api (used by Examples + should be used by your app). 7 | Examples = Standalone applications showcasing integration with platforms/graphics api. 8 | 9 | A few Examples have extra README files in their respective directory, please check them too! 10 | 11 | Once Dear ImGui is running (in either examples or your own application/game/engine), 12 | run and refer to ImGui::ShowDemoWindow() in imgui_demo.cpp for the end-user API. 13 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars64.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl2_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x64 /libpath:%VULKAN_SDK%\lib SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | @set OUT_EXE=example_sdl2_vulkan 4 | @set INCLUDES=/I..\.. /I..\..\backends /I%SDL2_DIR%\include /I %VULKAN_SDK%\include 5 | @set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_vulkan.cpp ..\..\imgui*.cpp 6 | @set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 /libpath:%VULKAN_SDK%\lib32 SDL2.lib SDL2main.lib shell32.lib vulkan-1.lib 7 | 8 | @set OUT_DIR=Debug 9 | mkdir %OUT_DIR% 10 | cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 11 | 12 | @set OUT_DIR=Release 13 | @REM mkdir %OUT_DIR% 14 | @REM cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 15 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/host.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_HOST_H_INCLUDED 7 | #define ASMJIT_HOST_H_INCLUDED 8 | 9 | #include 10 | 11 | // Detect 'X86' or 'X86_64' host architectures. 12 | #if ASMJIT_ARCH_X86 != 0 && !defined(ASMJIT_NO_X86) 13 | 14 | #include 15 | 16 | ASMJIT_BEGIN_NAMESPACE 17 | namespace host { using namespace x86; } 18 | ASMJIT_END_NAMESPACE 19 | 20 | #endif 21 | 22 | // Detect 'AArch64' host architecture. 23 | #if ASMJIT_ARCH_ARM == 64 && !defined(ASMJIT_NO_AARCH64) 24 | 25 | #include 26 | 27 | ASMJIT_BEGIN_NAMESPACE 28 | namespace host { using namespace a64; } 29 | ASMJIT_END_NAMESPACE 30 | 31 | #endif 32 | 33 | #endif // ASMJIT_HOST_H_INCLUDED 34 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/debuggers/README.txt: -------------------------------------------------------------------------------- 1 | 2 | HELPER FILES FOR POPULAR DEBUGGERS 3 | 4 | imgui.gdb 5 | GDB: disable stepping into trivial functions. 6 | (read comments inside file for details) 7 | 8 | imgui.natstepfilter 9 | Visual Studio Debugger: disable stepping into trivial functions. 10 | (read comments inside file for details) 11 | 12 | imgui.natvis 13 | Visual Studio Debugger: describe Dear ImGui types for better display. 14 | With this, types like ImVector<> will be displayed nicely in the debugger. 15 | (read comments inside file for details) 16 | 17 | imgui_lldb.py 18 | LLDB-based debuggers (*): synthetic children provider and summaries for Dear ImGui types. 19 | With this, types like ImVector<> will be displayed nicely in the debugger. 20 | (read comments inside file for details) 21 | (*) Xcode, Android Studio, may be used from VS Code, C++Builder, CLion, Eclipse etc. 22 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit-testing/commons/performancetimer.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef PERFORMANCETIMER_H_INCLUDED 7 | #define PERFORMANCETIMER_H_INCLUDED 8 | 9 | #include 10 | 11 | class PerformanceTimer { 12 | public: 13 | using TimePoint = std::chrono::high_resolution_clock::time_point; 14 | 15 | TimePoint _start_time {}; 16 | TimePoint _end_time {}; 17 | 18 | inline void start() { _start_time = std::chrono::high_resolution_clock::now(); } 19 | inline void stop() { _end_time = std::chrono::high_resolution_clock::now(); } 20 | 21 | inline double duration() const { 22 | std::chrono::duration elapsed = _end_time - _start_time; 23 | return elapsed.count() * 1000; 24 | } 25 | }; 26 | 27 | #endif // PERFORMANCETIMER_H_INCLUDED 28 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2025 Petr Kobalicek 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/db/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2025 The AsmJit Authors 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_rich_data.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "pe_structures.h" 4 | #include "pe_base.h" 5 | 6 | namespace pe_bliss 7 | { 8 | //Rich data overlay class of Microsoft Visual Studio 9 | class rich_data 10 | { 11 | public: 12 | //Default constructor 13 | rich_data(); 14 | 15 | public: //Getters 16 | //Who knows, what these fields mean... 17 | uint32_t get_number() const; 18 | uint32_t get_version() const; 19 | uint32_t get_times() const; 20 | 21 | public: //Setters, used by PE library only 22 | void set_number(uint32_t number); 23 | void set_version(uint32_t version); 24 | void set_times(uint32_t times); 25 | 26 | private: 27 | uint32_t number_; 28 | uint32_t version_; 29 | uint32_t times_; 30 | }; 31 | 32 | //Rich data list typedef 33 | typedef std::vector rich_data_list; 34 | 35 | //Returns a vector with rich data (stub overlay) 36 | const rich_data_list get_rich_data(const pe_base& pe); 37 | } 38 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_bitmap_writer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "stdint_defs.h" 4 | 5 | namespace pe_bliss 6 | { 7 | class pe_resource_manager; 8 | 9 | class resource_bitmap_writer 10 | { 11 | public: 12 | resource_bitmap_writer(pe_resource_manager& res); 13 | 14 | //Adds bitmap from bitmap file data. If bitmap already exists, replaces it 15 | //timestamp will be used for directories that will be added 16 | void add_bitmap(const std::string& bitmap_file, uint32_t id, uint32_t language, uint32_t codepage = 0, uint32_t timestamp = 0); 17 | void add_bitmap(const std::string& bitmap_file, const std::wstring& name, uint32_t language, uint32_t codepage = 0, uint32_t timestamp = 0); 18 | 19 | //Removes bitmap by name/ID and language 20 | bool remove_bitmap(const std::wstring& name, uint32_t language); 21 | bool remove_bitmap(uint32_t id, uint32_t language); 22 | 23 | private: 24 | pe_resource_manager& res_; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/message_table.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "stdint_defs.h" 5 | 6 | namespace pe_bliss 7 | { 8 | //Structure representing message table string 9 | class message_table_item 10 | { 11 | public: 12 | //Default constructor 13 | message_table_item(); 14 | //Constructors from ANSI and UNICODE strings 15 | explicit message_table_item(const std::string& str); 16 | explicit message_table_item(const std::wstring& str); 17 | 18 | //Returns true if string is UNICODE 19 | bool is_unicode() const; 20 | //Returns ANSI string 21 | const std::string& get_ansi_string() const; 22 | //Returns UNICODE string 23 | const std::wstring& get_unicode_string() const; 24 | 25 | public: 26 | //Sets ANSI or UNICODE string 27 | void set_string(const std::string& str); 28 | void set_string(const std::wstring& str); 29 | 30 | private: 31 | bool unicode_; 32 | std::string ansi_str_; 33 | std::wstring unicode_str_; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_version_info_writer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "version_info_types.h" 3 | #include "file_version_info.h" 4 | 5 | namespace pe_bliss 6 | { 7 | class pe_resource_manager; 8 | 9 | class resource_version_info_writer 10 | { 11 | public: 12 | resource_version_info_writer(pe_resource_manager& res); 13 | 14 | //Sets/replaces full version information: 15 | //file_version_info: versions and file info 16 | //lang_string_values_map: map of version info strings with encodings 17 | //translation_values_map: map of translations 18 | void set_version_info(const file_version_info& file_info, 19 | const lang_string_values_map& string_values, 20 | const translation_values_map& translations, 21 | uint32_t language, 22 | uint32_t codepage = 0, 23 | uint32_t timestamp = 0); 24 | 25 | //Removes version info by language (ID = 1) 26 | bool remove_version_info(uint32_t language); 27 | 28 | private: 29 | pe_resource_manager& res_; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/entropy.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "pe_base.h" 4 | 5 | namespace pe_bliss 6 | { 7 | class entropy_calculator 8 | { 9 | public: 10 | //Calculates entropy for PE image section 11 | static double calculate_entropy(const section& s); 12 | 13 | //Calculates entropy for istream (from current position of stream) 14 | static double calculate_entropy(std::istream& file); 15 | 16 | //Calculates entropy for data block 17 | static double calculate_entropy(const char* data, size_t length); 18 | 19 | //Calculates entropy for this PE file (only section data) 20 | static double calculate_entropy(const pe_base& pe); 21 | 22 | private: 23 | entropy_calculator(); 24 | entropy_calculator(const entropy_calculator&); 25 | entropy_calculator& operator=(const entropy_calculator&); 26 | 27 | //Calculates entropy from bytes count 28 | static double calculate_entropy(const uint32_t byte_count[256], std::streamoff total_length); 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/ujit/unicompiler_utils_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_UJIT_UNICOMPILER_UTILS_P_H_INCLUDED 7 | #define ASMJIT_UJIT_UNICOMPILER_UTILS_P_H_INCLUDED 8 | 9 | #include 10 | 11 | #if !defined(ASMJIT_NO_UJIT) 12 | 13 | #include 14 | 15 | ASMJIT_BEGIN_SUB_NAMESPACE(ujit) 16 | 17 | //! \addtogroup asmjit_ujit 18 | //! \{ 19 | 20 | template 21 | static ASMJIT_INLINE UniOpDst translate_op(UniOpSrc op, UniOpSrc begin, UniOpDst target) noexcept { 22 | ASMJIT_ASSERT(begin <= op); 23 | uint32_t offset = uint32_t(op) - uint32_t(begin); 24 | return UniOpDst(uint32_t(target) + offset); 25 | } 26 | 27 | //! \} 28 | 29 | ASMJIT_END_SUB_NAMESPACE 30 | 31 | #endif // !ASMJIT_NO_UJIT 32 | #endif // ASMJIT_UJIT_UNICOMPILER_UTILS_P_H_INCLUDED 33 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_message_list_reader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "message_table.h" 3 | 4 | namespace pe_bliss 5 | { 6 | class pe_resource_viewer; 7 | 8 | //ID; message_table_item 9 | typedef std::map resource_message_list; 10 | 11 | class resource_message_list_reader 12 | { 13 | public: 14 | resource_message_list_reader(const pe_resource_viewer& res); 15 | 16 | //Returns message table data by ID and language 17 | const resource_message_list get_message_table_by_id_lang(uint32_t language, uint32_t id) const; 18 | //Returns message table data by ID and index in language directory (instead of language) 19 | const resource_message_list get_message_table_by_id(uint32_t id, uint32_t index = 0) const; 20 | 21 | //Helper function of parsing message list table 22 | //resource_data - raw message table resource data 23 | static const resource_message_list parse_message_list(const std::string& resource_data); 24 | 25 | private: 26 | const pe_resource_viewer& res_; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/utils/arguments.cpp: -------------------------------------------------------------------------------- 1 | #include "arguments.hpp" 2 | #include 3 | 4 | int arguments::argc = 0; 5 | char** arguments::argv = nullptr; 6 | 7 | void arguments::init(int v_argc, char** v_argv) { 8 | argc = v_argc; 9 | argv = v_argv; 10 | } 11 | 12 | bool arguments::has(const char* flag) { 13 | for (int i = 0; i < argc; i++) { 14 | if (strcmp(argv[i], flag) == 0) 15 | return true; 16 | } 17 | return false; 18 | } 19 | 20 | const char* arguments::get(const char* flag) { 21 | for (int i = 0; i < argc; i++) { 22 | if (strcmp(argv[i], flag) == 0 && i + 1 < argc) 23 | return argv[i + 1]; 24 | } 25 | return nullptr; 26 | } 27 | 28 | std::string arguments::get_after(const char* key, int offset) { 29 | for (int i = 0; i < argc; ++i) { 30 | if (strcmp(argv[i], key) == 0) { 31 | int index = i + 1 + offset; 32 | if (index < argc && argv[index][0] != '-') { 33 | return std::string(argv[index]); 34 | } 35 | else { 36 | return ""; 37 | } 38 | } 39 | } 40 | return ""; 41 | } 42 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.android.application) 3 | alias(libs.plugins.kotlin.android) 4 | } 5 | 6 | android { 7 | namespace 'imgui.example.android' 8 | compileSdk 36 9 | 10 | defaultConfig { 11 | applicationId "imgui.example.android" 12 | minSdk 24 13 | targetSdk 36 14 | versionCode 1 15 | versionName "1.0" 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') 22 | } 23 | } 24 | compileOptions { 25 | sourceCompatibility JavaVersion.VERSION_11 26 | targetCompatibility JavaVersion.VERSION_11 27 | } 28 | kotlinOptions { 29 | jvmTarget = '11' 30 | } 31 | externalNativeBuild { 32 | cmake { 33 | path file('../../CMakeLists.txt') 34 | version '3.22.1' 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64func_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_A64FUNC_P_H_INCLUDED 7 | #define ASMJIT_ARM_A64FUNC_P_H_INCLUDED 8 | 9 | #include 10 | 11 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 12 | 13 | //! \cond INTERNAL 14 | //! \addtogroup asmjit_a64 15 | //! \{ 16 | 17 | //! AArch64-specific function API (calling conventions and other utilities). 18 | namespace FuncInternal { 19 | 20 | //! Initialize `CallConv` structure (AArch64 specific). 21 | Error init_call_conv(CallConv& cc, CallConvId call_conv_id, const Environment& environment) noexcept; 22 | 23 | //! Initialize `FuncDetail` (AArch64 specific). 24 | Error init_func_detail(FuncDetail& func, const FuncSignature& signature) noexcept; 25 | 26 | } // {FuncInternal} 27 | 28 | //! \} 29 | //! \endcond 30 | 31 | ASMJIT_END_SUB_NAMESPACE 32 | 33 | #endif // ASMJIT_ARM_A64FUNC_P_H_INCLUDED 34 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/libs/glfw/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/x86/x86func_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_X86_X86FUNC_P_H_INCLUDED 7 | #define ASMJIT_X86_X86FUNC_P_H_INCLUDED 8 | 9 | #include 10 | 11 | ASMJIT_BEGIN_SUB_NAMESPACE(x86) 12 | 13 | //! \cond INTERNAL 14 | //! \addtogroup asmjit_x86 15 | //! \{ 16 | 17 | //! X86-specific function API (calling conventions and other utilities). 18 | namespace FuncInternal { 19 | 20 | //! Initialize `CallConv` structure (X86 specific). 21 | Error init_call_conv(CallConv& cc, CallConvId call_conv_id, const Environment& environment) noexcept; 22 | 23 | //! Initialize `FuncDetail` (X86 specific). 24 | Error init_func_detail(FuncDetail& func, const FuncSignature& signature, uint32_t register_size) noexcept; 25 | 26 | } // {FuncInternal} 27 | 28 | //! \} 29 | //! \endcond 30 | 31 | ASMJIT_END_SUB_NAMESPACE 32 | 33 | #endif // ASMJIT_X86_X86FUNC_P_H_INCLUDED 34 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_apple_metal/macOS/Info-macOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | imgui 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSMainStoryboardFile 26 | MainMenu 27 | NSPrincipalClass 28 | NSApplication 29 | 30 | 31 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | misc/cpp/ 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | misc/debuggers/ 7 | Helper files for popular debuggers (Visual Studio, GDB, LLDB). 8 | e.g. With the .natvis file, types like ImVector<> will be displayed nicely in Visual Studio debugger. 9 | 10 | misc/fonts/ 11 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). 12 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. 13 | Suggested fonts and links. 14 | 15 | misc/freetype/ 16 | Font atlas builder/rasterizer using FreeType instead of stb_truetype. 17 | Benefit from better FreeType rasterization, in particular for small fonts. 18 | 19 | misc/single_file/ 20 | Single-file header stub. 21 | We use this to validate compiling all *.cpp files in a same compilation unit. 22 | Users of that technique (also called "Unity builds") can generally provide this themselves, 23 | so we don't really recommend you use this in your projects. 24 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/single_file/imgui_single_file.h: -------------------------------------------------------------------------------- 1 | // dear imgui: single-file wrapper include 2 | // We use this to validate compiling all *.cpp files in a same compilation unit. 3 | // Users of that technique (also called "Unity builds") can generally provide this themselves, 4 | // so we don't really recommend you use this in your projects. 5 | 6 | // Do this: 7 | // #define IMGUI_IMPLEMENTATION 8 | // Before you include this file in *one* C++ file to create the implementation. 9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. 10 | 11 | #ifdef IMGUI_IMPLEMENTATION 12 | #define IMGUI_DEFINE_MATH_OPERATORS 13 | #endif 14 | 15 | #include "../../imgui.h" 16 | #ifdef IMGUI_ENABLE_FREETYPE 17 | #include "../../misc/freetype/imgui_freetype.h" 18 | #endif 19 | 20 | #ifdef IMGUI_IMPLEMENTATION 21 | #include "../../imgui.cpp" 22 | #include "../../imgui_demo.cpp" 23 | #include "../../imgui_draw.cpp" 24 | #include "../../imgui_tables.cpp" 25 | #include "../../imgui_widgets.cpp" 26 | #ifdef IMGUI_ENABLE_FREETYPE 27 | #include "../../misc/freetype/imgui_freetype.cpp" 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28701.123 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pe-packer-x64", "pe-packer-x64\pe-packer-x64.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Debug|x64.ActiveCfg = Debug|x64 15 | {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Debug|x64.Build.0 = Debug|x64 16 | {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Release|x64.ActiveCfg = Release|x64 17 | {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Release|x64.Build.0 = Release|x64 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC943} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/db/README.md: -------------------------------------------------------------------------------- 1 | AsmJit Instruction Database 2 | --------------------------- 3 | 4 | This is a database of instructions that is used by AsmJit to generate its internal database and also assembler implementations. This project started initially as AsmDB, but was merged to AsmJit later to make the maintenance easier. The database was created in a way so that each instruction definition would only need a single line in JSON data file. The data is then processed by architecture specific data readers that make the data canonical and ready for processing. 5 | 6 | AsmJit database provides the following ISAs: 7 | 8 | * `isa_x86.json` - provides X86 instruction data (both 32-bit and 64-bit) 9 | * `isa_aarch32.json` - provides AArch32 instruction data (A32/T16/T32 encoding) 10 | * `isa_aarch64.json` - provides AArch64 instruction data (A64 encoding) 11 | * `isa_aarch64_sme.json` - provides AArch64 SME instruction data (work-in-progress) 12 | 13 | To Be Documented 14 | ---------------- 15 | 16 | This project will be refactored and documented in the future. 17 | 18 | License 19 | ------- 20 | 21 | AsmJit database is licensed under [Zlib License](./LICENSE.md) 22 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2025 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/osutils.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #if !defined(_WIN32) 11 | #include 12 | #include 13 | #endif 14 | 15 | ASMJIT_BEGIN_NAMESPACE 16 | 17 | #if !defined(_WIN32) 18 | Error OSUtils::read_file(const char* name, String& dst, size_t max_size) noexcept { 19 | char* buffer = dst.prepare(String::ModifyOp::kAssign, max_size); 20 | if (ASMJIT_UNLIKELY(!buffer)) { 21 | return make_error(Error::kOutOfMemory); 22 | } 23 | 24 | int fd = ASMJIT_FILE64_API(::open)(name, O_RDONLY); 25 | if (fd < 0) { 26 | dst.clear(); 27 | return make_error(Error::kFailedToOpenFile); 28 | } 29 | 30 | intptr_t len = ::read(fd, buffer, max_size); 31 | if (len >= 0) { 32 | buffer[len] = '\0'; 33 | dst._set_size(size_t(len)); 34 | } 35 | 36 | ::close(fd); 37 | return Error::kOk; 38 | } 39 | #endif 40 | 41 | ASMJIT_END_NAMESPACE 42 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/.editorconfig: -------------------------------------------------------------------------------- 1 | # See http://editorconfig.org to read about the EditorConfig format. 2 | # - In theory automatically supported by VS2017+ and most common IDE or text editors. 3 | # - In practice VS2019-VS2022 stills don't trim trailing whitespaces correctly :( 4 | # - Suggest installing this to trim whitespaces: 5 | # GitHub https://github.com/madskristensen/TrailingWhitespace 6 | # VS2019 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer 7 | # VS2022 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespace64 8 | # (in spite of its name doesn't only visualize but also trims) 9 | # - Alternative for older VS2010 to VS2015: https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig 10 | 11 | # top-most EditorConfig file 12 | root = true 13 | 14 | # Default settings: 15 | # Use 4 spaces as indentation 16 | [*] 17 | indent_style = space 18 | indent_size = 4 19 | insert_final_newline = true 20 | trim_trailing_whitespace = true 21 | 22 | [imstb_*] 23 | indent_size = 3 24 | trim_trailing_whitespace = false 25 | 26 | [Makefile] 27 | indent_style = tab 28 | indent_size = 4 29 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/db/isa_aarch64_sme.json: -------------------------------------------------------------------------------- 1 | { 2 | "instructions": [ 3 | {"category": "SME", "ext": "SME", "data": [ 4 | {"inst": "smstart {#sme_mode=1}" , "op": "11010101|00|000011|0100|0|op:2|1|011|11111" , "imm": "ImmSMEMode(sme_mode)"}, 5 | {"inst": "smstop {#sme_mode=1}" , "op": "11010101|00|000011|0100|0|op:2|0|011|11111" , "imm": "ImmSMEMode(sme_mode)"}, 6 | 7 | {"inst": "eorbt Zd.t, Zn.t, Zm.t" , "op": "01000101|sz|0|Zm|100100|Zn|Zda"}, 8 | {"inst": "eortb Zd.t, Zn.t, Zm.t" , "op": "01000101|sz|0|Zm|100101|Zn|Zda"}, 9 | {"inst": "TODO_psel Pd, Pn, Pm.t[Wv, #imm]" , "op": "00100101|sz|0110011100010|Pg|0|Pdn"}, 10 | {"inst": "revd Zd.Q, Pg/M, Zn.Q" , "op": "00000101|00|101110100|Pg:3|Zn|Zd"}, 11 | {"inst": "sclamp Zd.t, Zn.t, Zm.t" , "op": "01000100|sz|0|Zm|110000|Zn|Zda"}, 12 | {"inst": "uclamp Zd.t, Zn.t, Zm.t" , "op": "01000100|sz|0|Zm|110001|Zn|Zda"} 13 | ]} 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64formatter_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED 7 | #define ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED 8 | 9 | #include 10 | #ifndef ASMJIT_NO_LOGGING 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 19 | 20 | //! \cond INTERNAL 21 | //! \addtogroup asmjit_a64 22 | //! \{ 23 | 24 | namespace FormatterInternal { 25 | 26 | using namespace arm::FormatterInternal; 27 | 28 | Error ASMJIT_CDECL format_instruction( 29 | String& sb, 30 | FormatFlags flags, 31 | const BaseEmitter* emitter, 32 | Arch arch, 33 | const BaseInst& inst, Span operands) noexcept; 34 | 35 | } // {FormatterInternal} 36 | 37 | //! \} 38 | //! \endcond 39 | 40 | ASMJIT_END_SUB_NAMESPACE 41 | 42 | #endif // !ASMJIT_NO_LOGGING 43 | #endif // ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED 44 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/builder_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_BUILDER_P_H_INCLUDED 7 | #define ASMJIT_CORE_BUILDER_P_H_INCLUDED 8 | 9 | #include 10 | #ifndef ASMJIT_NO_BUILDER 11 | 12 | #include 13 | 14 | ASMJIT_BEGIN_NAMESPACE 15 | 16 | //! \cond INTERNAL 17 | //! \addtogroup asmjit_builder 18 | //! \{ 19 | 20 | static ASMJIT_INLINE void Builder_assign_inline_comment(BaseBuilder* self, BaseNode* node, const char* comment) noexcept { 21 | if (comment) { 22 | node->set_inline_comment(static_cast(self->_builder_arena.dup(comment, strlen(comment), true))); 23 | } 24 | } 25 | 26 | static ASMJIT_INLINE void Builder_assign_inst_state(BaseBuilder* self, InstNode* node, const BaseEmitter::State& state) noexcept { 27 | node->set_options(state.options); 28 | node->set_extra_reg(state.extra_reg); 29 | Builder_assign_inline_comment(self, node, state.comment); 30 | } 31 | 32 | //! \} 33 | //! \endcond 34 | 35 | ASMJIT_END_NAMESPACE 36 | 37 | #endif // !ASMJIT_NO_BUILDER 38 | #endif // ASMJIT_CORE_BUILDER_P_H_INCLUDED 39 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_bitmap_reader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "stdint_defs.h" 4 | 5 | namespace pe_bliss 6 | { 7 | class pe_resource_viewer; 8 | 9 | class resource_bitmap_reader 10 | { 11 | public: 12 | resource_bitmap_reader(const pe_resource_viewer& res); 13 | 14 | //Returns bitmap data by name and language (minimum checks of format correctness) 15 | const std::string get_bitmap_by_name(uint32_t language, const std::wstring& name) const; 16 | //Returns bitmap data by name and index in language directory (instead of language) (minimum checks of format correctness) 17 | const std::string get_bitmap_by_name(const std::wstring& name, uint32_t index = 0) const; 18 | //Returns bitmap data by ID and language (minimum checks of format correctness) 19 | const std::string get_bitmap_by_id_lang(uint32_t language, uint32_t id) const; 20 | //Returns bitmap data by ID and index in language directory (instead of language) (minimum checks of format correctness) 21 | const std::string get_bitmap_by_id(uint32_t id, uint32_t index = 0) const; 22 | 23 | private: 24 | //Helper function of creating bitmap header 25 | static const std::string create_bitmap(const std::string& resource_data); 26 | 27 | const pe_resource_viewer& res_; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/instdb_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_INSTDB_P_H_INCLUDED 7 | #define ASMJIT_CORE_INSTDB_P_H_INCLUDED 8 | 9 | #include 10 | #include 11 | 12 | ASMJIT_BEGIN_NAMESPACE 13 | 14 | //! \cond INTERNAL 15 | //! \addtogroup asmjit_instruction_db 16 | //! \{ 17 | 18 | struct InstNameIndex { 19 | struct Span { 20 | uint16_t start; 21 | uint16_t end; 22 | }; 23 | 24 | Span data[26]; 25 | uint16_t max_name_length; 26 | }; 27 | 28 | namespace InstNameUtils { 29 | 30 | Error decode(uint32_t name_value, InstStringifyOptions options, const char* string_table, String& output) noexcept; 31 | InstId find_instruction(const char* s, size_t len, const uint32_t* name_table, const char* string_table, const InstNameIndex& name_index) noexcept; 32 | uint32_t find_alias(const char* s, size_t len, const uint32_t* name_table, const char* string_table, uint32_t alias_name_count) noexcept; 33 | 34 | } // {InstNameUtils} 35 | 36 | //! \} 37 | //! \endcond 38 | 39 | ASMJIT_END_NAMESPACE 40 | 41 | #endif // ASMJIT_CORE_INSTDB_P_H_INCLUDED 42 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(ImGuiExample) 4 | 5 | set(CMAKE_CXX_STANDARD 11) 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 7 | set(CMAKE_CXX_EXTENSIONS OFF) 8 | 9 | add_library(${CMAKE_PROJECT_NAME} SHARED 10 | ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp 11 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui.cpp 12 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_demo.cpp 13 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_draw.cpp 14 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_tables.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui_widgets.cpp 16 | ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_android.cpp 17 | ${CMAKE_CURRENT_SOURCE_DIR}/../../backends/imgui_impl_opengl3.cpp 18 | ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c 19 | ) 20 | 21 | set(CMAKE_SHARED_LINKER_FLAGS 22 | "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate" 23 | ) 24 | 25 | target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE 26 | IMGUI_IMPL_OPENGL_ES3 27 | ) 28 | 29 | target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE 30 | ${CMAKE_CURRENT_SOURCE_DIR}/../.. 31 | ${CMAKE_CURRENT_SOURCE_DIR}/../../backends 32 | ${ANDROID_NDK}/sources/android/native_app_glue 33 | ) 34 | 35 | target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE 36 | android 37 | EGL 38 | GLESv3 39 | log 40 | ) 41 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64instapi_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED 7 | #define ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED 8 | 9 | #include 10 | #include 11 | 12 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 13 | 14 | //! \cond INTERNAL 15 | //! \addtogroup asmjit_a64 16 | //! \{ 17 | 18 | namespace InstInternal { 19 | 20 | #ifndef ASMJIT_NO_TEXT 21 | Error ASMJIT_CDECL inst_id_to_string(InstId inst_id, InstStringifyOptions options, String& output) noexcept; 22 | InstId ASMJIT_CDECL string_to_inst_id(const char* s, size_t len) noexcept; 23 | #endif // !ASMJIT_NO_TEXT 24 | 25 | #ifndef ASMJIT_NO_INTROSPECTION 26 | Error ASMJIT_CDECL validate(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept; 27 | Error ASMJIT_CDECL query_rw_info(const BaseInst& inst, const Operand_* operands, size_t op_count, InstRWInfo* out) noexcept; 28 | Error ASMJIT_CDECL query_features(const BaseInst& inst, const Operand_* operands, size_t op_count, CpuFeatures* out) noexcept; 29 | #endif // !ASMJIT_NO_INTROSPECTION 30 | 31 | } // {InstInternal} 32 | 33 | //! \} 34 | //! \endcond 35 | 36 | ASMJIT_END_SUB_NAMESPACE 37 | 38 | #endif // ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED 39 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_string_table_reader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "stdint_defs.h" 5 | 6 | namespace pe_bliss 7 | { 8 | class pe_resource_viewer; 9 | 10 | //ID; string 11 | typedef std::map resource_string_list; 12 | 13 | class resource_string_table_reader 14 | { 15 | public: 16 | resource_string_table_reader(const pe_resource_viewer& res); 17 | 18 | public: 19 | //Returns string table data by ID and language 20 | const resource_string_list get_string_table_by_id_lang(uint32_t language, uint32_t id) const; 21 | //Returns string table data by ID and index in language directory (instead of language) 22 | const resource_string_list get_string_table_by_id(uint32_t id, uint32_t index = 0) const; 23 | //Returns string from string table by ID and language 24 | const std::wstring get_string_by_id_lang(uint32_t language, uint16_t id) const; 25 | //Returns string from string table by ID and index in language directory (instead of language) 26 | const std::wstring get_string_by_id(uint16_t id, uint32_t index = 0) const; 27 | 28 | private: 29 | const pe_resource_viewer& res_; 30 | 31 | //Helper function of parsing string list table 32 | //Id of resource is needed to calculate string IDs correctly 33 | //resource_data is raw string table resource data 34 | static const resource_string_list parse_string_list(uint32_t id, const std::string& resource_data); 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64builder.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_A64BUILDER_H_INCLUDED 7 | #define ASMJIT_ARM_A64BUILDER_H_INCLUDED 8 | 9 | #include 10 | #ifndef ASMJIT_NO_BUILDER 11 | 12 | #include 13 | #include 14 | 15 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 16 | 17 | //! \addtogroup asmjit_a64 18 | //! \{ 19 | 20 | //! AArch64 builder implementation. 21 | class ASMJIT_VIRTAPI Builder 22 | : public BaseBuilder, 23 | public EmitterExplicitT { 24 | public: 25 | ASMJIT_NONCOPYABLE(Builder) 26 | using Base = BaseBuilder; 27 | 28 | //! \name Construction & Destruction 29 | //! \{ 30 | 31 | ASMJIT_API explicit Builder(CodeHolder* code = nullptr) noexcept; 32 | ASMJIT_API ~Builder() noexcept override; 33 | 34 | //! \} 35 | 36 | //! \name Events 37 | //! \{ 38 | 39 | ASMJIT_API Error on_attach(CodeHolder& code) noexcept override; 40 | ASMJIT_API Error on_detach(CodeHolder& code) noexcept override; 41 | 42 | //! \} 43 | 44 | //! \name Finalize 45 | //! \{ 46 | 47 | ASMJIT_API Error finalize() override; 48 | 49 | //! \} 50 | }; 51 | 52 | //! \} 53 | 54 | ASMJIT_END_SUB_NAMESPACE 55 | 56 | #endif // !ASMJIT_NO_BUILDER 57 | #endif // ASMJIT_ARM_A64BUILDER_H_INCLUDED 58 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/formatter_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_FORMATTER_P_H_INCLUDED 7 | #define ASMJIT_CORE_FORMATTER_P_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_NAMESPACE 14 | 15 | //! \cond INTERNAL 16 | //! \addtogroup asmjit_logging 17 | //! \{ 18 | 19 | namespace Formatter { 20 | 21 | [[maybe_unused]] 22 | static ASMJIT_INLINE size_t padding_from_options(const FormatOptions& format_options, FormatPaddingGroup group) noexcept { 23 | static constexpr uint16_t default_padding_table[uint32_t(FormatPaddingGroup::kMaxValue) + 1] = { 44, 26 }; 24 | static_assert(uint32_t(FormatPaddingGroup::kMaxValue) + 1 == 2, "If a new group is defined it must be added here"); 25 | 26 | size_t padding = format_options.padding(group); 27 | return padding ? padding : size_t(default_padding_table[uint32_t(group)]); 28 | } 29 | 30 | Error format_virt_reg_name(String& sb, const VirtReg* v_reg) noexcept; 31 | Error format_virt_reg_name_with_prefix(String& sb, const char* prefix, size_t prefix_size, const VirtReg* v_reg) noexcept; 32 | 33 | } // {Formatter} 34 | 35 | //! \} 36 | //! \endcond 37 | 38 | ASMJIT_END_NAMESPACE 39 | 40 | #endif // ASMJIT_CORE_FORMATTER_H_P_INCLUDED 41 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/osutils.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_OSUTILS_H_INCLUDED 7 | #define ASMJIT_CORE_OSUTILS_H_INCLUDED 8 | 9 | #include 10 | 11 | ASMJIT_BEGIN_NAMESPACE 12 | 13 | //! \addtogroup asmjit_utilities 14 | //! \{ 15 | 16 | //! \cond INTERNAL 17 | //! Lock. 18 | //! 19 | //! Lock is internal, it cannot be used outside of AsmJit, however, its internal 20 | //! layout is exposed as it's used by some other classes, which are public. 21 | class Lock { 22 | public: 23 | ASMJIT_NONCOPYABLE(Lock) 24 | 25 | #if defined(_WIN32) 26 | #pragma pack(push, 8) 27 | struct ASMJIT_MAY_ALIAS Handle { 28 | void* DebugInfo; 29 | long LockCount; 30 | long RecursionCount; 31 | void* OwningThread; 32 | void* LockSemaphore; 33 | unsigned long* SpinCount; 34 | }; 35 | Handle _handle; 36 | #pragma pack(pop) 37 | #elif !defined(__EMSCRIPTEN__) 38 | using Handle = pthread_mutex_t; 39 | Handle _handle; 40 | #endif 41 | 42 | ASMJIT_INLINE_NODEBUG Lock() noexcept; 43 | ASMJIT_INLINE_NODEBUG ~Lock() noexcept; 44 | 45 | ASMJIT_INLINE_NODEBUG void lock() noexcept; 46 | ASMJIT_INLINE_NODEBUG void unlock() noexcept; 47 | }; 48 | //! \endcond 49 | 50 | //! \} 51 | 52 | ASMJIT_END_NAMESPACE 53 | 54 | #endif // ASMJIT_CORE_OSUTILS_H_INCLUDED 55 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_sdlrenderer2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 25 | ``` 26 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/environment.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #include 8 | 9 | ASMJIT_BEGIN_NAMESPACE 10 | 11 | // X86 Target 12 | // ---------- 13 | // 14 | // - 32-bit - Linux, OSX, BSD, and apparently also Haiku guarantee 16-byte 15 | // stack alignment. Other operating systems are assumed to have 16 | // 4-byte alignment by default for safety reasons. 17 | // - 64-bit - stack must be aligned to 16 bytes. 18 | // 19 | // ARM Target 20 | // ---------- 21 | // 22 | // - 32-bit - Stack must be aligned to 8 bytes. 23 | // - 64-bit - Stack must be aligned to 16 bytes (hardware requirement). 24 | uint32_t Environment::stack_alignment() const noexcept { 25 | if (is_64bit()) { 26 | // Assume 16-byte alignment on any 64-bit target. 27 | return 16; 28 | } 29 | else { 30 | // The following platforms use 16-byte alignment in 32-bit mode. 31 | if (is_platform_linux() || 32 | is_platform_bsd() || 33 | is_platform_apple() || 34 | is_platform_haiku()) { 35 | return 16u; 36 | } 37 | 38 | if (is_family_arm()) { 39 | return 8; 40 | } 41 | 42 | // Bail to 4-byte alignment if we don't know. 43 | return 4; 44 | } 45 | } 46 | 47 | ASMJIT_END_NAMESPACE 48 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need SDL2 (http://www.libsdl.org): 3 | # brew install sdl2 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_sdl2_metal 10 | IMGUI_DIR = ../.. 11 | SOURCES = main.mm 12 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 13 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl2.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm 14 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 15 | 16 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 17 | LIBS += `sdl2-config --libs` 18 | LIBS += -L/usr/local/lib 19 | 20 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include 21 | CXXFLAGS += `sdl2-config --cflags` 22 | CXXFLAGS += -Wall -Wformat 23 | CFLAGS = $(CXXFLAGS) 24 | 25 | %.o:%.cpp 26 | $(CXX) $(CXXFLAGS) -c -o $@ $< 27 | 28 | %.o:$(IMGUI_DIR)/%.cpp 29 | $(CXX) $(CXXFLAGS) -c -o $@ $< 30 | 31 | %.o:$(IMGUI_DIR)/backends/%.cpp 32 | $(CXX) $(CXXFLAGS) -c -o $@ $< 33 | 34 | %.o:%.mm 35 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 36 | 37 | %.o:$(IMGUI_DIR)/backends/%.mm 38 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 39 | 40 | all: $(EXE) 41 | @echo Build complete 42 | 43 | $(EXE): $(OBJS) 44 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 45 | 46 | clean: 47 | rm -f $(EXE) $(OBJS) 48 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glfw_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need GLFW (http://www.glfw.org): 3 | # brew install glfw 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_glfw_metal 10 | IMGUI_DIR = ../.. 11 | SOURCES = main.mm 12 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 13 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm 14 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 15 | 16 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 17 | LIBS += -L/usr/local/lib -L/opt/homebrew/lib -L/opt/local/lib 18 | LIBS += -lglfw 19 | 20 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include -I/opt/homebrew/include -I/opt/local/include 21 | CXXFLAGS += -Wall -Wformat 22 | CFLAGS = $(CXXFLAGS) 23 | 24 | %.o:%.cpp 25 | $(CXX) $(CXXFLAGS) -c -o $@ $< 26 | 27 | %.o:$(IMGUI_DIR)/%.cpp 28 | $(CXX) $(CXXFLAGS) -c -o $@ $< 29 | 30 | %.o:$(IMGUI_DIR)/backends/%.cpp 31 | $(CXX) $(CXXFLAGS) -c -o $@ $< 32 | 33 | %.o:%.mm 34 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 35 | 36 | %.o:$(IMGUI_DIR)/backends/%.mm 37 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 38 | 39 | all: $(EXE) 40 | @echo Build complete 41 | 42 | $(EXE): $(OBJS) 43 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 44 | 45 | clean: 46 | rm -f $(EXE) $(OBJS) 47 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/asmjit.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // SPDX-License-Identifier: Zlib 4 | // Official GitHub Repository: https://github.com/asmjit/asmjit 5 | // 6 | // Copyright (c) 2008-2024 The AsmJit Authors 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 2. Altered source versions must be plainly marked as such, and must not be 21 | // misrepresented as being the original software. 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | 24 | #ifndef ASMJIT_ASMJIT_H_INCLUDED 25 | #define ASMJIT_ASMJIT_H_INCLUDED 26 | 27 | #pragma message("asmjit/asmjit.h is deprecated! Please use asmjit/[core|x86|a64|host].h instead.") 28 | 29 | #include 30 | 31 | #ifndef ASMJIT_NO_X86 32 | #include 33 | #endif 34 | 35 | #endif // ASMJIT_ASMJIT_H_INCLUDED 36 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/message_table.cpp: -------------------------------------------------------------------------------- 1 | #include "message_table.h" 2 | #include "utils.h" 3 | 4 | namespace pe_bliss 5 | { 6 | //Default constructor 7 | message_table_item::message_table_item() 8 | :unicode_(false) 9 | {} 10 | 11 | //Constructor from ANSI string 12 | message_table_item::message_table_item(const std::string& str) 13 | :unicode_(false), ansi_str_(str) 14 | { 15 | pe_utils::strip_nullbytes(ansi_str_); 16 | } 17 | 18 | //Constructor from UNICODE string 19 | message_table_item::message_table_item(const std::wstring& str) 20 | :unicode_(true), unicode_str_(str) 21 | { 22 | pe_utils::strip_nullbytes(unicode_str_); 23 | } 24 | 25 | //Returns true if contained string is unicode 26 | bool message_table_item::is_unicode() const 27 | { 28 | return unicode_; 29 | } 30 | 31 | //Returns ANSI string 32 | const std::string& message_table_item::get_ansi_string() const 33 | { 34 | return ansi_str_; 35 | } 36 | 37 | //Returns UNICODE string 38 | const std::wstring& message_table_item::get_unicode_string() const 39 | { 40 | return unicode_str_; 41 | } 42 | 43 | //Sets ANSI string (clears UNICODE one) 44 | void message_table_item::set_string(const std::string& str) 45 | { 46 | ansi_str_ = str; 47 | pe_utils::strip_nullbytes(ansi_str_); 48 | unicode_str_.clear(); 49 | unicode_ = false; 50 | } 51 | 52 | //Sets UNICODE string (clears ANSI one) 53 | void message_table_item::set_string(const std::wstring& str) 54 | { 55 | unicode_str_ = str; 56 | pe_utils::strip_nullbytes(unicode_str_); 57 | ansi_str_.clear(); 58 | unicode_ = true; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need SDL3 (http://www.libsdl.org): 3 | # brew install sdl3 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_sdl3_metal 10 | IMGUI_DIR = ../.. 11 | SOURCES = main.mm 12 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 13 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_metal.mm 14 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 15 | 16 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 17 | LIBS += `pkg-config --libs sdl3` 18 | LIBS += -L/usr/local/lib -L/opt/local/lib 19 | 20 | CXXFLAGS += `pkg-config --cflags sdl3` 21 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 22 | CXXFLAGS += -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 23 | CXXFLAGS += -Wall -Wformat 24 | CFLAGS = $(CXXFLAGS) 25 | 26 | %.o:%.cpp 27 | $(CXX) $(CXXFLAGS) -c -o $@ $< 28 | 29 | %.o:$(IMGUI_DIR)/%.cpp 30 | $(CXX) $(CXXFLAGS) -c -o $@ $< 31 | 32 | %.o:$(IMGUI_DIR)/backends/%.cpp 33 | $(CXX) $(CXXFLAGS) -c -o $@ $< 34 | 35 | %.o:%.mm 36 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 37 | 38 | %.o:$(IMGUI_DIR)/backends/%.mm 39 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 40 | 41 | all: $(EXE) 42 | @echo Build complete 43 | 44 | $(EXE): $(OBJS) 45 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 46 | 47 | clean: 48 | rm -f $(EXE) $(OBJS) 49 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/x86/x86formatter_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_X86_X86FORMATTER_P_H_INCLUDED 7 | #define ASMJIT_X86_X86FORMATTER_P_H_INCLUDED 8 | 9 | #include 10 | #ifndef ASMJIT_NO_LOGGING 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | ASMJIT_BEGIN_SUB_NAMESPACE(x86) 17 | 18 | //! \cond INTERNAL 19 | //! \addtogroup asmjit_x86 20 | //! \{ 21 | 22 | namespace FormatterInternal { 23 | 24 | Error ASMJIT_CDECL format_feature( 25 | String& sb, 26 | uint32_t feature_id) noexcept; 27 | 28 | Error ASMJIT_CDECL format_register( 29 | String& sb, 30 | FormatFlags flags, 31 | const BaseEmitter* emitter, 32 | Arch arch, 33 | RegType reg_type, 34 | uint32_t reg_id) noexcept; 35 | 36 | Error ASMJIT_CDECL format_operand( 37 | String& sb, 38 | FormatFlags flags, 39 | const BaseEmitter* emitter, 40 | Arch arch, 41 | const Operand_& op) noexcept; 42 | 43 | Error ASMJIT_CDECL format_instruction( 44 | String& sb, 45 | FormatFlags flags, 46 | const BaseEmitter* emitter, 47 | Arch arch, 48 | const BaseInst& inst, Span operands) noexcept; 49 | 50 | } // {FormatterInternal} 51 | 52 | //! \} 53 | //! \endcond 54 | 55 | ASMJIT_END_SUB_NAMESPACE 56 | 57 | #endif // !ASMJIT_NO_LOGGING 58 | #endif // ASMJIT_X86_X86FORMATTER_P_H_INCLUDED 59 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/debuggers/imgui.natstepfilter: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | (ImVec2|ImVec4|ImStrv)::.+ 24 | NoStepInto 25 | 26 | 27 | (ImVector|ImSpan).*::operator.+ 28 | NoStepInto 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_null/main.cpp: -------------------------------------------------------------------------------- 1 | // dear imgui: "null" example application 2 | // (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT) 3 | // This is useful to test building, but you cannot interact with anything here! 4 | #include "imgui.h" 5 | #include 6 | 7 | // For imgui_impl_null: use relative filename + embed implementation directly by including the .cpp file. 8 | // This is to simplify casual building of this example from all sorts of test scripts. 9 | #include "../../backends/imgui_impl_null.h" 10 | #include "../../backends/imgui_impl_null.cpp" 11 | 12 | int main(int, char**) 13 | { 14 | IMGUI_CHECKVERSION(); 15 | 16 | ImGui::CreateContext(); 17 | ImGuiIO& io = ImGui::GetIO(); 18 | 19 | ImGui_ImplNullPlatform_Init(); 20 | ImGui_ImplNullRender_Init(); 21 | 22 | for (int n = 0; n < 20; n++) 23 | { 24 | printf("NewFrame() %d\n", n); 25 | ImGui_ImplNullPlatform_NewFrame(); 26 | ImGui_ImplNullRender_NewFrame(); 27 | ImGui::NewFrame(); 28 | 29 | static float f = 0.0f; 30 | ImGui::Text("Hello, world!"); 31 | ImGui::SliderFloat("float", &f, 0.0f, 1.0f); 32 | ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); 33 | ImGui::ShowDemoWindow(nullptr); 34 | 35 | ImGui::Render(); 36 | } 37 | 38 | printf("DestroyContext()\n"); 39 | ImGui_ImplNullRender_Shutdown(); 40 | ImGui_ImplNullPlatform_Shutdown(); 41 | ImGui::DestroyContext(); 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/x86/x86instapi_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_X86_X86INSTAPI_P_H_INCLUDED 7 | #define ASMJIT_X86_X86INSTAPI_P_H_INCLUDED 8 | 9 | #include 10 | #include 11 | 12 | ASMJIT_BEGIN_SUB_NAMESPACE(x86) 13 | 14 | //! \cond INTERNAL 15 | //! \addtogroup asmjit_x86 16 | //! \{ 17 | 18 | namespace InstInternal { 19 | 20 | #ifndef ASMJIT_NO_TEXT 21 | Error ASMJIT_CDECL inst_id_to_string(InstId inst_id, InstStringifyOptions options, String& output) noexcept; 22 | InstId ASMJIT_CDECL string_to_inst_id(const char* s, size_t len) noexcept; 23 | #endif // !ASMJIT_NO_TEXT 24 | 25 | #ifndef ASMJIT_NO_INTROSPECTION 26 | Error ASMJIT_CDECL validate_x86(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept; 27 | Error ASMJIT_CDECL validate_x64(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept; 28 | Error ASMJIT_CDECL query_rw_info(Arch arch, const BaseInst& inst, const Operand_* operands, size_t op_count, InstRWInfo* out) noexcept; 29 | Error ASMJIT_CDECL query_features(Arch arch, const BaseInst& inst, const Operand_* operands, size_t op_count, CpuFeatures* out) noexcept; 30 | #endif // !ASMJIT_NO_INTROSPECTION 31 | 32 | } // {InstInternal} 33 | 34 | //! \} 35 | //! \endcond 36 | 37 | ASMJIT_END_SUB_NAMESPACE 38 | 39 | #endif // ASMJIT_X86_X86INSTAPI_P_H_INCLUDED 40 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_opengl2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's IDE 5 | 6 | Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. 7 | 8 | - On Windows with Visual Studio's CLI 9 | 10 | ``` 11 | set SDL2_DIR=path_to_your_sdl2_folder 12 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 13 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 14 | # or for 64-bit: 15 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 16 | ``` 17 | 18 | - On Linux and similar Unixes 19 | 20 | ``` 21 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 22 | ``` 23 | 24 | - On Mac OS X 25 | 26 | ``` 27 | brew install sdl2 28 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 29 | ``` 30 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64assembler.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED 7 | #define ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 14 | 15 | //! \addtogroup asmjit_a64 16 | //! \{ 17 | 18 | //! AArch64 assembler implementation. 19 | class ASMJIT_VIRTAPI Assembler 20 | : public BaseAssembler, 21 | public EmitterExplicitT { 22 | 23 | public: 24 | using Base = BaseAssembler; 25 | 26 | //! \name Construction & Destruction 27 | //! \{ 28 | 29 | ASMJIT_API Assembler(CodeHolder* code = nullptr) noexcept; 30 | ASMJIT_API ~Assembler() noexcept override; 31 | 32 | //! \} 33 | 34 | //! \name Emit 35 | //! \{ 36 | 37 | ASMJIT_API Error _emit(InstId inst_id, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_* op_ext) override; 38 | 39 | //! \} 40 | 41 | //! \name Align 42 | //! \{ 43 | 44 | ASMJIT_API Error align(AlignMode align_mode, uint32_t alignment) override; 45 | 46 | //! \} 47 | 48 | //! \name Events 49 | //! \{ 50 | 51 | ASMJIT_API Error on_attach(CodeHolder& code) noexcept override; 52 | ASMJIT_API Error on_detach(CodeHolder& code) noexcept override; 53 | 54 | //! \} 55 | }; 56 | 57 | //! \} 58 | 59 | ASMJIT_END_SUB_NAMESPACE 60 | 61 | #endif // ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED 62 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/misc_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_MISC_P_H_INCLUDED 7 | #define ASMJIT_CORE_MISC_P_H_INCLUDED 8 | 9 | #include 10 | 11 | ASMJIT_BEGIN_NAMESPACE 12 | 13 | //! \cond INTERNAL 14 | //! \addtogroup asmjit_utilities 15 | //! \{ 16 | 17 | #define ASMJIT_LOOKUP_TABLE_4(T, I) T((I)), T((I+1)), T((I+2)), T((I+3)) 18 | #define ASMJIT_LOOKUP_TABLE_8(T, I) ASMJIT_LOOKUP_TABLE_4(T, I), ASMJIT_LOOKUP_TABLE_4(T, I + 4) 19 | #define ASMJIT_LOOKUP_TABLE_16(T, I) ASMJIT_LOOKUP_TABLE_8(T, I), ASMJIT_LOOKUP_TABLE_8(T, I + 8) 20 | #define ASMJIT_LOOKUP_TABLE_32(T, I) ASMJIT_LOOKUP_TABLE_16(T, I), ASMJIT_LOOKUP_TABLE_16(T, I + 16) 21 | #define ASMJIT_LOOKUP_TABLE_40(T, I) ASMJIT_LOOKUP_TABLE_16(T, I), ASMJIT_LOOKUP_TABLE_16(T, I + 16), ASMJIT_LOOKUP_TABLE_8(T, I + 32) 22 | #define ASMJIT_LOOKUP_TABLE_64(T, I) ASMJIT_LOOKUP_TABLE_32(T, I), ASMJIT_LOOKUP_TABLE_32(T, I + 32) 23 | #define ASMJIT_LOOKUP_TABLE_128(T, I) ASMJIT_LOOKUP_TABLE_64(T, I), ASMJIT_LOOKUP_TABLE_64(T, I + 64) 24 | #define ASMJIT_LOOKUP_TABLE_256(T, I) ASMJIT_LOOKUP_TABLE_128(T, I), ASMJIT_LOOKUP_TABLE_128(T, I + 128) 25 | #define ASMJIT_LOOKUP_TABLE_512(T, I) ASMJIT_LOOKUP_TABLE_256(T, I), ASMJIT_LOOKUP_TABLE_256(T, I + 256) 26 | #define ASMJIT_LOOKUP_TABLE_1024(T, I) ASMJIT_LOOKUP_TABLE_512(T, I), ASMJIT_LOOKUP_TABLE_512(T, I + 512) 27 | 28 | //! \} 29 | //! \endcond 30 | 31 | ASMJIT_END_NAMESPACE 32 | 33 | #endif // ASMJIT_CORE_MISC_P_H_INCLUDED 34 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/sdlgpu3/build_instructions.txt: -------------------------------------------------------------------------------- 1 | 2 | Instructions to rebuild imgui_impl_sdlgpu3_shaders.h 3 | (You don't need to copy this folder if you are using the backend as-is) 4 | 5 | 1) Compile the raw shader files to SPIRV: 6 | 7 | glslc -o vertex.spv -c shader.vert 8 | glslc -o fragment.spv -c shader.frag 9 | 10 | 11 | 2) Build SDL_shadercross (https://github.com/libsdl-org/SDL_shadercross) 12 | 13 | 14 | 3-A) Compiling for the Vulkan Driver: 15 | 16 | Nothing to do, you just need the previous vertex.spv/fragment.spv, proceed to step 4 17 | 18 | 19 | 3-B) Compiling for the DirectX 12 Driver: 20 | 21 | ./shadercross vertex.spv -s SPIRV -d DXBC -t vertex -e main -o vertex.dxbc 22 | ./shadercross fragment.spv -s SPIRV -d DXBC -t fragment -e main -o fragment.dxbc 23 | 24 | Proceed to step 4 25 | 26 | 27 | 3-C) Compiling for Metal (On windows you'll need the Metal Developer Tools for Windows, on linux you might use wine, but I never tested it): 28 | 29 | ./shadercross vertex.spv -s SPIRV -d MSL -t vertex -e main -o vertex.metal 30 | ./shadercross fragment.spv -s SPIRV -d MSL -t fragment -e main -o fragment.metal 31 | 32 | xcrun -sdk macosx metal -o vertex.ir -c vertex.metal 33 | xcrun -sdk macosx metal -o fragment.ir -c fragment.metal 34 | xcrun -sdk macosx metallib -o vertex.metallib -c vertex.ir 35 | xcrun -sdk macosx metallib -o fragment.metallib -c fragment.ir 36 | 37 | Proceed to step 4 38 | 39 | 40 | 4) Use a tool like https://notisrac.github.io/FileToCArray/ or misc/fonts/binary_to_compressed_c.cpp in imgui repository to convert the file to a uint8_t array. 41 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit-testing/tests/asmjit_test_unicompiler_avx2fma.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | 8 | #if defined(ASMJIT_UJIT_X86) 9 | 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #include 14 | #endif 15 | 16 | namespace UniCompilerTests { 17 | 18 | // A reference implementation of MUL+ADD with the use of FMA. This has to be provided otherwise the 19 | // compiler may use FPU registers in 32-bit x86 case, which would make the result different than when 20 | // compiled by JIT compiler that would use XMM registers (32/64-bit SSE/AVX operations). 21 | 22 | float fmadd_fma_ref(float a, float b, float c) noexcept { 23 | __m128 av = _mm_set1_ps(a); 24 | __m128 bv = _mm_set1_ps(b); 25 | __m128 cv = _mm_set1_ps(c); 26 | 27 | return _mm_cvtss_f32(_mm_fmadd_ss(av, bv, cv)); 28 | } 29 | 30 | double fmadd_fma_ref(double a, double b, double c) noexcept { 31 | __m128d av = _mm_set1_pd(a); 32 | __m128d bv = _mm_set1_pd(b); 33 | __m128d cv = _mm_set1_pd(c); 34 | 35 | return _mm_cvtsd_f64(_mm_fmadd_sd(av, bv, cv)); 36 | } 37 | 38 | void madd_fma_check_valgrind_bug(const float a[4], const float b[4], const float c[4], float dst[4]) noexcept { 39 | __m128 av = _mm_loadu_ps(a); 40 | __m128 bv = _mm_loadu_ps(b); 41 | __m128 cv = _mm_loadu_ps(c); 42 | 43 | __m128 dv = _mm_fmadd_ss(av, bv, cv); 44 | _mm_storeu_ps(dst, dv); 45 | } 46 | 47 | } // {UniCompilerTests} 48 | 49 | #endif // ASMJIT_UJIT_X86 50 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64builder.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_BUILDER) 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 14 | 15 | // a64::Builder - Construction & Destruction 16 | // ========================================= 17 | 18 | Builder::Builder(CodeHolder* code) noexcept : BaseBuilder() { 19 | _arch_mask = uint64_t(1) << uint32_t(Arch::kAArch64); 20 | init_emitter_funcs(this); 21 | 22 | if (code) { 23 | code->attach(this); 24 | } 25 | } 26 | Builder::~Builder() noexcept {} 27 | 28 | // a64::Builder - Events 29 | // ===================== 30 | 31 | Error Builder::on_attach(CodeHolder& code) noexcept { 32 | ASMJIT_PROPAGATE(Base::on_attach(code)); 33 | 34 | _instruction_alignment = uint8_t(4); 35 | update_emitter_funcs(this); 36 | 37 | return Error::kOk; 38 | } 39 | 40 | Error Builder::on_detach(CodeHolder& code) noexcept { 41 | return Base::on_detach(code); 42 | } 43 | 44 | // a64::Builder - Finalize 45 | // ======================= 46 | 47 | Error Builder::finalize() { 48 | ASMJIT_PROPAGATE(run_passes()); 49 | Assembler a(_code); 50 | a.add_encoding_options(encoding_options()); 51 | a.add_diagnostic_options(diagnostic_options()); 52 | return serialize_to(&a); 53 | } 54 | 55 | ASMJIT_END_SUB_NAMESPACE 56 | 57 | #endif // !ASMJIT_NO_AARCH64 && !ASMJIT_NO_BUILDER 58 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/x86/x86builder.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_BUILDER) 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_SUB_NAMESPACE(x86) 14 | 15 | // x86::Builder - Construction & Destruction 16 | // ========================================= 17 | 18 | Builder::Builder(CodeHolder* code) noexcept : BaseBuilder() { 19 | _arch_mask = (uint64_t(1) << uint32_t(Arch::kX86)) | 20 | (uint64_t(1) << uint32_t(Arch::kX64)) ; 21 | init_emitter_funcs(this); 22 | 23 | if (code) { 24 | code->attach(this); 25 | } 26 | } 27 | Builder::~Builder() noexcept {} 28 | 29 | // x86::Builder - Events 30 | // ===================== 31 | 32 | Error Builder::on_attach(CodeHolder& code) noexcept { 33 | ASMJIT_PROPAGATE(Base::on_attach(code)); 34 | 35 | _instruction_alignment = uint8_t(1); 36 | update_emitter_funcs(this); 37 | 38 | return Error::kOk; 39 | } 40 | 41 | Error Builder::on_detach(CodeHolder& code) noexcept { 42 | return Base::on_detach(code); 43 | } 44 | 45 | // x86::Builder - Finalize 46 | // ======================= 47 | 48 | Error Builder::finalize() { 49 | ASMJIT_PROPAGATE(run_passes()); 50 | Assembler a(_code); 51 | a.add_encoding_options(encoding_options()); 52 | a.add_diagnostic_options(diagnostic_options()); 53 | return serialize_to(&a); 54 | } 55 | 56 | ASMJIT_END_SUB_NAMESPACE 57 | 58 | #endif // !ASMJIT_NO_X86 && !ASMJIT_NO_BUILDER 59 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package imgui.example.android 2 | 3 | import android.app.NativeActivity 4 | import android.os.Bundle 5 | import android.content.Context 6 | import android.view.inputmethod.InputMethodManager 7 | import android.view.KeyEvent 8 | import java.util.concurrent.LinkedBlockingQueue 9 | 10 | class MainActivity : NativeActivity() { 11 | public override fun onCreate(savedInstanceState: Bundle?) { 12 | super.onCreate(savedInstanceState) 13 | } 14 | 15 | fun showSoftInput() { 16 | val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager 17 | inputMethodManager.showSoftInput(this.window.decorView, 0) 18 | } 19 | 20 | fun hideSoftInput() { 21 | val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager 22 | inputMethodManager.hideSoftInputFromWindow(this.window.decorView.windowToken, 0) 23 | } 24 | 25 | // Queue for the Unicode characters to be polled from native code (via pollUnicodeChar()) 26 | private var unicodeCharacterQueue: LinkedBlockingQueue = LinkedBlockingQueue() 27 | 28 | // We assume dispatchKeyEvent() of the NativeActivity is actually called for every 29 | // KeyEvent and not consumed by any View before it reaches here 30 | override fun dispatchKeyEvent(event: KeyEvent): Boolean { 31 | if (event.action == KeyEvent.ACTION_DOWN) { 32 | unicodeCharacterQueue.offer(event.getUnicodeChar(event.metaState)) 33 | } 34 | return super.dispatchKeyEvent(event) 35 | } 36 | 37 | fun pollUnicodeChar(): Int { 38 | return unicodeCharacterQueue.poll() ?: 0 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/imgui_impl_null.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Null Platform+Renderer Backends 2 | // This is designed if you need to use a blind Dear Imgui context with no input and no output. 3 | 4 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 5 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 6 | // Learn about Dear ImGui: 7 | // - FAQ https://dearimgui.com/faq 8 | // - Getting Started https://dearimgui.com/getting-started 9 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 10 | // - Introduction, links and more at the top of imgui.cpp 11 | 12 | #pragma once 13 | #include "imgui.h" // IMGUI_IMPL_API 14 | #ifndef IMGUI_DISABLE 15 | 16 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 17 | 18 | // Null = NullPlatform + NullRender 19 | IMGUI_IMPL_API bool ImGui_ImplNull_Init(); 20 | IMGUI_IMPL_API void ImGui_ImplNull_Shutdown(); 21 | IMGUI_IMPL_API void ImGui_ImplNull_NewFrame(); 22 | 23 | // Null platform only (single screen, fixed timestep, no inputs) 24 | IMGUI_IMPL_API bool ImGui_ImplNullPlatform_Init(); 25 | IMGUI_IMPL_API void ImGui_ImplNullPlatform_Shutdown(); 26 | IMGUI_IMPL_API void ImGui_ImplNullPlatform_NewFrame(); 27 | 28 | // Null renderer only (no output) 29 | IMGUI_IMPL_API bool ImGui_ImplNullRender_Init(); 30 | IMGUI_IMPL_API void ImGui_ImplNullRender_Shutdown(); 31 | IMGUI_IMPL_API void ImGui_ImplNullRender_NewFrame(); 32 | IMGUI_IMPL_API void ImGui_ImplNullRender_RenderDrawData(ImDrawData* draw_data); 33 | 34 | #endif // #ifndef IMGUI_DISABLE 35 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/handler/handler.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #define COLOR_RESET "\033[0m" 5 | #define COLOR_RED "\033[31m" 6 | #define COLOR_YELLOW "\033[33m" 7 | #define COLOR_GREEN "\033[32m" 8 | #define COLOR_BLUE "\033[34m" 9 | #define COLOR_CYAN "\033[36m" 10 | 11 | //#define print_warning(fmt, ...) printf("[ " COLOR_YELLOW "warning" COLOR_RESET " ] " fmt, ##__VA_ARGS__) 12 | //#define print_info(fmt, ...) printf("[ " COLOR_CYAN "info" COLOR_RESET " ] " fmt, ##__VA_ARGS__) 13 | //#define print_custom(fmt, mdl, ...) printf("[ " COLOR_GREEN "%s" COLOR_RESET " ] " mdl, fmt, ##__VA_ARGS__) 14 | 15 | inline void print_custom(const char* mdl, const char* fmt, ...) { 16 | va_list args; 17 | va_start(args, fmt); 18 | printf("[ " COLOR_GREEN "%s" COLOR_RESET " ] ", mdl); 19 | vprintf(fmt, args); 20 | va_end(args); 21 | } 22 | 23 | inline void print_warning(const char* fmt, ...) { 24 | va_list args; 25 | va_start(args, fmt); 26 | printf("[ " COLOR_YELLOW "info" COLOR_RESET " ] "); 27 | vprintf(fmt, args); 28 | va_end(args); 29 | } 30 | 31 | inline void print_info(const char* fmt, ...) { 32 | va_list args; 33 | va_start(args, fmt); 34 | printf("[ " COLOR_CYAN "info" COLOR_RESET " ] "); 35 | vprintf(fmt, args); 36 | va_end(args); 37 | } 38 | 39 | [[noreturn]] inline void print_error(const std::string& msg) { 40 | std::stringstream ss; 41 | ss << msg; 42 | throw std::runtime_error(ss.str()); 43 | } 44 | 45 | #define error_handling(condition, from, text) \ 46 | try { \ 47 | if (condition) { \ 48 | throw std::exception(text); \ 49 | } \ 50 | } catch (std::exception& ex) { \ 51 | MessageBoxA(NULL, ex.what(), from, 0x00000010L); \ 52 | exit(0); \ 53 | } -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit-testing/commons/cmdline.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef CMDLINE_H_INCLUDED 7 | #define CMDLINE_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | class CmdLine { 14 | public: 15 | int _argc; 16 | const char* const* _argv; 17 | 18 | CmdLine(int argc, const char* const* argv) 19 | : _argc(argc), 20 | _argv(argv) {} 21 | 22 | bool has_arg(const char* key) const { 23 | for (int i = 1; i < _argc; i++) { 24 | if (strcmp(key, _argv[i]) == 0) { 25 | return true; 26 | } 27 | } 28 | return false; 29 | } 30 | 31 | const char* value_of(const char* key, const char* default_value) const { 32 | size_t keySize = strlen(key); 33 | for (int i = 1; i < _argc; i++) { 34 | const char* val = _argv[i]; 35 | if (strlen(val) >= keySize + 1 && val[keySize] == '=' && memcmp(val, key, keySize) == 0) 36 | return val + keySize + 1; 37 | } 38 | 39 | return default_value; 40 | } 41 | 42 | int value_as_int(const char* key, int default_value) const { 43 | const char* val = value_of(key, nullptr); 44 | if (val == nullptr || val[0] == '\0') 45 | return default_value; 46 | 47 | return atoi(val); 48 | } 49 | 50 | unsigned value_as_uint(const char* key, unsigned default_value) const { 51 | const char* val = value_of(key, nullptr); 52 | if (val == nullptr || val[0] == '\0') 53 | return default_value; 54 | 55 | int v = atoi(val); 56 | if (v < 0) 57 | return default_value; 58 | else 59 | return unsigned(v); 60 | } 61 | }; 62 | 63 | #endif // CMDLINE_H_INCLUDED 64 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_apple_metal/iOS/Info-iOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | imgui 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | metal 29 | 30 | UIRequiresFullScreen 31 | 32 | UIStatusBarHidden 33 | 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | UIInterfaceOrientationPortraitUpsideDown 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/armformatter_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED 7 | #define ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED 8 | 9 | #include 10 | #ifndef ASMJIT_NO_LOGGING 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | ASMJIT_BEGIN_SUB_NAMESPACE(arm) 17 | 18 | //! \cond INTERNAL 19 | //! \addtogroup asmjit_arm 20 | //! \{ 21 | 22 | namespace FormatterInternal { 23 | 24 | Error ASMJIT_CDECL format_feature( 25 | String& sb, 26 | uint32_t feature_id) noexcept; 27 | 28 | Error ASMJIT_CDECL format_cond_code( 29 | String& sb, 30 | CondCode cc) noexcept; 31 | 32 | Error ASMJIT_CDECL format_shift_op( 33 | String& sb, 34 | ShiftOp shift_op) noexcept; 35 | 36 | Error ASMJIT_CDECL format_register( 37 | String& sb, 38 | FormatFlags flags, 39 | const BaseEmitter* emitter, 40 | Arch arch, 41 | RegType reg_type, 42 | uint32_t reg_id, 43 | uint32_t element_type = 0, 44 | uint32_t element_index = 0xFFFFFFFF) noexcept; 45 | 46 | Error ASMJIT_CDECL format_register_list( 47 | String& sb, 48 | FormatFlags flags, 49 | const BaseEmitter* emitter, 50 | Arch arch, 51 | RegType reg_type, 52 | uint32_t reg_mask) noexcept; 53 | 54 | Error ASMJIT_CDECL format_operand( 55 | String& sb, 56 | FormatFlags flags, 57 | const BaseEmitter* emitter, 58 | Arch arch, 59 | const Operand_& op) noexcept; 60 | 61 | } // {FormatterInternal} 62 | 63 | //! \} 64 | //! \endcond 65 | 66 | ASMJIT_END_SUB_NAMESPACE 67 | 68 | #endif // !ASMJIT_NO_LOGGING 69 | #endif // ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED 70 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/cpp/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.) 2 | 3 | // This is also an example of how you may wrap your own similar types. 4 | // TL;DR; this is using the ImGuiInputTextFlags_CallbackResize facility, 5 | // which also demonstrated in 'Dear ImGui Demo->Widgets->Text Input->Resize Callback'. 6 | 7 | // Changelog: 8 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 9 | 10 | // Usage: 11 | // { 12 | // #include "misc/cpp/imgui_stdlib.h" 13 | // #include "misc/cpp/imgui_stdlib.cpp" // <-- If you want to include implementation without messing with your project/build. 14 | // [...] 15 | // std::string my_string; 16 | // ImGui::InputText("my string", &my_string); 17 | // } 18 | 19 | // See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki: 20 | // https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness 21 | 22 | #pragma once 23 | 24 | #ifndef IMGUI_DISABLE 25 | 26 | #include 27 | 28 | namespace ImGui 29 | { 30 | // ImGui::InputText() with std::string 31 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 32 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); 33 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); 34 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr); 35 | } 36 | 37 | #endif // #ifndef IMGUI_DISABLE 38 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glfw_vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Example usage: 2 | # mkdir build 3 | # cd build 4 | # cmake -g "Visual Studio 14 2015" .. 5 | 6 | cmake_minimum_required(VERSION 2.8) 7 | project(imgui_example_glfw_vulkan C CXX) 8 | 9 | if(NOT CMAKE_BUILD_TYPE) 10 | set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) 11 | endif() 12 | 13 | set(CMAKE_CXX_STANDARD 11) 14 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") 15 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") 16 | 17 | # GLFW 18 | if(NOT GLFW_DIR) 19 | set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo 20 | endif() 21 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) 22 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) 23 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) 24 | option(GLFW_INSTALL "Generate installation target" OFF) 25 | option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) 26 | add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) 27 | include_directories(${GLFW_DIR}/include) 28 | 29 | # Dear ImGui 30 | set(IMGUI_DIR ../../) 31 | include_directories(${IMGUI_DIR} ${IMGUI_DIR}/backends ..) 32 | 33 | # Libraries 34 | find_package(Vulkan REQUIRED) 35 | #find_library(VULKAN_LIBRARY 36 | #NAMES vulkan vulkan-1) 37 | #set(LIBRARIES "glfw;${VULKAN_LIBRARY}") 38 | set(LIBRARIES "glfw;Vulkan::Vulkan") 39 | 40 | # Use vulkan headers from glfw: 41 | include_directories(${GLFW_DIR}/deps) 42 | 43 | file(GLOB sources *.cpp) 44 | 45 | add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp ${IMGUI_DIR}/backends/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_tables.cpp ${IMGUI_DIR}/imgui_widgets.cpp) 46 | target_link_libraries(example_glfw_vulkan ${LIBRARIES}) 47 | 48 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_allegro5/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Configuration 3 | 4 | Dear ImGui outputs 16-bit vertex indices by default. 5 | Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile dear imgui with 32-bit indices. 6 | You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename. 7 | We are providing `imconfig_allegro5.h` that enables 32-bit indices. 8 | Note that the backend supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion. 9 | 10 | # How to Build 11 | 12 | ### On Ubuntu 14.04+ and macOS 13 | 14 | ```bash 15 | g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_main -lallegro_primitives -o allegro5_example 16 | ``` 17 | 18 | On macOS, install Allegro with homebrew: `brew install allegro`. 19 | 20 | ### On Windows with Visual Studio's CLI 21 | 22 | You may install Allegro using vcpkg: 23 | ``` 24 | git clone https://github.com/Microsoft/vcpkg 25 | cd vcpkg 26 | bootstrap-vcpkg.bat 27 | vcpkg install allegro5 --triplet=x86-windows ; for win32 28 | vcpkg install allegro5 --triplet=x64-windows ; for win64 29 | vcpkg integrate install ; register include / libs in Visual Studio 30 | ``` 31 | 32 | Build: 33 | ``` 34 | set ALLEGRODIR=path_to_your_allegro5_folder 35 | cl /Zi /MD /utf-8 /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. /I ..\..\backends main.cpp ..\..\backends\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib 36 | ``` 37 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_opengl3/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | ## Windows with Visual Studio's IDE 5 | 6 | Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary. 7 | 8 | ## Windows with Visual Studio's CLI 9 | 10 | Use build_win32.bat or directly: 11 | ``` 12 | set SDL3_DIR=path_to_your_sdl3_folder 13 | cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL3_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console 14 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 15 | # or for 64-bit: 16 | cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL3_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL3_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console 17 | ``` 18 | 19 | ## Linux and similar Unixes 20 | 21 | Use our Makefile or directly: 22 | ``` 23 | c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends 24 | main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp 25 | `sdl3-config --libs` -lGL -ldl 26 | ``` 27 | 28 | ## macOS 29 | 30 | Use our Makefile or directly: 31 | ``` 32 | brew install sdl3 33 | c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends 34 | main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp 35 | `sdl3-config --libs` -framework OpenGl -framework CoreFoundation 36 | ``` 37 | 38 | ## Emscripten 39 | 40 | As of 2023-05-30 Emscripten doesn't support SDL3 yet. 41 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64emithelper_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED 7 | #define ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 17 | 18 | //! \cond INTERNAL 19 | //! \addtogroup asmjit_a64 20 | //! \{ 21 | 22 | class EmitHelper : public BaseEmitHelper { 23 | public: 24 | ASMJIT_INLINE_NODEBUG explicit EmitHelper(BaseEmitter* emitter = nullptr) noexcept 25 | : BaseEmitHelper(emitter) {} 26 | 27 | ASMJIT_INLINE_NODEBUG ~EmitHelper() noexcept override = default; 28 | 29 | ASMJIT_INLINE void reset(BaseEmitter* emitter) noexcept { 30 | _emitter = emitter; 31 | } 32 | 33 | Error emit_reg_move( 34 | const Operand_& dst_, 35 | const Operand_& src_, TypeId type_id, const char* comment = nullptr) override; 36 | 37 | Error emit_reg_swap( 38 | const Reg& a, 39 | const Reg& b, const char* comment = nullptr) override; 40 | 41 | Error emit_arg_move( 42 | const Reg& dst_, TypeId dst_type_id, 43 | const Operand_& src_, TypeId src_type_id, const char* comment = nullptr) override; 44 | 45 | Error emit_prolog(const FuncFrame& frame); 46 | Error emit_epilog(const FuncFrame& frame); 47 | }; 48 | 49 | void init_emitter_funcs(BaseEmitter* emitter); 50 | 51 | [[maybe_unused]] 52 | static inline void update_emitter_funcs(BaseEmitter* emitter) noexcept { Support::maybe_unused(emitter); } 53 | 54 | //! \} 55 | //! \endcond 56 | 57 | ASMJIT_END_SUB_NAMESPACE 58 | 59 | #endif // ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED 60 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_apple_metal/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_version_info_reader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "file_version_info.h" 4 | #include "pe_structures.h" 5 | #include "version_info_types.h" 6 | 7 | namespace pe_bliss 8 | { 9 | class pe_resource_viewer; 10 | 11 | class resource_version_info_reader 12 | { 13 | public: //VERSION INFO 14 | resource_version_info_reader(const pe_resource_viewer& res); 15 | 16 | //Returns full version information: 17 | //file_version_info: versions and file info 18 | //lang_lang_string_values_map: map of version info strings with encodings with encodings 19 | //translation_values_map: map of translations 20 | const file_version_info get_version_info(lang_string_values_map& string_values, translation_values_map& translations, uint32_t index = 0) const; 21 | const file_version_info get_version_info_by_lang(lang_string_values_map& string_values, translation_values_map& translations, uint32_t language) const; 22 | 23 | public: 24 | //L"VS_VERSION_INFO" key of root version info block 25 | static const u16string version_info_key; 26 | 27 | private: 28 | const pe_resource_viewer& res_; 29 | 30 | //VERSION INFO helpers 31 | //Returns aligned version block value position 32 | static uint32_t get_version_block_value_pos(uint32_t base_pos, const unicode16_t* key); 33 | 34 | //Returns aligned version block first child position 35 | static uint32_t get_version_block_first_child_pos(uint32_t base_pos, uint32_t value_length, const unicode16_t* key); 36 | 37 | //Returns full version information: 38 | //file_version_info: versions and file info 39 | //lang_string_values_map: map of version info strings with encodings 40 | //translation_values_map: map of translations 41 | const file_version_info get_version_info(lang_string_values_map& string_values, translation_values_map& translations, const std::string& resource_data) const; 42 | 43 | //Throws an exception (id = resource_incorrect_version_info) 44 | static void throw_incorrect_version_info(); 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/support/arenapool.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_SUPPORT_ARENAPOOL_H_INCLUDED 7 | #define ASMJIT_SUPPORT_ARENAPOOL_H_INCLUDED 8 | 9 | #include 10 | 11 | ASMJIT_BEGIN_NAMESPACE 12 | 13 | //! \addtogroup asmjit_support 14 | //! \{ 15 | 16 | //! Helper class for implementing pooling of arena-allocated objects. 17 | template 18 | class ArenaPool { 19 | public: 20 | ASMJIT_NONCOPYABLE(ArenaPool) 21 | 22 | struct Link { Link* next; }; 23 | Link* _data {}; 24 | 25 | ASMJIT_INLINE_NODEBUG ArenaPool() noexcept = default; 26 | 27 | //! Resets the arena pool. 28 | //! 29 | //! Reset must be called before the associated \ref Arena is reset or destroyed to invalidate all pooled chunks. 30 | ASMJIT_INLINE_NODEBUG void reset() noexcept { _data = nullptr; } 31 | 32 | //! Allocates a memory (or reuses the existing allocation) of `Size` (in bytes). 33 | [[nodiscard]] 34 | ASMJIT_INLINE T* alloc(Arena& arena) noexcept { 35 | Link* p = _data; 36 | if (ASMJIT_UNLIKELY(p == nullptr)) { 37 | return arena.alloc_oneshot(Arena::aligned_size(Size)); 38 | } 39 | _data = p->next; 40 | return static_cast(static_cast(p)); 41 | } 42 | 43 | //! Pools the previously allocated memory. 44 | ASMJIT_INLINE void release(T* ptr) noexcept { 45 | ASMJIT_ASSERT(ptr != nullptr); 46 | Link* p = reinterpret_cast(ptr); 47 | 48 | p->next = _data; 49 | _data = p; 50 | } 51 | 52 | ASMJIT_INLINE size_t pooled_item_count() const noexcept { 53 | size_t n = 0; 54 | Link* p = _data; 55 | while (p) { 56 | n++; 57 | p = p->next; 58 | } 59 | return n; 60 | } 61 | }; 62 | //! \} 63 | 64 | ASMJIT_END_NAMESPACE 65 | 66 | #endif // ASMJIT_SUPPORT_ARENAPOOL_H_INCLUDED 67 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/core/core.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "pe_lib/pe_bliss.h" 14 | #include "asmjit/asmjit.h" 15 | #include "handler/handler.hpp" 16 | #include "utils/arguments.hpp" 17 | 18 | class c_core 19 | { 20 | public: 21 | c_core(std::string input_file, std::string output_file, std::uint32_t mutations_counter); 22 | 23 | asmjit::x86::Assembler* get_assembler() { 24 | return m_assembler.get(); 25 | } 26 | 27 | pe_bliss::pe_base* get_peImage() { 28 | return m_peImage.get(); 29 | } 30 | 31 | asmjit::CodeHolder* get_codeHolder() { 32 | return m_codeHolder.get(); 33 | } 34 | 35 | struct xor_target_t { 36 | std::uintptr_t func_start; 37 | std::uint32_t func_end; 38 | std::uint8_t xor_key; 39 | }; 40 | 41 | std::vector obf_xor_targets; 42 | 43 | void xor_function_range(xor_target_t xor_target); 44 | 45 | void insert_runtime_xor_stub(xor_target_t xor_target); 46 | 47 | void xor_sections(std::string sec_to_xor); 48 | 49 | void process(); 50 | 51 | void simple_jump_obfuscation(); 52 | void call_obfuscation(); 53 | 54 | void generate_junk_code(); 55 | 56 | void push_pop_junk(); 57 | void big_conditions_junk(); 58 | 59 | void obfuscation_process(); 60 | 61 | asmjit::x86::Gp get_rand_reg(); 62 | 63 | asmjit::x86::Gp get_rand_lower_reg(); 64 | 65 | bool obf_call_oep = false; 66 | bool obf_anti_disasm = false; 67 | bool obf_mba = false; 68 | bool obf_xor_sections = false; 69 | bool obf_fake_instr = false; 70 | bool obf_func_pack = false; 71 | 72 | std::uint32_t m_mutations; 73 | std::string m_input; 74 | std::string m_output; 75 | 76 | private: 77 | std::unique_ptr m_assembler; 78 | std::unique_ptr m_peImage; 79 | std::unique_ptr m_codeHolder; 80 | 81 | }; extern c_core* mutator; 82 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/logger.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #ifndef ASMJIT_NO_LOGGING 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_NAMESPACE 14 | 15 | // Logger - Implementation 16 | // ======================= 17 | 18 | Logger::Logger() noexcept 19 | : _options() {} 20 | Logger::~Logger() noexcept {} 21 | 22 | // [[pure virtual]] 23 | Error Logger::_log(const char* data, size_t size) noexcept { 24 | Support::maybe_unused(data, size); 25 | 26 | // Do not error in this case - the logger would just sink to /dev/null. 27 | return Error::kOk; 28 | } 29 | 30 | Error Logger::logf(const char* fmt, ...) noexcept { 31 | Error err; 32 | va_list ap; 33 | 34 | va_start(ap, fmt); 35 | err = logv(fmt, ap); 36 | va_end(ap); 37 | 38 | return err; 39 | } 40 | 41 | Error Logger::logv(const char* fmt, va_list ap) noexcept { 42 | StringTmp<2048> sb; 43 | ASMJIT_PROPAGATE(sb.append_vformat(fmt, ap)); 44 | return log(sb); 45 | } 46 | 47 | // FileLogger - Implementation 48 | // =========================== 49 | 50 | FileLogger::FileLogger(FILE* file) noexcept 51 | : _file(file) {} 52 | FileLogger::~FileLogger() noexcept {} 53 | 54 | Error FileLogger::_log(const char* data, size_t size) noexcept { 55 | if (!_file) { 56 | return Error::kOk; 57 | } 58 | 59 | if (size == SIZE_MAX) { 60 | size = strlen(data); 61 | } 62 | 63 | fwrite(data, 1, size, _file); 64 | return Error::kOk; 65 | } 66 | 67 | // StringLogger - Implementation 68 | // ============================= 69 | 70 | StringLogger::StringLogger() noexcept {} 71 | StringLogger::~StringLogger() noexcept {} 72 | 73 | Error StringLogger::_log(const char* data, size_t size) noexcept { 74 | return _content.append(data, size); 75 | } 76 | 77 | ASMJIT_END_NAMESPACE 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64compiler.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_COMPILER) 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 15 | 16 | // a64::Compiler - Construction & Destruction 17 | // ========================================== 18 | 19 | Compiler::Compiler(CodeHolder* code) noexcept : BaseCompiler() { 20 | _arch_mask = uint64_t(1) << uint32_t(Arch::kAArch64); 21 | init_emitter_funcs(this); 22 | 23 | if (code) { 24 | code->attach(this); 25 | } 26 | } 27 | Compiler::~Compiler() noexcept {} 28 | 29 | // a64::Compiler - Events 30 | // ====================== 31 | 32 | Error Compiler::on_attach(CodeHolder& code) noexcept { 33 | ASMJIT_PROPAGATE(Base::on_attach(code)); 34 | Error err = add_pass(); 35 | 36 | if (ASMJIT_UNLIKELY(err != Error::kOk)) { 37 | on_detach(code); 38 | return err; 39 | } 40 | 41 | _instruction_alignment = uint8_t(4); 42 | update_emitter_funcs(this); 43 | 44 | return Error::kOk; 45 | } 46 | 47 | Error Compiler::on_detach(CodeHolder& code) noexcept { 48 | return Base::on_detach(code); 49 | } 50 | 51 | Error Compiler::on_reinit(CodeHolder& code) noexcept { 52 | Error err = Base::on_reinit(code); 53 | if (err == Error::kOk) { 54 | err = add_pass(); 55 | } 56 | return err; 57 | } 58 | 59 | // a64::Compiler - Finalize 60 | // ======================== 61 | 62 | Error Compiler::finalize() { 63 | ASMJIT_PROPAGATE(run_passes()); 64 | Assembler a(_code); 65 | a.add_encoding_options(encoding_options()); 66 | a.add_diagnostic_options(diagnostic_options()); 67 | return serialize_to(&a); 68 | } 69 | 70 | ASMJIT_END_SUB_NAMESPACE 71 | 72 | #endif // !ASMJIT_NO_AARCH64 && !ASMJIT_NO_COMPILER 73 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_null/example_null.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | 26 | 27 | imgui 28 | 29 | 30 | sources 31 | 32 | 33 | imgui 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | sources 46 | 47 | 48 | 49 | 50 | 51 | imgui 52 | 53 | 54 | imgui 55 | 56 | 57 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/target.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_TARGET_H_INCLUDED 7 | #define ASMJIT_CORE_TARGET_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_NAMESPACE 14 | 15 | //! \addtogroup asmjit_core 16 | //! \{ 17 | 18 | //! Target is an abstract class that describes a machine code target. 19 | class ASMJIT_VIRTAPI Target { 20 | public: 21 | ASMJIT_BASE_CLASS(Target) 22 | ASMJIT_NONCOPYABLE(Target) 23 | 24 | //! Target environment information. 25 | Environment _environment; 26 | //! Target CPU features. 27 | CpuFeatures _cpu_features; 28 | //! Target CPU hints. 29 | CpuHints _cpu_hints; 30 | 31 | //! \name Construction & Destruction 32 | //! \{ 33 | 34 | //! Creates a `Target` instance. 35 | ASMJIT_API Target() noexcept; 36 | //! Destroys the `Target` instance. 37 | ASMJIT_API virtual ~Target() noexcept; 38 | 39 | //! \} 40 | 41 | //! \name Accessors 42 | //! \{ 43 | 44 | //! Returns target's environment. 45 | [[nodiscard]] 46 | ASMJIT_INLINE_NODEBUG const Environment& environment() const noexcept { return _environment; } 47 | 48 | //! Returns the target architecture. 49 | [[nodiscard]] 50 | ASMJIT_INLINE_NODEBUG Arch arch() const noexcept { return _environment.arch(); } 51 | 52 | //! Returns the target sub-architecture. 53 | [[nodiscard]] 54 | ASMJIT_INLINE_NODEBUG SubArch sub_arch() const noexcept { return _environment.sub_arch(); } 55 | 56 | [[nodiscard]] 57 | //! Returns target CPU features. 58 | ASMJIT_INLINE_NODEBUG const CpuFeatures& cpu_features() const noexcept { return _cpu_features; } 59 | 60 | [[nodiscard]] 61 | //! Returns target CPU hints. 62 | ASMJIT_INLINE_NODEBUG CpuHints cpu_hints() const noexcept { return _cpu_hints; } 63 | 64 | //! \} 65 | }; 66 | 67 | //! \} 68 | 69 | ASMJIT_END_NAMESPACE 70 | 71 | #endif // ASMJIT_CORE_TARGET_H_INCLUDED 72 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/x86/x86compiler.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_COMPILER) 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | ASMJIT_BEGIN_SUB_NAMESPACE(x86) 15 | 16 | // x86::Compiler - Construction & Destruction 17 | // ========================================== 18 | 19 | Compiler::Compiler(CodeHolder* code) noexcept : BaseCompiler() { 20 | _arch_mask = (uint64_t(1) << uint32_t(Arch::kX86)) | 21 | (uint64_t(1) << uint32_t(Arch::kX64)) ; 22 | init_emitter_funcs(this); 23 | 24 | if (code) { 25 | code->attach(this); 26 | } 27 | } 28 | Compiler::~Compiler() noexcept {} 29 | 30 | // x86::Compiler - Events 31 | // ====================== 32 | 33 | Error Compiler::on_attach(CodeHolder& code) noexcept { 34 | ASMJIT_PROPAGATE(Base::on_attach(code)); 35 | Error err = add_pass(); 36 | 37 | if (ASMJIT_UNLIKELY(err != Error::kOk)) { 38 | on_detach(code); 39 | return err; 40 | } 41 | 42 | _instruction_alignment = uint8_t(1); 43 | update_emitter_funcs(this); 44 | 45 | return Error::kOk; 46 | } 47 | 48 | Error Compiler::on_detach(CodeHolder& code) noexcept { 49 | return Base::on_detach(code); 50 | } 51 | 52 | Error Compiler::on_reinit(CodeHolder& code) noexcept { 53 | Error err = Base::on_reinit(code); 54 | if (err == Error::kOk) { 55 | err = add_pass(); 56 | } 57 | return err; 58 | } 59 | 60 | // x86::Compiler - Finalize 61 | // ======================== 62 | 63 | Error Compiler::finalize() { 64 | ASMJIT_PROPAGATE(run_passes()); 65 | Assembler a(_code); 66 | a.add_encoding_options(encoding_options()); 67 | a.add_diagnostic_options(diagnostic_options()); 68 | return serialize_to(&a); 69 | } 70 | 71 | ASMJIT_END_SUB_NAMESPACE 72 | 73 | #endif // !ASMJIT_NO_X86 && !ASMJIT_NO_COMPILER 74 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/a64.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_A64_H_INCLUDED 7 | #define ASMJIT_A64_H_INCLUDED 8 | 9 | //! \addtogroup asmjit_a64 10 | //! 11 | //! ### Emitters 12 | //! 13 | //! - \ref a64::Assembler - AArch64 assembler (must read, provides examples). 14 | //! - \ref a64::Builder - AArch64 builder. 15 | //! - \ref a64::Compiler - AArch64 compiler. 16 | //! - \ref a64::Emitter - AArch64 emitter (abstract). 17 | //! 18 | //! ### Supported Instructions 19 | //! 20 | //! - Emitters: 21 | //! - \ref a64::EmitterExplicitT - Provides all instructions that use explicit operands, provides also utility 22 | //! functions. The member functions provided are part of all AArch64 emitters. 23 | //! 24 | //! - Instruction representation: 25 | //! - \ref a64::Inst::Id - instruction identifiers. 26 | //! 27 | //! ### Register Operands 28 | //! 29 | //! - \ref a64::Gp - General purpose register (abstracts 32-bit and 64-bit general purpose registers). 30 | //! - \ref a64::Vec - Vector register (abstracts B, H, S, D, and Q NEON register with possible element type and index). 31 | //! 32 | //! ### Memory Operands 33 | //! 34 | //! - \ref a64::Mem - AArch64 memory operand that provides support for all ARM addressing features including base, 35 | //! index, pre/post increment, and ARM-specific shift addressing + index extending. 36 | //! 37 | //! ### Other 38 | //! 39 | //! - \ref arm::Shift - Shift operation and value. 40 | //! - \ref arm::Utils - Utilities that can help during code generation for AArch32 and AArch64. 41 | 42 | #include 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | 54 | #endif // ASMJIT_A64_H_INCLUDED 55 | 56 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/raconstraints_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_RACONSTRAINTS_P_H_INCLUDED 7 | #define ASMJIT_CORE_RACONSTRAINTS_P_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | ASMJIT_BEGIN_NAMESPACE 15 | 16 | //! \cond INTERNAL 17 | //! \addtogroup asmjit_ra 18 | //! \{ 19 | 20 | //! Provides architecture constraints used by register allocator. 21 | class RAConstraints { 22 | public: 23 | //! \name Members 24 | //! \{ 25 | 26 | Support::Array _available_regs {}; 27 | 28 | //! \} 29 | 30 | [[nodiscard]] 31 | ASMJIT_NOINLINE Error init(Arch arch) noexcept { 32 | switch (arch) { 33 | case Arch::kX86: 34 | case Arch::kX64: { 35 | uint32_t register_count = arch == Arch::kX86 ? 8 : 16; 36 | _available_regs[RegGroup::kGp] = Support::lsb_mask(register_count) & ~Support::bit_mask(4u); 37 | _available_regs[RegGroup::kVec] = Support::lsb_mask(register_count); 38 | _available_regs[RegGroup::kMask] = Support::lsb_mask(8); 39 | _available_regs[RegGroup::kX86_MM] = Support::lsb_mask(8); 40 | return Error::kOk; 41 | } 42 | 43 | case Arch::kAArch64: { 44 | _available_regs[RegGroup::kGp] = 0xFFFFFFFFu & ~Support::bit_mask(18, 31u); 45 | _available_regs[RegGroup::kVec] = 0xFFFFFFFFu; 46 | _available_regs[RegGroup::kMask] = 0; 47 | _available_regs[RegGroup::kExtra] = 0; 48 | return Error::kOk; 49 | } 50 | 51 | default: 52 | return make_error(Error::kInvalidArch); 53 | } 54 | } 55 | 56 | [[nodiscard]] 57 | inline RegMask available_regs(RegGroup group) const noexcept { return _available_regs[group]; } 58 | }; 59 | 60 | //! \} 61 | //! \endcond 62 | 63 | ASMJIT_END_NAMESPACE 64 | 65 | #endif // ASMJIT_CORE_RACONSTRAINTS_P_H_INCLUDED 66 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/misc/debuggers/imgui.natvis: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | {{Size={Size} Capacity={Capacity}}} 18 | 19 | 20 | Size 21 | Data 22 | 23 | 24 | 25 | 26 | 27 | {{Size={DataEnd-Data} }} 28 | 29 | 30 | DataEnd-Data 31 | Data 32 | 33 | 34 | 35 | 36 | 37 | {{x={x,g} y={y,g}}} 38 | 39 | 40 | 41 | {{x={x,g} y={y,g} z={z,g} w={w,g}}} 42 | 43 | 44 | 45 | {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}} 46 | 47 | Min 48 | Max 49 | Max.x - Min.x 50 | Max.y - Min.y 51 | 52 | 53 | 54 | 55 | {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}} 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/.gitignore: -------------------------------------------------------------------------------- 1 | ## OSX artifacts 2 | .DS_Store 3 | 4 | ## Dear ImGui artifacts 5 | imgui.ini 6 | imgui*.ini 7 | 8 | ## General build artifacts 9 | *.o 10 | *.obj 11 | *.exe 12 | examples/*/Debug/* 13 | examples/*/Release/* 14 | examples/*/x64/* 15 | examples/*.tmp 16 | 17 | ## Visual Studio artifacts 18 | .vs 19 | ipch 20 | *.opensdf 21 | *.log 22 | *.pdb 23 | *.ilk 24 | *.user 25 | *.sdf 26 | *.suo 27 | *.VC.db 28 | *.VC.VC.opendb 29 | 30 | ## Getting files created in JSON/Schemas/Catalog/ from a VS2022 update 31 | JSON/ 32 | 33 | ## Commonly used CMake directories & CMake CPM cache 34 | build*/ 35 | .cache 36 | 37 | ## Xcode & macOS artifacts 38 | project.xcworkspace 39 | xcuserdata 40 | examples/*/*.dSYM 41 | 42 | ## Emscripten artifacts 43 | examples/*.o.tmp 44 | examples/*.out.js 45 | examples/*.out.wasm 46 | examples/example_glfw_opengl3/web/* 47 | examples/example_glfw_wgpu/web/* 48 | examples/example_glfw_wgpu/external/* 49 | examples/example_sdl2_opengl3/web/* 50 | examples/example_sdl2_wgpu/web/* 51 | examples/example_sdl3_opengl3/web/* 52 | examples/example_sdl3_wgpu/web/* 53 | 54 | ## JetBrains IDE artifacts 55 | .idea 56 | cmake-build-* 57 | 58 | ## VS code artifacts 59 | .vscode 60 | 61 | ## Unix executables from our example Makefiles 62 | examples/example_apple_metal/example_apple_metal 63 | examples/example_apple_opengl2/example_apple_opengl2 64 | examples/example_glfw_metal/example_glfw_metal 65 | examples/example_glfw_opengl2/example_glfw_opengl2 66 | examples/example_glfw_opengl3/example_glfw_opengl3 67 | examples/example_glfw_vulkan/example_glfw_vulkan 68 | examples/example_glut_opengl2/example_glut_opengl2 69 | examples/example_null/example_null 70 | examples/example_sdl2_metal/example_sdl2_metal 71 | examples/example_sdl2_opengl2/example_sdl2_opengl2 72 | examples/example_sdl2_opengl3/example_sdl2_opengl3 73 | examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2 74 | examples/example_sdl2_vulkan/example_sdl2_vulkan 75 | examples/example_sdl3_metal/example_sdl3_metal 76 | examples/example_sdl3_opengl3/example_sdl3_opengl3 77 | examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3 78 | examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3 79 | examples/example_sdl3_vulkan/example_sdl3_vulkan 80 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX9 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef! 6 | // [X] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset). 7 | // [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures). 8 | // [X] Renderer: IMGUI_USE_BGRA_PACKED_COLOR support, as this is the optimal color encoding for DirectX9. 9 | 10 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 11 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 12 | // Learn about Dear ImGui: 13 | // - FAQ https://dearimgui.com/faq 14 | // - Getting Started https://dearimgui.com/getting-started 15 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 16 | // - Introduction, links and more at the top of imgui.cpp 17 | 18 | #pragma once 19 | #include "imgui.h" // IMGUI_IMPL_API 20 | #ifndef IMGUI_DISABLE 21 | 22 | struct IDirect3DDevice9; 23 | 24 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 25 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 26 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 27 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 28 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 29 | 30 | // Use if you want to reset your rendering device without losing Dear ImGui state. 31 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 32 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 33 | 34 | // (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually. 35 | IMGUI_IMPL_API void ImGui_ImplDX9_UpdateTexture(ImTextureData* tex); 36 | 37 | #endif // #ifndef IMGUI_DISABLE 38 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/arm/a64formatter.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #include 7 | #if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_LOGGING) 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #ifndef ASMJIT_NO_COMPILER 17 | #include 18 | #endif 19 | 20 | ASMJIT_BEGIN_SUB_NAMESPACE(a64) 21 | 22 | // a64::FormatterInternal - Format Instruction 23 | // =========================================== 24 | 25 | ASMJIT_FAVOR_SIZE Error FormatterInternal::format_instruction( 26 | String& sb, 27 | FormatFlags format_flags, 28 | const BaseEmitter* emitter, 29 | Arch arch, 30 | const BaseInst& inst, Span operands) noexcept { 31 | 32 | // Format instruction options and instruction mnemonic. 33 | InstId inst_id = inst.real_id(); 34 | if (inst_id != Inst::kIdNone && inst_id < Inst::_kIdCount) { 35 | InstStringifyOptions stringify_options = 36 | Support::test(format_flags, FormatFlags::kShowAliases) 37 | ? InstStringifyOptions::kAliases 38 | : InstStringifyOptions::kNone; 39 | ASMJIT_PROPAGATE(InstInternal::inst_id_to_string(inst_id, stringify_options, sb)); 40 | } 41 | else { 42 | ASMJIT_PROPAGATE(sb.append_format("[InstId=#%u]", unsigned(inst_id))); 43 | } 44 | 45 | CondCode cc = inst.arm_cond_code(); 46 | if (cc != CondCode::kAL) { 47 | ASMJIT_PROPAGATE(sb.append('.')); 48 | ASMJIT_PROPAGATE(format_cond_code(sb, cc)); 49 | } 50 | 51 | for (size_t i = 0u; i < operands.size(); i++) { 52 | const Operand_& op = operands[i]; 53 | if (op.is_none()) { 54 | break; 55 | } 56 | 57 | ASMJIT_PROPAGATE(sb.append(i == 0 ? " " : ", ")); 58 | ASMJIT_PROPAGATE(format_operand(sb, format_flags, emitter, arch, op)); 59 | } 60 | 61 | return Error::kOk; 62 | } 63 | 64 | ASMJIT_END_SUB_NAMESPACE 65 | 66 | #endif // !ASMJIT_NO_AARCH64 && !ASMJIT_NO_LOGGING 67 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | sources 6 | 7 | 8 | sources 9 | 10 | 11 | sources 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | imgui 27 | 28 | 29 | 30 | 31 | sources 32 | 33 | 34 | sources 35 | 36 | 37 | sources 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | {9044ef92-2afa-42f2-92df-ac473c7c32b3} 55 | 56 | 57 | {ef84458b-039a-4902-8455-4e33df5a8578} 58 | 59 | 60 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit/core/emithelper_p.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_CORE_EMITHELPER_P_H_INCLUDED 7 | #define ASMJIT_CORE_EMITHELPER_P_H_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | ASMJIT_BEGIN_NAMESPACE 14 | 15 | //! \cond INTERNAL 16 | //! \addtogroup asmjit_core 17 | //! \{ 18 | 19 | //! Helper class that provides utilities for each supported architecture. 20 | class BaseEmitHelper { 21 | protected: 22 | BaseEmitter* _emitter; 23 | 24 | public: 25 | ASMJIT_INLINE_NODEBUG explicit BaseEmitHelper(BaseEmitter* emitter = nullptr) noexcept 26 | : _emitter(emitter) {} 27 | 28 | ASMJIT_INLINE_NODEBUG virtual ~BaseEmitHelper() noexcept = default; 29 | 30 | [[nodiscard]] 31 | ASMJIT_INLINE_NODEBUG BaseEmitter* emitter() const noexcept { return _emitter; } 32 | 33 | //! Emits a pure move operation between two registers or the same type or between a register and its home 34 | //! slot. This function does not handle register conversion. 35 | virtual Error emit_reg_move( 36 | const Operand_& dst_, 37 | const Operand_& src_, TypeId type_id, const char* comment = nullptr); 38 | 39 | //! Emits swap between two registers. 40 | virtual Error emit_reg_swap( 41 | const Reg& a, 42 | const Reg& b, const char* comment = nullptr); 43 | 44 | //! Emits move from a function argument (either register or stack) to a register. 45 | //! 46 | //! This function can handle the necessary conversion from one argument to another, and from one register type 47 | //! to another, if it's possible. Any attempt of conversion that requires third register of a different group 48 | //! (for example conversion from K to MMX on X86/X64) will fail. 49 | virtual Error emit_arg_move( 50 | const Reg& dst_, TypeId dst_type_id, 51 | const Operand_& src_, TypeId src_type_id, const char* comment = nullptr); 52 | 53 | Error emit_args_assignment(const FuncFrame& frame, const FuncArgsAssignment& args); 54 | }; 55 | 56 | //! \} 57 | //! \endcond 58 | 59 | ASMJIT_END_NAMESPACE 60 | 61 | #endif // ASMJIT_CORE_EMITHELPER_P_H_INCLUDED 62 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | imgui 36 | 37 | 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | imgui 56 | 57 | 58 | imgui 59 | 60 | 61 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_glut_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # Linux: 6 | # apt-get install freeglut3-dev 7 | # 8 | 9 | #CXX = g++ 10 | #CXX = clang++ 11 | 12 | EXE = example_glut_opengl2 13 | IMGUI_DIR = ../.. 14 | SOURCES = main.cpp 15 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 16 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glut.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp 17 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 18 | UNAME_S := $(shell uname -s) 19 | 20 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 21 | CXXFLAGS += -g -Wall -Wformat 22 | LIBS = 23 | 24 | ##--------------------------------------------------------------------- 25 | ## BUILD FLAGS PER PLATFORM 26 | ##--------------------------------------------------------------------- 27 | 28 | ifeq ($(UNAME_S), Linux) #LINUX 29 | ECHO_MESSAGE = "Linux" 30 | LIBS += -lGL -lglut 31 | CFLAGS = $(CXXFLAGS) 32 | endif 33 | 34 | ifeq ($(UNAME_S), Darwin) #APPLE 35 | ECHO_MESSAGE = "Mac OS X" 36 | LIBS += -framework OpenGL -framework GLUT 37 | LIBS += -L/usr/local/lib -L/opt/local/lib 38 | 39 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 40 | CFLAGS = $(CXXFLAGS) 41 | endif 42 | 43 | ifeq ($(OS), Windows_NT) 44 | ECHO_MESSAGE = "MinGW" 45 | LIBS += -lgdi32 -lopengl32 -limm32 46 | ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes) 47 | CXXFLAGS += $(shell pkg-config freeglut --cflags) 48 | LIBS += $(shell pkg-config freeglut --libs) 49 | else 50 | LIBS += -lglut 51 | endif 52 | CFLAGS = $(CXXFLAGS) 53 | endif 54 | 55 | ##--------------------------------------------------------------------- 56 | ## BUILD RULES 57 | ##--------------------------------------------------------------------- 58 | 59 | %.o:%.cpp 60 | $(CXX) $(CXXFLAGS) -c -o $@ $< 61 | 62 | %.o:$(IMGUI_DIR)/%.cpp 63 | $(CXX) $(CXXFLAGS) -c -o $@ $< 64 | 65 | %.o:$(IMGUI_DIR)/backends/%.cpp 66 | $(CXX) $(CXXFLAGS) -c -o $@ $< 67 | 68 | all: $(EXE) 69 | @echo Build complete for $(ECHO_MESSAGE) 70 | 71 | $(EXE): $(OBJS) 72 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 73 | 74 | clean: 75 | rm -f $(EXE) $(OBJS) 76 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_sdlgpu3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL3 (http://www.libsdl.org) which is still unreleased/unpackaged. 6 | 7 | #CXX = g++ 8 | #CXX = clang++ 9 | 10 | EXE = example_sdl3_sdlgpu3 11 | IMGUI_DIR = ../.. 12 | SOURCES = main.cpp 13 | SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp 14 | SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl3.cpp $(IMGUI_DIR)/backends/imgui_impl_sdlgpu3.cpp 15 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 16 | UNAME_S := $(shell uname -s) 17 | 18 | CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends 19 | CXXFLAGS += -g -Wall -Wformat 20 | LIBS = 21 | 22 | 23 | ##--------------------------------------------------------------------- 24 | ## BUILD FLAGS PER PLATFORM 25 | ##--------------------------------------------------------------------- 26 | 27 | ifeq ($(UNAME_S), Linux) #LINUX 28 | ECHO_MESSAGE = "Linux" 29 | LIBS += -ldl `pkg-config sdl3 --libs` 30 | 31 | CXXFLAGS += `pkg-config sdl3 --cflags` 32 | CFLAGS = $(CXXFLAGS) 33 | endif 34 | 35 | ifeq ($(UNAME_S), Darwin) #APPLE 36 | ECHO_MESSAGE = "Mac OS X" 37 | LIBS += -framework Cocoa -framework IOKit -framework CoreVideo `pkg-config --libs sdl3` 38 | LIBS += -L/usr/local/lib -L/opt/local/lib 39 | 40 | CXXFLAGS += `pkg-config sdl3 --cflags` 41 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 42 | CFLAGS = $(CXXFLAGS) 43 | endif 44 | 45 | ifeq ($(OS), Windows_NT) 46 | ECHO_MESSAGE = "MinGW" 47 | LIBS += -lgdi32 -limm32 `pkg-config --static --libs sdl3` 48 | 49 | CXXFLAGS += `pkg-config --cflags sdl3` 50 | CFLAGS = $(CXXFLAGS) 51 | endif 52 | 53 | ##--------------------------------------------------------------------- 54 | ## BUILD RULES 55 | ##--------------------------------------------------------------------- 56 | 57 | %.o:%.cpp 58 | $(CXX) $(CXXFLAGS) -c -o $@ $< 59 | 60 | %.o:$(IMGUI_DIR)/%.cpp 61 | $(CXX) $(CXXFLAGS) -c -o $@ $< 62 | 63 | %.o:$(IMGUI_DIR)/backends/%.cpp 64 | $(CXX) $(CXXFLAGS) -c -o $@ $< 65 | 66 | all: $(EXE) 67 | @echo Build complete for $(ECHO_MESSAGE) 68 | 69 | $(EXE): $(OBJS) 70 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 71 | 72 | clean: 73 | rm -f $(EXE) $(OBJS) 74 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit-testing/tests/asmjit_test_compiler.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef ASMJIT_TEST_COMPILER_H_INCLUDED 7 | #define ASMJIT_TEST_COMPILER_H_INCLUDED 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | class SimpleErrorHandler : public asmjit::ErrorHandler { 15 | public: 16 | SimpleErrorHandler() 17 | : _err(asmjit::Error::kOk) {} 18 | 19 | void handle_error(asmjit::Error err, const char* message, asmjit::BaseEmitter* origin) override { 20 | asmjit::Support::maybe_unused(origin); 21 | _err = err; 22 | _message.assign(message); 23 | } 24 | 25 | asmjit::Error _err; 26 | asmjit::String _message; 27 | }; 28 | 29 | //! A test case interface for testing AsmJit's Compiler. 30 | class TestCase { 31 | public: 32 | TestCase(const char* name, asmjit::Arch arch) { 33 | if (name) 34 | _name.assign(name); 35 | _arch = arch; 36 | } 37 | 38 | virtual ~TestCase() {} 39 | 40 | inline const char* name() const { return _name.data(); } 41 | inline asmjit::Arch arch() const { return _arch; } 42 | 43 | virtual void compile(asmjit::BaseCompiler& cc) = 0; 44 | virtual bool run(void* func, asmjit::String& result, asmjit::String& expect) = 0; 45 | 46 | asmjit::String _name; 47 | asmjit::Arch _arch; 48 | }; 49 | 50 | class TestApp { 51 | public: 52 | std::vector> _tests; 53 | 54 | const char* _arch = nullptr; 55 | const char* _filter = nullptr; 56 | bool _help_only = false; 57 | bool _verbose = false; 58 | bool _dump_asm = false; 59 | bool _dump_hex = false; 60 | 61 | unsigned _num_tests = 0; 62 | unsigned _num_failed = 0; 63 | size_t _output_size = 0; 64 | 65 | TestApp() noexcept 66 | : _arch("all") {} 67 | ~TestApp() noexcept {} 68 | 69 | void add(TestCase* test) noexcept { 70 | _tests.push_back(std::unique_ptr(test)); 71 | } 72 | 73 | template 74 | inline void add_t() { T::add(*this); } 75 | 76 | int handle_args(int argc, const char* const* argv); 77 | void show_info(); 78 | 79 | bool should_run(const TestCase* tc); 80 | int run(); 81 | }; 82 | 83 | #endif // ASMJIT_TEST_COMPILER_H_INCLUDED 84 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/resource_bitmap_writer.cpp: -------------------------------------------------------------------------------- 1 | #include "resource_bitmap_writer.h" 2 | #include "pe_resource_manager.h" 3 | #include "pe_structures.h" 4 | 5 | namespace pe_bliss 6 | { 7 | using namespace pe_win; 8 | 9 | resource_bitmap_writer::resource_bitmap_writer(pe_resource_manager& res) 10 | :res_(res) 11 | {} 12 | 13 | //Adds bitmap from bitmap file data. If bitmap already exists, replaces it 14 | //timestamp will be used for directories that will be added 15 | void resource_bitmap_writer::add_bitmap(const std::string& bitmap_file, uint32_t id, uint32_t language, uint32_t codepage, uint32_t timestamp) 16 | { 17 | //Check bitmap data a little 18 | if(bitmap_file.length() < sizeof(bitmapfileheader)) 19 | throw pe_exception("Incorrect resource bitmap", pe_exception::resource_incorrect_bitmap); 20 | 21 | resource_directory_entry new_entry; 22 | new_entry.set_id(id); 23 | 24 | //Add bitmap 25 | res_.add_resource(bitmap_file.substr(sizeof(bitmapfileheader)), pe_resource_viewer::resource_bitmap, new_entry, resource_directory::entry_finder(id), language, codepage, timestamp); 26 | } 27 | 28 | //Adds bitmap from bitmap file data. If bitmap already exists, replaces it 29 | //timestamp will be used for directories that will be added 30 | void resource_bitmap_writer::add_bitmap(const std::string& bitmap_file, const std::wstring& name, uint32_t language, uint32_t codepage, uint32_t timestamp) 31 | { 32 | //Check bitmap data a little 33 | if(bitmap_file.length() < sizeof(bitmapfileheader)) 34 | throw pe_exception("Incorrect resource bitmap", pe_exception::resource_incorrect_bitmap); 35 | 36 | resource_directory_entry new_entry; 37 | new_entry.set_name(name); 38 | 39 | //Add bitmap 40 | res_.add_resource(bitmap_file.substr(sizeof(bitmapfileheader)), pe_resource_viewer::resource_bitmap, new_entry, resource_directory::entry_finder(name), language, codepage, timestamp); 41 | } 42 | 43 | //Removes bitmap by name/ID and language 44 | bool resource_bitmap_writer::remove_bitmap(const std::wstring& name, uint32_t language) 45 | { 46 | return res_.remove_resource(pe_resource_viewer::resource_bitmap, name, language); 47 | } 48 | 49 | //Removes bitmap by name/ID and language 50 | bool resource_bitmap_writer::remove_bitmap(uint32_t id, uint32_t language) 51 | { 52 | return res_.remove_resource(pe_resource_viewer::resource_bitmap, id, language); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/backends/imgui_impl_android.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for Android native app 2 | // This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3) 3 | 4 | // Implemented features: 5 | // [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5] 6 | // [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen. 7 | // Missing features or Issues: 8 | // [ ] Platform: Clipboard support. 9 | // [ ] Platform: Gamepad support. 10 | // [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android. 11 | // Important: 12 | // - Consider using SDL or GLFW backend on Android, which will be more full-featured than this. 13 | // - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446) 14 | // - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446) 15 | 16 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 17 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 18 | // Learn about Dear ImGui: 19 | // - FAQ https://dearimgui.com/faq 20 | // - Getting Started https://dearimgui.com/getting-started 21 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 22 | // - Introduction, links and more at the top of imgui.cpp 23 | 24 | #pragma once 25 | #include "imgui.h" // IMGUI_IMPL_API 26 | #ifndef IMGUI_DISABLE 27 | 28 | struct ANativeWindow; 29 | struct AInputEvent; 30 | 31 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! 32 | IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window); 33 | IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event); 34 | IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown(); 35 | IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame(); 36 | 37 | #endif // #ifndef IMGUI_DISABLE 38 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | imgui 46 | 47 | 48 | sources 49 | 50 | 51 | sources 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_sdl3_directx11/example_sdl3_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | imgui 46 | 47 | 48 | sources 49 | 50 | 51 | sources 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | imgui 49 | 50 | 51 | imgui 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | sources 46 | 47 | 48 | sources 49 | 50 | 51 | imgui 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /pe-packer-x64/vendor/imgui/examples/example_win32_vulkan/example_win32_vulkan.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | imgui 43 | 44 | 45 | sources 46 | 47 | 48 | sources 49 | 50 | 51 | imgui 52 | 53 | 54 | 55 | 56 | 57 | imgui 58 | 59 | 60 | imgui 61 | 62 | 63 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/asmjit/asmjit-testing/commons/random.h: -------------------------------------------------------------------------------- 1 | // This file is part of AsmJit project 2 | // 3 | // See or LICENSE.md for license and copyright information 4 | // SPDX-License-Identifier: Zlib 5 | 6 | #ifndef TESTING_COMMONS_RANDOM_H_INCLUDED 7 | #define TESTING_COMMONS_RANDOM_H_INCLUDED 8 | 9 | #include 10 | #include 11 | 12 | namespace TestUtils { 13 | namespace { 14 | 15 | // A pseudo random number generator based on a paper by Sebastiano Vigna: 16 | // http://vigna.di.unimi.it/ftp/papers/xorshiftplus.pdf 17 | class Random { 18 | public: 19 | // Constants suggested as `23/18/5`. 20 | static inline constexpr uint32_t kStep1_SHL = 23; 21 | static inline constexpr uint32_t kStep2_SHR = 18; 22 | static inline constexpr uint32_t kStep3_SHR = 5; 23 | 24 | uint64_t _state[2]; 25 | 26 | inline explicit Random(uint64_t seed = 0) noexcept { reset(seed); } 27 | inline Random(const Random& other) noexcept = default; 28 | 29 | inline void reset(uint64_t seed = 0) noexcept { 30 | // The number is arbitrary, it means nothing. 31 | constexpr uint64_t kZeroSeed = 0x1F0A2BE71D163FA0u; 32 | 33 | // Generate the state data by using splitmix64. 34 | for (uint32_t i = 0; i < 2; i++) { 35 | seed += 0x9E3779B97F4A7C15u; 36 | uint64_t x = seed; 37 | x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9u; 38 | x = (x ^ (x >> 27)) * 0x94D049BB133111EBu; 39 | x = (x ^ (x >> 31)); 40 | _state[i] = x != 0 ? x : kZeroSeed; 41 | } 42 | } 43 | 44 | inline uint32_t next_uint32() noexcept { 45 | return uint32_t(next_uint64() >> 32); 46 | } 47 | 48 | inline uint64_t next_uint64() noexcept { 49 | uint64_t x = _state[0]; 50 | uint64_t y = _state[1]; 51 | 52 | x ^= x << kStep1_SHL; 53 | y ^= y >> kStep3_SHR; 54 | x ^= x >> kStep2_SHR; 55 | x ^= y; 56 | 57 | _state[0] = y; 58 | _state[1] = x; 59 | return x + y; 60 | } 61 | 62 | inline double next_double() noexcept { 63 | constexpr uint32_t kMantissaShift = 64 - 52; 64 | constexpr uint64_t kExpMsk = 0x3FF0000000000000u; 65 | 66 | uint64_t u = (next_uint64() >> kMantissaShift) | kExpMsk; 67 | double d = 0.0; 68 | 69 | memcpy(&d, &u, 8); 70 | return d - 1.0; 71 | } 72 | }; 73 | 74 | } // {anonymous} 75 | } // {TestUtils} 76 | 77 | #endif // TESTING_COMMONS_RANDOM_H_INCLUDED 78 | -------------------------------------------------------------------------------- /pe-packer-x64/pe-packer-x64/pe_lib/pe_checksum.cpp: -------------------------------------------------------------------------------- 1 | #include "pe_checksum.h" 2 | #include "pe_structures.h" 3 | #include "pe_base.h" 4 | 5 | namespace pe_bliss 6 | { 7 | using namespace pe_win; 8 | 9 | //Calculate checksum of image 10 | uint32_t calculate_checksum(std::istream& file) 11 | { 12 | //Save istream state 13 | std::ios_base::iostate state = file.exceptions(); 14 | std::streamoff old_offset = file.tellg(); 15 | 16 | //Checksum value 17 | unsigned long long checksum = 0; 18 | 19 | try 20 | { 21 | image_dos_header header; 22 | 23 | file.exceptions(std::ios::goodbit); 24 | 25 | //Read DOS header 26 | pe_base::read_dos_header(file, header); 27 | 28 | //Calculate PE checksum 29 | file.seekg(0); 30 | unsigned long long top = 0xFFFFFFFF; 31 | top++; 32 | 33 | //"CheckSum" field position in optional PE headers - it's always 64 for PE and PE+ 34 | static const unsigned long checksum_pos_in_optional_headers = 64; 35 | //Calculate real PE headers "CheckSum" field position 36 | //Sum is safe here 37 | unsigned long pe_checksum_pos = header.e_lfanew + sizeof(image_file_header) + sizeof(uint32_t) + checksum_pos_in_optional_headers; 38 | 39 | //Calculate checksum for each byte of file 40 | std::streamoff filesize = pe_utils::get_file_size(file); 41 | for(long long i = 0; i < filesize; i += 4) 42 | { 43 | unsigned long dw = 0; 44 | 45 | //Read DWORD from file 46 | file.read(reinterpret_cast(&dw), sizeof(unsigned long)); 47 | //Skip "CheckSum" DWORD 48 | if(i == pe_checksum_pos) 49 | continue; 50 | 51 | //Calculate checksum 52 | checksum = (checksum & 0xffffffff) + dw + (checksum >> 32); 53 | if(checksum > top) 54 | checksum = (checksum & 0xffffffff) + (checksum >> 32); 55 | } 56 | 57 | //Finish checksum 58 | checksum = (checksum & 0xffff) + (checksum >> 16); 59 | checksum = (checksum) + (checksum >> 16); 60 | checksum = checksum & 0xffff; 61 | 62 | checksum += static_cast(filesize); 63 | } 64 | catch(const std::exception&) 65 | { 66 | //If something went wrong, restore istream state 67 | file.exceptions(state); 68 | file.seekg(old_offset); 69 | file.clear(); 70 | //Rethrow 71 | throw; 72 | } 73 | 74 | //Restore istream state 75 | file.exceptions(state); 76 | file.seekg(old_offset); 77 | file.clear(); 78 | 79 | //Return checksum 80 | return static_cast(checksum); 81 | } 82 | } 83 | --------------------------------------------------------------------------------