Skip to content

Commit 0471364

Browse files
authored
Add files via upload
1 parent ffb199e commit 0471364

7 files changed

Lines changed: 541 additions & 0 deletions

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# csgo-interface-dumper
2+
3+
just a normal interface dumper, should work for any source engine game never tested it tho, this was mainly made for csgo.
4+
5+
1. download the project and compile it yourself, or grab a version from the [release](https://github.com/Aviarita/csgo-interface-dumper/releases) section.
6+
2. inject the dll into your favority source engine game, for example csgo
7+
3. open dumped_interfaces.txt that has been created in your games main directory

csgo interface dumper.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.168
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csgo interface dumper", "csgo interface dumper\csgo interface dumper.vcxproj", "{0A93DBA7-6379-4354-A169-280D3C4906B0}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x86 = Debug|x86
11+
Release|x86 = Release|x86
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{0A93DBA7-6379-4354-A169-280D3C4906B0}.Debug|x86.ActiveCfg = Debug|Win32
15+
{0A93DBA7-6379-4354-A169-280D3C4906B0}.Debug|x86.Build.0 = Debug|Win32
16+
{0A93DBA7-6379-4354-A169-280D3C4906B0}.Release|x86.ActiveCfg = Release|Win32
17+
{0A93DBA7-6379-4354-A169-280D3C4906B0}.Release|x86.Build.0 = Release|Win32
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {A4EEF346-9CCB-4FFD-97E6-A6BEB866C964}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<VCProjectVersion>15.0</VCProjectVersion>
15+
<ProjectGuid>{0A93DBA7-6379-4354-A169-280D3C4906B0}</ProjectGuid>
16+
<Keyword>Win32Proj</Keyword>
17+
<RootNamespace>csgointerfacedumper</RootNamespace>
18+
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
19+
</PropertyGroup>
20+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
21+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
22+
<ConfigurationType>DynamicLibrary</ConfigurationType>
23+
<UseDebugLibraries>true</UseDebugLibraries>
24+
<PlatformToolset>v141</PlatformToolset>
25+
<CharacterSet>MultiByte</CharacterSet>
26+
</PropertyGroup>
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
28+
<ConfigurationType>DynamicLibrary</ConfigurationType>
29+
<UseDebugLibraries>false</UseDebugLibraries>
30+
<PlatformToolset>v141</PlatformToolset>
31+
<WholeProgramOptimization>true</WholeProgramOptimization>
32+
<CharacterSet>MultiByte</CharacterSet>
33+
</PropertyGroup>
34+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
35+
<ImportGroup Label="ExtensionSettings">
36+
</ImportGroup>
37+
<ImportGroup Label="Shared">
38+
</ImportGroup>
39+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
40+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
41+
</ImportGroup>
42+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
43+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
44+
</ImportGroup>
45+
<PropertyGroup Label="UserMacros" />
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
47+
<LinkIncremental>true</LinkIncremental>
48+
<TargetExt>.debug.dll</TargetExt>
49+
</PropertyGroup>
50+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
51+
<LinkIncremental>false</LinkIncremental>
52+
</PropertyGroup>
53+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
54+
<ClCompile>
55+
<PrecompiledHeader>
56+
</PrecompiledHeader>
57+
<WarningLevel>Level3</WarningLevel>
58+
<Optimization>Disabled</Optimization>
59+
<SDLCheck>true</SDLCheck>
60+
<PreprocessorDefinitions>WIN32;_DEBUG;CSGOINTERFACEDUMPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
61+
<ConformanceMode>true</ConformanceMode>
62+
<PrecompiledHeaderFile />
63+
</ClCompile>
64+
<Link>
65+
<SubSystem>Windows</SubSystem>
66+
<GenerateDebugInformation>true</GenerateDebugInformation>
67+
</Link>
68+
</ItemDefinitionGroup>
69+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
70+
<ClCompile>
71+
<PrecompiledHeader>
72+
</PrecompiledHeader>
73+
<WarningLevel>Level3</WarningLevel>
74+
<Optimization>MaxSpeed</Optimization>
75+
<FunctionLevelLinking>true</FunctionLevelLinking>
76+
<IntrinsicFunctions>true</IntrinsicFunctions>
77+
<SDLCheck>true</SDLCheck>
78+
<PreprocessorDefinitions>WIN32;NDEBUG;CSGOINTERFACEDUMPER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79+
<ConformanceMode>true</ConformanceMode>
80+
<PrecompiledHeaderFile />
81+
</ClCompile>
82+
<Link>
83+
<SubSystem>Windows</SubSystem>
84+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
85+
<OptimizeReferences>true</OptimizeReferences>
86+
<GenerateDebugInformation>true</GenerateDebugInformation>
87+
</Link>
88+
</ItemDefinitionGroup>
89+
<ItemGroup>
90+
<ClCompile Include="dllmain.cpp" />
91+
</ItemGroup>
92+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
93+
<ImportGroup Label="ExtensionTargets">
94+
</ImportGroup>
95+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="dllmain.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

csgo interface dumper/dllmain.cpp

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// dllmain.cpp : Defines the entry point for the DLL application.
2+
#include <Windows.h>
3+
#include <fstream>
4+
#include <string>
5+
#include <tchar.h>
6+
#include <psapi.h>
7+
8+
std::ofstream file;
9+
10+
void log_stuff(const char * msg, ...)
11+
{
12+
char buf[1024];
13+
va_list va;
14+
va_start(va, msg);
15+
_vsnprintf_s(buf, 1024, msg, va);
16+
va_end(va);
17+
file << buf;
18+
}
19+
20+
class interface_reg
21+
{
22+
public:
23+
BYTE createfn[4];
24+
const char *name;
25+
interface_reg *next;
26+
};
27+
28+
void dump_interfaces(const char* interfaces) {
29+
void* createinterface = GetProcAddress(GetModuleHandleA(interfaces), "CreateInterface");
30+
if (createinterface) {
31+
32+
auto var01 = ((uintptr_t)createinterface + 0x8);
33+
if (!var01) return;
34+
35+
auto var02 = *(unsigned short*)((uintptr_t)createinterface + 0x5);
36+
if (!var02) return;
37+
38+
auto var03 = *(unsigned short*)((uintptr_t)createinterface + 0x7);
39+
if (!var03) return;
40+
41+
auto var04 = (uintptr_t)(var01 + (var02 - var03));
42+
if (!var04) return;
43+
44+
interface_reg* interface_registry = **(interface_reg***)(var04 + 0x6);
45+
if (!interface_registry) return;
46+
47+
log_stuff("%s:\n", interfaces);
48+
for (interface_reg* pCur = interface_registry; pCur; pCur = pCur->next) {
49+
log_stuff("\t- %s\n", pCur->name);
50+
}
51+
log_stuff("\n");
52+
}
53+
}
54+
55+
int get_and_dump_modules()
56+
{
57+
HMODULE hMods[1024];
58+
HANDLE hProcess = GetCurrentProcess();
59+
DWORD cbNeeded;
60+
if (EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded)) {
61+
for (int i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) {
62+
TCHAR szModName[MAX_PATH]; // whole path + dll
63+
if (GetModuleFileNameEx(hProcess, hMods[i], szModName, sizeof(szModName) / sizeof(TCHAR))) {
64+
TCHAR szBaseName[MAX_PATH]; // just the dll
65+
if (GetModuleBaseNameA(hProcess, hMods[i], szBaseName, sizeof(szBaseName) / sizeof(TCHAR))) {
66+
file.open("dumped_interfaces.txt", std::ios::app);
67+
dump_interfaces(szModName); // change this to szBaseName if you only want the dll name instead of the whole path
68+
file.close();
69+
}
70+
}
71+
}
72+
}
73+
CloseHandle(hProcess);
74+
return 0;
75+
}
76+
77+
static unsigned long __stdcall do_stuff(void *arg) {
78+
remove("dumped_interfaces.txt");
79+
get_and_dump_modules();
80+
return true;
81+
}
82+
83+
static unsigned long __stdcall stop_doing_stuff(void *arg) {
84+
Sleep(500);
85+
Beep(500, 350);
86+
FreeLibraryAndExitThread((HMODULE)arg, 0);
87+
}
88+
89+
int __stdcall DllMain(HMODULE self, unsigned long reason_for_call, void *reserved) {
90+
HANDLE cheat_thread, free_thread;
91+
if (reason_for_call == DLL_PROCESS_ATTACH) {
92+
cheat_thread = CreateThread(nullptr, 0, &do_stuff, nullptr, 0, nullptr);
93+
if (!cheat_thread) return 0;
94+
free_thread = CreateThread(nullptr, 0, &stop_doing_stuff, self, 0, nullptr);
95+
if (!free_thread) return 0;
96+
CloseHandle(cheat_thread);
97+
return true;
98+
}
99+
return false;
100+
}

0 commit comments

Comments
 (0)