Skip to content

Commit

Permalink
add pattern check
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jun 13, 2024
1 parent 67f047b commit d77ed3b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/GTAIV.XboxRainDroplets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ void Init()
if (pattern.empty())
{
pattern = hook::pattern("74 16 33 C0 80 7C 06");
injector::MakeNOP(pattern.get_first(-9), 3);
injector::WriteMemory<uint16_t>(pattern.get_first(-9), 0x01B0, true); //mov al,01
if (!pattern.empty())
{
injector::MakeNOP(pattern.get_first(-9), 3);
injector::WriteMemory<uint16_t>(pattern.get_first(-9), 0x01B0, true); //mov al,01
}
}
injector::MakeNOP(pattern.get_first(0), 2);
else
injector::MakeNOP(pattern.get_first(0), 2);

pattern = hook::pattern("56 8B F1 80 3E 00 74 08");
injector::MakeJMP(pattern.get_first(0), sub_B870A0, true);
Expand Down

0 comments on commit d77ed3b

Please sign in to comment.