Skip to content

Bug: call replaced to jmp instruction when hooking (call stack broken) #14

@NIKEA-SOFT

Description

@NIKEA-SOFT

For fix need replace this code:
Code link

To:

else if (hs.opcode == 0xE8) {
    std::uintptr_t call_destination = detail::restore_absolute_address(current_address, hs.imm.imm32, hs.len);
    call.operand = detail::get_relative_address(
        call_destination, reinterpret_cast<std::uintptr_t>(trampoline_gen->getCurr()), sizeof(call));
    op_copy_src = &call;
    op_copy_size = sizeof(call);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions