Initial commit

This commit is contained in:
Fischsalat
2023-08-30 19:10:28 +02:00
commit 3170e232cf
7 changed files with 1096 additions and 0 deletions
+350
View File
@@ -0,0 +1,350 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
@@ -0,0 +1,195 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{67ca0520-676a-436b-a249-67334661dee8}</ProjectGuid>
<RootNamespace>IDAUnrealEngienexecimporter</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>IDAExecFunctions64</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;$(IncludePath)</IncludePath>
<OutDir>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\plugins</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;$(IncludePath)</IncludePath>
<OutDir>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\plugins</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;$(IncludePath)</IncludePath>
<OutDir>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\plugins</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;$(IncludePath)</IncludePath>
<OutDir>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\plugins</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64\ida.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1"
ida64.exe</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64\ida.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1"
ida64.exe</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64\ida.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1"
ida64.exe</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1\idasdk77\lib\x64_win_vc_64\ida.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd "C:\Program Files\IDA.Pro.7.7.SP1.Windows.Portable.Decompilers.-.x86.x64.ARM64\IDA Pro 7.7 SP1"
ida64.exe</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Main.cpp" />
</ItemGroup>
<ItemGroup>
<Text Include="Hell.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="ida_file.h" />
<ClInclude Include="ida_string.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="Hell.txt">
<Filter>Header Files</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<ClInclude Include="ida_file.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ida_string.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
+84
View File
@@ -0,0 +1,84 @@
#include <Windows.h>
#include <ida.hpp>
#include <idp.hpp>
#include <loader.hpp>
#include <bytes.hpp>
#include <fpro.h>
#include <name.hpp>
#include <diskio.hpp>
#include <kernwin.hpp>
#include "ida_file.h"
#include "ida_string.h"
size_t get_real_imagebase()
{
return getinf(INF_IMAGEBASE);
}
struct plugin_ctx_t : public plugmod_t
{
virtual bool idaapi run(size_t) override
{
msg("Hello, world! (cpp)\n");
msg("Imagebase: 0x%X\n", get_imagebase());
msg("Addr: 0x%X\n", get_real_imagebase() + 0x1444);
set_name((get_real_imagebase() + 0x1444), "IDK::Hell2");
ida_string result = ask_file(false, "*.idmap", "Load the file, or %s", "die!");
const char* reselult = result.c_str();
msg("Selected result.c_str(): %s\n", result.c_str());
ida_file selected_file(result, ida_file::open_mode::binary_read_only);
auto image_base = get_real_imagebase();
msg("Imagebase: 0x%llX\n", image_base);
msg("Imagebase: 0x%llX\n", get_real_imagebase());
hook_type_t processor_hook = HT_IDP;
if (selected_file.is_open())
{
while (selected_file.can_read_more())
{
uint32 offset = selected_file.read<uint32>();
uint16 name_len = selected_file.read<uint16>();
ida_string name_string = selected_file.read_string(name_len);
set_name(image_base + offset, name_string.c_str());
//msg("offset: 0x%X\n", offset);
//msg("name_len: 0x%X\n", name_len);
//msg("name_string: %s\n", name_string.c_str());
}
}
return true;
}
};
//--------------------------------------------------------------------------
static plugmod_t* idaapi init()
{
return new plugin_ctx_t;
}
//--------------------------------------------------------------------------
plugin_t PLUGIN =
{
IDP_INTERFACE_VERSION,
PLUGIN_UNL // Unload the plugin immediately after calling 'run'
| PLUGIN_MULTI, // The plugin can work with multiple idbs in parallel
init, // initialize
nullptr,
nullptr,
nullptr, // long comment about the plugin
nullptr, // multiline help about the plugin
"HellWorld", // the preferred short name of the plugin
"Ctrl-Alt-A", // the preferred hotkey to run the plugin
};
+134
View File
@@ -0,0 +1,134 @@
#pragma once
#include <fpro.h>
#include <diskio.hpp>
#include "ida_string.h"
class ida_file
{
public:
enum class open_mode
{
none,
read_only,
binary_read_only,
read_write,
binary_read_write,
};
private:
FILE* file;
open_mode mode;
int pos;
int size;
public:
ida_file()
: file(nullptr)
, mode(open_mode::none)
, pos(0)
, size(0)
{
}
ida_file(const char* file_path, open_mode new_mode = open_mode::read_only)
: file(nullptr)
, mode(new_mode)
, pos(0)
, size(0)
{
if (open_file(file_path, new_mode))
{
qfseek(file, 0, SEEK_END);
size = qftell(file);
qfseek(file, 0, SEEK_SET);
msg("POS: %d", qftell(file));
}
}
~ida_file()
{
close_file();
}
public:
bool is_open()
{
return file && mode != open_mode::none;
}
bool can_write()
{
return is_open() && (mode >= open_mode::read_write);
}
bool open_file(const char* file_name, open_mode new_mode = open_mode::read_only)
{
if (is_open())
close_file();
mode = new_mode;
switch (mode)
{
case open_mode::read_only:
file = fopenRT(file_name);
break;
case open_mode::binary_read_only:
file = fopenRB(file_name);
break;
case open_mode::read_write:
file = fopenWT(file_name);
break;
case open_mode::binary_read_write:
file = fopenWB(file_name);
break;
default:
break;
}
return file != nullptr;
}
void close_file()
{
qfclose(file);
file = nullptr;
mode = open_mode::none;
pos = 0;
}
public:
template<typename T>
void read(T& out_value)
{
pos += sizeof(T);
qfread(file, &out_value, sizeof(T));
}
template<typename T>
T read()
{
T ret_value;
pos += sizeof(T);
qfread(file, &ret_value, sizeof(T));
return ret_value;
}
ida_string read_string(int length)
{
ida_string ret;
pos += length;
qfread(file, ret.buffer(length), length);
return ret;
}
bool can_read_more()
{
return pos < size;
}
};
+267
View File
@@ -0,0 +1,267 @@
#pragma once
#include <ida.hpp>
#include <pro.h>
template<typename char_type>
class ida_string_base
{
private:
static constexpr int char_size = sizeof(char_type);
static constexpr uintptr_t use_allocated_buffer_mask = 0x8000000000000000;
private:
union
{
struct
{
char_type* buffer_start;
char_type* buffer_end;
};
unsigned char inline_buffer[0xF];
unsigned char inline_length_inverse : 4;
unsigned char reserved : 3;
unsigned char use_allocated_buffer : 1;
};
public:
ida_string_base()
: buffer_start(nullptr)
, buffer_end(nullptr)
{
mark_as_allocated();
}
ida_string_base(const char_type* str, bool take_ownership = false)
: buffer_start(nullptr)
, buffer_end(nullptr)
{
//int length = ida_string_base::strlen(str);
int length = qstrlen(str);
if (take_ownership)
{
takeover_outline_string(str, length);
return;
}
if (is_length_suitable_for_inline(length))
{
place_string_inline(str, length);
return;
}
allocate_outline_string(str, length);
}
ida_string_base(ida_string_base&& other)
: buffer_start(other.buffer_start)
, buffer_end(other.buffer_end)
{
other.buffer_start = nullptr;
other.buffer_end = nullptr;
}
ida_string_base(const ida_string_base& other)
: buffer_start(nullptr)
, buffer_end(nullptr)
{
if (other.is_inline_string())
{
memcpy(*this, &other, sizeof(ida_string_base));
return;
}
allocate_outline_string(other, other.length());
}
~ida_string_base()
{
cleanup_self();
}
public:
ida_string_base& operator=(const char* string)
{
cleanup_self();
int length = qstrlen(string);
if (is_length_suitable_for_inline(length))
{
place_string_inline(string, length);
return *this;
}
allocate_outline_string(string, length);
return *this;
}
ida_string_base& operator=(ida_string_base&& other)
{
cleanup_self();
memcpy(this, &other, sizeof(ida_string_base));
memset(&other, 0, sizeof(ida_string_base));
return *this;
}
ida_string_base& operator=(const ida_string_base& other)
{
cleanup_self();
if (other.is_inline_string())
{
memcpy(*this, &other, sizeof(ida_string_base));
return;
}
return *this;
}
private:
void place_string_inline(const char_type* string, int len)
{
memset(this, 0, sizeof(ida_string_base));
inline_length_inverse = 0x10 - len;
use_allocated_buffer = false;
memcpy(inline_buffer, string, len * char_size);
}
void fit_outline_buffer(int len)
{
int length_with_null_terminator = len + 1;
buffer_start = reinterpret_cast<char_type*>((is_empty() || is_inline_string()) ? qalloc(length_with_null_terminator) : qrealloc(buffer_start, length_with_null_terminator));
buffer_end = buffer_start + length_with_null_terminator;
buffer_start[len] = 0;
mark_as_allocated();
}
void allocate_outline_string(const char_type* string, int len)
{
fit_outline_buffer(len);
memcpy(buffer_start, string, len * char_size);
}
void takeover_outline_string(const char_type* string, int len)
{
int length_with_null_terminator = len + 1;
buffer_start = const_cast<char_type*>(string);
buffer_end = const_cast<char_type*>(string + length_with_null_terminator);
mark_as_allocated();
}
void cleanup_self()
{
if (is_inline_string())
return;
qfree(buffer_start);
memset(this, 0, sizeof(ida_string_base));
}
private:
static int strlen(const char_type* str)
{
int len = 0;
while (str[len] != 0)
len++;
return len;
}
private:
void mark_as_allocated()
{
buffer_end = reinterpret_cast<char_type*>(reinterpret_cast<uintptr_t>(buffer_end) | use_allocated_buffer_mask);
}
bool is_length_suitable_for_inline(int len) const
{
return (len * char_size) < 0x10;
}
bool is_inline_string() const
{
return !(reinterpret_cast<uintptr_t>(buffer_end) & use_allocated_buffer_mask);
}
int get_inline_length_bytes() const
{
return 0x10 - inline_length_inverse;
}
inline const char_type* get_buffer_start() const
{
return buffer_start;
}
inline const char_type* get_buffer_end() const
{
return reinterpret_cast<char_type*>(reinterpret_cast<uintptr_t>(buffer_end) & ~use_allocated_buffer_mask);
}
int length_bytes() const
{
if (is_inline_string())
return get_inline_length_bytes();
return reinterpret_cast<uintptr_t>(get_buffer_start()) - reinterpret_cast<uintptr_t>(get_buffer_end());
}
public:
inline bool operator==(const ida_string_base& other) const
{
return length() == other.length() && (qstrcmp(c_str(), other.c_str()) == 0);
}
inline bool operator!=(const ida_string_base& other) const
{
return length() != other.length() || (qstrcmp(c_str(), other.c_str()) != 0);
}
operator const char_type* () const
{
return c_str();
}
public:
int length() const
{
if (length_bytes() <= 0)
return 0;
return length_bytes() - 1;
}
bool is_empty() const
{
return length() == 0;
}
const char_type* c_str() const
{
if (is_inline_string())
return reinterpret_cast<const char_type*>(inline_buffer);
return buffer_start;
}
char* buffer(int required_buffer_size)
{
if (length() < required_buffer_size)
fit_outline_buffer(required_buffer_size);
return const_cast<char_type*>(c_str());
}
};
using ida_string = ida_string_base<char>;
using ida_wstring = ida_string_base<wchar_t>;
+31
View File
@@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.33328.57
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IDA UnrealEngien exec importer", "IDA UnrealEngien exec importer\IDA UnrealEngien exec importer.vcxproj", "{67CA0520-676A-436B-A249-67334661DEE8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{67CA0520-676A-436B-A249-67334661DEE8}.Debug|x64.ActiveCfg = Debug|x64
{67CA0520-676A-436B-A249-67334661DEE8}.Debug|x64.Build.0 = Debug|x64
{67CA0520-676A-436B-A249-67334661DEE8}.Debug|x86.ActiveCfg = Debug|Win32
{67CA0520-676A-436B-A249-67334661DEE8}.Debug|x86.Build.0 = Debug|Win32
{67CA0520-676A-436B-A249-67334661DEE8}.Release|x64.ActiveCfg = Release|x64
{67CA0520-676A-436B-A249-67334661DEE8}.Release|x64.Build.0 = Release|x64
{67CA0520-676A-436B-A249-67334661DEE8}.Release|x86.ActiveCfg = Release|Win32
{67CA0520-676A-436B-A249-67334661DEE8}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B29EF4C7-601F-4439-937B-EEC49B92F955}
EndGlobalSection
EndGlobal