-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5b82d8a
Showing
15 changed files
with
888 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
################# | ||
## Eclipse | ||
################# | ||
|
||
*.pydevproject | ||
.project | ||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.classpath | ||
.settings/ | ||
.loadpath | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
|
||
################# | ||
## Visual Studio | ||
################# | ||
|
||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
|
||
# Build results | ||
|
||
[Dd]ebug/ | ||
[Rr]elease/ | ||
x64/ | ||
build/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
[Bb]uild[Ll]og.* | ||
|
||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.tmp_proj | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
*.pidb | ||
*.log | ||
*.scc | ||
|
||
# Visual C++ cache files | ||
ipch/ | ||
*.aps | ||
*.ncb | ||
*.opensdf | ||
*.sdf | ||
*.cachefile | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# Guidance Automation Toolkit | ||
*.gpState | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper*/ | ||
*.[Rr]e[Ss]harper | ||
|
||
# TeamCity is a build add-in | ||
_TeamCity* | ||
|
||
# DotCover is a Code Coverage Tool | ||
*.dotCover | ||
|
||
# NCrunch | ||
*.ncrunch* | ||
.*crunch*.local.xml | ||
|
||
# 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 | ||
*.Publish.xml | ||
*.pubxml | ||
|
||
# NuGet Packages Directory | ||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line | ||
#packages/ | ||
|
||
# Windows Azure Build Output | ||
csx | ||
*.build.csdef | ||
|
||
# Windows Store app package directory | ||
AppPackages/ | ||
|
||
# Others | ||
sql/ | ||
*.Cache | ||
ClientBin/ | ||
[Ss]tyle[Cc]op.* | ||
~$* | ||
*~ | ||
*.dbmdl | ||
*.[Pp]ublish.xml | ||
*.pfx | ||
*.publishsettings | ||
|
||
# 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 | ||
|
||
# SQL Server files | ||
App_Data/*.mdf | ||
App_Data/*.ldf | ||
|
||
############# | ||
## Windows detritus | ||
############# | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Mac crap | ||
.DS_Store | ||
|
||
|
||
############# | ||
## Python | ||
############# | ||
|
||
*.py[co] | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist/ | ||
build/ | ||
eggs/ | ||
parts/ | ||
var/ | ||
sdist/ | ||
develop-eggs/ | ||
.installed.cfg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
|
||
#Translations | ||
*.mo | ||
|
||
#Mr Developer | ||
.mr.developer.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdll2", "rdll2\rdll2.vcxproj", "{4AEFDB18-0A9A-4764-8776-C1344D220581}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Win32 = Debug|Win32 | ||
Release|Win32 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{4AEFDB18-0A9A-4764-8776-C1344D220581}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{4AEFDB18-0A9A-4764-8776-C1344D220581}.Debug|Win32.Build.0 = Debug|Win32 | ||
{4AEFDB18-0A9A-4764-8776-C1344D220581}.Release|Win32.ActiveCfg = Debug|Win32 | ||
{4AEFDB18-0A9A-4764-8776-C1344D220581}.Release|Win32.Build.0 = Debug|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
======================================================================== | ||
DYNAMIC LINK LIBRARY : rdll2 Project Overview | ||
======================================================================== | ||
|
||
AppWizard has created this rdll2 DLL for you. | ||
|
||
This file contains a summary of what you will find in each of the files that | ||
make up your rdll2 application. | ||
|
||
|
||
rdll2.vcxproj | ||
This is the main project file for VC++ projects generated using an Application Wizard. | ||
It contains information about the version of Visual C++ that generated the file, and | ||
information about the platforms, configurations, and project features selected with the | ||
Application Wizard. | ||
|
||
rdll2.vcxproj.filters | ||
This is the filters file for VC++ projects generated using an Application Wizard. | ||
It contains information about the association between the files in your project | ||
and the filters. This association is used in the IDE to show grouping of files with | ||
similar extensions under a specific node (for e.g. ".cpp" files are associated with the | ||
"Source Files" filter). | ||
|
||
rdll2.cpp | ||
This is the main DLL source file. | ||
|
||
When created, this DLL does not export any symbols. As a result, it | ||
will not produce a .lib file when it is built. If you wish this project | ||
to be a project dependency of some other project, you will either need to | ||
add code to export some symbols from the DLL so that an export library | ||
will be produced, or you can set the Ignore Input Library property to Yes | ||
on the General propert page of the Linker folder in the project's Property | ||
Pages dialog box. | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
Other standard files: | ||
|
||
StdAfx.h, StdAfx.cpp | ||
These files are used to build a precompiled header (PCH) file | ||
named rdll2.pch and a precompiled types file named StdAfx.obj. | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
Other notes: | ||
|
||
AppWizard uses "TODO:" comments to indicate parts of the source code you | ||
should add to or customize. | ||
|
||
///////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <WTypes.h> | ||
|
||
// Client build: Mon, 09 Apr 2012 19:14:49 GMT | ||
#define CLIENT_TIMESTAMP 1333998889 | ||
|
||
// Client offsets | ||
void* G_WEATHER = (void*)0x00971BA0; | ||
void** G_CRENDERER = (void**)0x008F3DD8; | ||
void* G_USEEFFECT = (void*)0x009A0EEC; | ||
|
||
DWORD CWeather_EffectId2LaunchFuncAddr[] = { | ||
NULL, // CEFFECT_NONE | ||
0x006C6980, // CEFFECT_SKY -> void CWeather::LaunchCloud(CWeather this<ecx>, char param) | ||
0x006C6660, // CEFFECT_SNOW -> void CWeather::LaunchSnow(CWeather this<ecx>) | ||
0x006C68C0, // CEFFECT_MAPLE -> void CWeather::LaunchMaple(CWeather this<ecx>) | ||
0x006C6840, // CEFFECT_SAKURA -> void CWeather::LaunchSakura(CWeather this<ecx>) | ||
0x006C6B30, // CEFFECT_POKJUK -> void CWeather::LaunchPokJuk(CWeather this<ecx>) | ||
0x006C6BE0, // CEFFECT_NIGHT -> void CWeather::LaunchNight(CWeather this<ecx>) | ||
}; | ||
|
||
void* CGameMode_Initialize_EntryPtr = (void*)0x0072AB61; | ||
void* CGameMode_Initialize_RetPtr = (void*)0x0072B448; | ||
void* CGameMode_OnInit_EntryPtr = (void*)0x007337ED; | ||
void* CGameMode_OnInit_RetPtr = (void*)0x00734008; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// dllmain.cpp : Defines the entry point for the DLL application. | ||
#include "stdafx.h" | ||
#include <string> | ||
#include <stdlib.h> | ||
|
||
#include "hooks.h" | ||
|
||
BOOL CALLBACK DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) | ||
{ | ||
|
||
if(dwReason != DLL_PROCESS_ATTACH) | ||
return TRUE; | ||
|
||
HANDLE process = GetCurrentProcess(); | ||
FARPROC addr; | ||
|
||
IMAGE_DOS_HEADER* IDH; | ||
IMAGE_NT_HEADERS * INT; | ||
|
||
BOOL ret = FALSE; | ||
|
||
/* Verify NT_HEADER time stamp match */ | ||
|
||
IDH = (IMAGE_DOS_HEADER*)GetModuleHandle(NULL); | ||
INT = (IMAGE_NT_HEADERS *)((int *)IDH + (int)(IDH->e_lfanew/4)); | ||
|
||
if(INT->FileHeader.TimeDateStamp != CLIENT_TIMESTAMP) { | ||
return TRUE; | ||
} | ||
|
||
/* Parse config file */ | ||
|
||
G_CONFDATA = parseConfFile(); | ||
|
||
if(G_CONFDATA == NULL) | ||
return TRUE; | ||
|
||
/* Install hooks */ | ||
|
||
for(UINT i = 0; i * sizeof(HOOK_TABLE_ENTRY) < sizeof(HOOK_MAP); i++ ) { | ||
|
||
addr = GetProcAddress(GetModuleHandle(TEXT("rdll2.asi")), HOOK_MAP[i].ext_name); | ||
|
||
if(addr == NULL) { | ||
MessageBoxA(NULL, "Failed to get proc address. Aborting.", "CWeatherPlugin", MB_OK); | ||
break; | ||
} | ||
|
||
ret = HOOK_ADDR(process, HOOK_MAP[i].entry_addr, addr); | ||
|
||
if(!ret) { | ||
MessageBoxA(NULL, "Couldn't apply memory patch. Plugin will not work and client may crash.", "CWeatherPlugin", MB_OK); | ||
break; | ||
} | ||
|
||
} | ||
|
||
return TRUE; | ||
} |
Oops, something went wrong.