mirror of
https://github.com/HolographicHat/Yae.git
synced 2026-03-15 16:43:17 +08:00
Merge pull request #129 from 34736384/master
fix player store id resolver
This commit is contained in:
@@ -69,9 +69,7 @@
|
||||
<SubSystem>NotSet</SubSystem>
|
||||
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetPath) C:\ProgramData\Yae\YaeAchievement.dll /y</Command>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -93,9 +91,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetPath) C:\ProgramData\Yae\YaeAchievement.dll /y</Command>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\globals.h" />
|
||||
|
||||
@@ -488,9 +488,17 @@ namespace
|
||||
immValue = static_cast<uint32_t>(i.Operands[1].imm.value.u);
|
||||
}
|
||||
|
||||
if (i.Instruction.meta.branch_type == ZYDIS_BRANCH_TYPE_NEAR && i.Operands.size() == 1) {
|
||||
if (i.Instruction.meta.branch_type == ZYDIS_BRANCH_TYPE_NEAR && i.Operands.size() == 1 &&
|
||||
(i.Instruction.mnemonic == ZYDIS_MNEMONIC_JZ || i.Instruction.mnemonic == ZYDIS_MNEMONIC_JNZ)) // jz for true branch, jnz for false branch
|
||||
{
|
||||
// assume the branching is jz
|
||||
uintptr_t branchAddr = Globals::BaseAddress + i.RVA + i.Instruction.length + i.Operands[0].imm.value.s;
|
||||
|
||||
// check if the branch is jnz and adjust the branch address
|
||||
if (i.Instruction.mnemonic == ZYDIS_MNEMONIC_JNZ) {
|
||||
branchAddr = Globals::BaseAddress + i.RVA + i.Instruction.length;
|
||||
}
|
||||
|
||||
// decode the branch address immediately
|
||||
const auto instructions = DecodeFunction(branchAddr, 10);
|
||||
const auto isMatch = std::ranges::any_of(instructions, [pOnPlayerStoreNotify](const DecodedInstruction& instr) {
|
||||
|
||||
Reference in New Issue
Block a user