Skip to content

Commit b008f7f

Browse files
author
dude719
committed
Update
1 parent ec6f825 commit b008f7f

9 files changed

+423
-378
lines changed

ReClass 2015/ChildView.cpp

+224-224
Large diffs are not rendered by default.

ReClass 2015/Classes.h

+114-117
Large diffs are not rendered by default.

ReClass 2015/MainFrm.cpp

+20-14
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWndEx)
3939
ON_COMMAND(ID_BUTTON_TYPEDEF, &CMainFrame::OnButtonTypedef)
4040
ON_COMMAND(ID_CHECK_CBTEXT, &CMainFrame::OnCheckCbtext)
4141
ON_UPDATE_COMMAND_UI(ID_CHECK_CBTEXT, &CMainFrame::OnUpdateCheckCbtext)
42+
ON_COMMAND(ID_CHECK_CBRTTI, &CMainFrame::OnCheckCbrtti)
43+
ON_UPDATE_COMMAND_UI(ID_CHECK_CBRTTI, &CMainFrame::OnUpdateCheckCbrtti)
4244
//ON_COMMAND(ID_BUTTON_SELECT, &CMainFrame::OnButtonSelect)
4345
ON_COMMAND(ID_BUTTON_SELECTPROCESS, &CMainFrame::OnButtonSelectprocess)
4446
ON_COMMAND(ID_BUTTON_EDITCLASS, &CMainFrame::OnButtonEditclass)
@@ -48,10 +50,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWndEx)
4850
ON_WM_TIMER()
4951
ON_COMMAND(ID_CHECK_TOPMOST, &CMainFrame::OnCheckTopmost)
5052
ON_UPDATE_COMMAND_UI(ID_CHECK_TOPMOST, &CMainFrame::OnUpdateCheckTopmost)
51-
5253
ON_COMMAND(ID_CHECK_FILTERPROCESSES, &CMainFrame::OnCheckFilterProcesses)
5354
ON_UPDATE_COMMAND_UI(ID_CHECK_FILTERPROCESSES, &CMainFrame::OnUpdateCheckFilterProcesses)
54-
5555
ON_COMMAND(ID_CHECK_CLASSBROWSER, &CMainFrame::OnCheckClassBrowser)
5656
ON_UPDATE_COMMAND_UI(ID_CHECK_CLASSBROWSER, &CMainFrame::OnUpdateCheckClassBrowser)
5757
ON_COMMAND(ID_BUTTON_LEFT, &CMainFrame::OnButtonLeft)
@@ -418,6 +418,21 @@ void CMainFrame::OnUpdateCheckCbtext(CCmdUI *pCmdUI)
418418
pCmdUI->SetCheck(gbText);
419419
}
420420

421+
void CMainFrame::OnCheckCbrtti()
422+
{
423+
gbRTTI = !gbRTTI;
424+
}
425+
void CMainFrame::OnUpdateCheckCbrtti(CCmdUI *pCmdUI)
426+
{
427+
if (!gbPointers)
428+
pCmdUI->Enable(FALSE);
429+
else
430+
{
431+
pCmdUI->Enable(TRUE);
432+
pCmdUI->SetCheck(gbRTTI);
433+
}
434+
}
435+
421436
#include "DialogTypes.h"
422437
void CMainFrame::OnButtonTypedef()
423438
{
@@ -514,24 +529,15 @@ void CMainFrame::OnButtonSelectprocess()
514529
}
515530
}
516531

517-
// process ID 4 is the Kernel
518-
//if (infoP->ProcessId == 4)
519-
//{
520-
// hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, infoP->ProcessId);
521-
// printf("pid %i: %d\n", infoP->ProcessId, hProcess);
522-
//}
523-
//else
524-
//{
525-
// hProcess = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, FALSE, (DWORD)infoP->UniqueProcessId);
526-
//}
527532
hProcess = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, FALSE, (DWORD)infoP->UniqueProcessId);
528533
if (hProcess)
529534
{
530535
#ifdef _WIN64
531-
if (Utils::GetProcessPlatform(hProcess) == Utils::ProcessPlatformX64) {
536+
if (Utils::GetProcessPlatform(hProcess) == Utils::ProcessPlatformX64)
532537
#else
533-
if (Utils::GetProcessPlatform(hProcess) == Utils::ProcessPlatformX86) {
538+
if (Utils::GetProcessPlatform(hProcess) == Utils::ProcessPlatformX86)
534539
#endif
540+
{
535541
TCHAR filename[1024];
536542
GetModuleFileNameEx(hProcess, NULL, filename, 1024);
537543

ReClass 2015/MainFrm.h

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class CMainFrame : public CMDIFrameWndEx
8787
afx_msg void OnButtonTypedef();
8888
afx_msg void OnCheckCbtext();
8989
afx_msg void OnUpdateCheckCbtext(CCmdUI *pCmdUI);
90+
afx_msg void OnCheckCbrtti();
91+
afx_msg void OnUpdateCheckCbrtti(CCmdUI *pCmdUI);
9092
//afx_msg void OnButtonSelect();
9193
afx_msg void OnButtonSelectprocess();
9294
void ClearProcMenuItems();

ReClass 2015/ReClass 2015.vcxproj

+8-11
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,22 @@
9595
</PropertyGroup>
9696
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
9797
<LinkIncremental>false</LinkIncremental>
98-
<EmbedManifest>false</EmbedManifest>
98+
<EmbedManifest>true</EmbedManifest>
9999
<OutDir>..\BIN\</OutDir>
100100
<TargetName>$(ProjectName)_64</TargetName>
101101
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
102102
<CodeAnalysisRules />
103103
<CodeAnalysisRuleAssemblies />
104-
<GenerateManifest>false</GenerateManifest>
104+
<GenerateManifest>true</GenerateManifest>
105105
</PropertyGroup>
106106
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
107107
<LinkIncremental>false</LinkIncremental>
108-
<EmbedManifest>false</EmbedManifest>
109-
<GenerateManifest>false</GenerateManifest>
108+
<EmbedManifest>true</EmbedManifest>
109+
<GenerateManifest>true</GenerateManifest>
110110
<OutDir>..\BIN\</OutDir>
111111
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
112112
<CodeAnalysisRules />
113113
<CodeAnalysisRuleAssemblies />
114-
<IncludePath>C:\Users\Aidan\Desktop\re\reclass\Reclass64-master\beaengine\beaengineSources\Includes;$(IncludePath)</IncludePath>
115114
<TargetName>$(ProjectName)_64_dbg</TargetName>
116115
</PropertyGroup>
117116
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -130,7 +129,7 @@
130129
<Link>
131130
<EnableCOMDATFolding>true</EnableCOMDATFolding>
132131
<OptimizeReferences>true</OptimizeReferences>
133-
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
132+
<UACExecutionLevel>HighestAvailable</UACExecutionLevel>
134133
<IgnoreSpecificDefaultLibraries>
135134
</IgnoreSpecificDefaultLibraries>
136135
<AdditionalOptions>/ignore:4006 %(AdditionalOptions)</AdditionalOptions>
@@ -206,7 +205,7 @@
206205
<EnableCOMDATFolding>true</EnableCOMDATFolding>
207206
<OptimizeReferences>true</OptimizeReferences>
208207
<AdditionalDependencies>BeaEngine_s_stdcall_64.lib;SciLexer_64.lib;tinyxml_64.lib;SQLite_Static_Library_64.lib;Psapi.lib;comctl32.lib</AdditionalDependencies>
209-
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
208+
<UACExecutionLevel>HighestAvailable</UACExecutionLevel>
210209
<RandomizedBaseAddress>false</RandomizedBaseAddress>
211210
<IgnoreSpecificDefaultLibraries>crt64.lib</IgnoreSpecificDefaultLibraries>
212211
<AdditionalOptions>Psapi.lib /FORCE %(AdditionalOptions)</AdditionalOptions>
@@ -227,14 +226,12 @@
227226
<ClCompile>
228227
<WarningLevel>Level3</WarningLevel>
229228
<PrecompiledHeader>Use</PrecompiledHeader>
230-
<Optimization>MaxSpeed</Optimization>
229+
<Optimization>Disabled</Optimization>
231230
<FunctionLevelLinking>false</FunctionLevelLinking>
232231
<IntrinsicFunctions>true</IntrinsicFunctions>
233232
<PreprocessorDefinitions>_AMD64_;_M_AMD64;_X86AMD64_;_WIN64;_M_X64;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
234-
<RuntimeTypeInfo>false</RuntimeTypeInfo>
235-
<OpenMPSupport>false</OpenMPSupport>
233+
<RuntimeTypeInfo>true</RuntimeTypeInfo>
236234
<StringPooling>true</StringPooling>
237-
<CreateHotpatchableImage>false</CreateHotpatchableImage>
238235
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
239236
</ClCompile>
240237
<Link>

ReClass 2015/res/ribbon.mfcribbon-ms

+1-1
Large diffs are not rendered by default.

ReClass 2015/resource.h

188 Bytes
Binary file not shown.

ReClass 2015/stdafx.cpp

+51-11
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ int FontHeight;
4242
bool gbAddress = true;
4343
bool gbOffset = true;
4444
bool gbText = true;
45+
bool gbRTTI = true;
46+
4547
bool gbFloat = true;
4648
bool gbInt = true;
4749
bool gbString = true;
@@ -210,10 +212,6 @@ size_t GetBase()
210212
{
211213
if (MemMap.size() > 1)
212214
return ProcessBaseAddress;
213-
//for (UINT i=0; i < MemMap.size();i++) {
214-
// if ( Address >= MemMap[i].Start && Address <= MemMap[i].End )
215-
// return true;
216-
//}
217215
#ifdef _WIN64
218216
return 0x140000000;
219217
#else
@@ -357,6 +355,18 @@ CString GetModuleName(size_t Address)
357355
return _T("<unknown>");
358356
}
359357

358+
size_t GetAddressFromName(CString moduleName)
359+
{
360+
size_t moduleAddress = 0;
361+
for (unsigned int i = 0; i < MemMapModule.size(); i++) {
362+
if (MemMapModule[i].Name == moduleName) {
363+
moduleAddress = MemMapModule[i].Start;
364+
break;
365+
}
366+
}
367+
return moduleAddress;
368+
}
369+
360370
bool IsProcHandleValid(HANDLE hProc)
361371
{
362372
if (!hProc)
@@ -519,12 +529,12 @@ bool UpdateMemoryMap(void)
519529
wcsModule = wcsrchr(wcsFullDllName, L'/');
520530
wcsModule++;
521531

522-
wchar_t filename[MAX_PATH];
523-
GetModuleFileNameEx(g_hProcess, NULL, filename, MAX_PATH);
524-
525-
if (wcscmp(filename, wcsFullDllName) == 0)
532+
if (ProcessBaseAddress == NULL)
526533
{
527-
ProcessBaseAddress = (size_t)ModuleBase;
534+
wchar_t filename[MAX_PATH];
535+
GetModuleFileNameEx(g_hProcess, NULL, filename, MAX_PATH);
536+
if (_wcsicmp(filename, wcsFullDllName) == 0)
537+
ProcessBaseAddress = (size_t)ModuleBase;
528538
}
529539
}
530540
}
@@ -830,8 +840,27 @@ int SplitString(const CString& input, const CString& delimiter, CStringArray& re
830840

831841
size_t ConvertStrToAddress(CString Address)
832842
{
833-
CStringArray chunks;
843+
//int foundIdx = -1;
844+
//if ((foundIdx = Spot.Text.FindOneOf(_T("+-"))) != -1)
845+
//{
846+
// CString moduleName = Spot.Text.Left(foundIdx);
847+
// foundIdx = Spot.Text.GetLength() - foundIdx;
848+
// CString remainder = Spot.Text.Right(foundIdx);
849+
// foundIdx = 0;
850+
// while (1)
851+
// {
852+
// if (isspace(remainder[foundIdx]) || remainder[foundIdx] == _T('+'))
853+
// foundIdx++;
854+
// else
855+
// break;
856+
// }
857+
// CString offsetString = remainder.GetBuffer() + foundIdx;
858+
//
859+
// //offset = strtoul(Spot.Text,NULL,16);
860+
//
861+
//}
834862

863+
CStringArray chunks;
835864
if (SplitString(Address, "+", chunks) == 0)
836865
chunks.Add(Address);
837866

@@ -846,12 +875,23 @@ size_t ConvertStrToAddress(CString Address)
846875
bool bPointer = false;
847876
bool bMod = false;
848877

878+
if (a.Find(_T(".exe")) != -1)
879+
{
880+
bMod = true;
881+
//a = a.Mid(a.Find(_T(".exe")) + 4);
882+
}
883+
else if (a.Find(_T(".dll")) != -1)
884+
{
885+
bMod = true;
886+
//a = a.Mid(a.Find(_T(".dll")) + 4);
887+
}
888+
849889
if (a[0] == '*')
850890
{
851891
bPointer = true;
852892
a = a.Mid(1);
853893
}
854-
if (a[0] == '&')
894+
else if (a[0] == '&')
855895
{
856896
bMod = true;
857897
a = a.Mid(1);

ReClass 2015/stdafx.h

+3
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ extern int FontHeight;
110110
extern bool gbAddress;
111111
extern bool gbOffset;
112112
extern bool gbText;
113+
extern bool gbRTTI;
114+
113115
extern bool gbFloat;
114116
extern bool gbInt;
115117
extern bool gbString;
@@ -287,6 +289,7 @@ bool IsModule(size_t Address);
287289

288290
CString GetAddressName(size_t Address,bool bHEX);
289291
CString GetModuleName(size_t Address);
292+
size_t GetAddressFromName(CString moduleName);
290293

291294
void ReadMemory(size_t Address,void* Buffer,DWORD Size);
292295
void WriteMemory(size_t Address,void* Buffer,DWORD Size);

0 commit comments

Comments
 (0)