Skip to content

Commit

Permalink
removed unnecessary sigscan in VMT method
Browse files Browse the repository at this point in the history
  • Loading branch information
maxamula committed Jan 10, 2023
1 parent 2e70266 commit 24a6857
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 3 additions & 6 deletions dx11hk/dx11hk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace dxhk
memcpy(from, jmp, JMP_ABS64_LEN);
}

__nothrow void* FindPattern(const uint8_t* signature, const unsigned int length)
void* FindPattern(const uint8_t* signature, const unsigned int length)
{
uint8_t* at = 0;
DWORD oldProtection = 0;
Expand Down Expand Up @@ -96,11 +96,8 @@ namespace dxhk
{
void** VMT = CreateDummy();
ReleaseDummy();
uint8_t signature[20];
memcpy(signature, VMT, 20);
void** origVMT = (void**)FindPattern(signature, 20);
void* origPresent = *&origVMT[8];
*&origVMT[8] = fnDetour;
void* origPresent = *&VMT[8];
*&VMT[8] = fnDetour;
return origPresent;
}

Expand Down
3 changes: 2 additions & 1 deletion dx11hk/dx11hk.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>
Expand Down

0 comments on commit 24a6857

Please sign in to comment.