Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hde displacement size under x64 #96

Open
shatyuka opened this issue Aug 24, 2021 · 0 comments · May be fixed by #97
Open

hde displacement size under x64 #96

shatyuka opened this issue Aug 24, 2021 · 0 comments · May be fixed by #97

Comments

@shatyuka
Copy link

Description:
For a 0x67 prefixed x64 instruction, hde will recognize it's displacement as 16bit. (maybe just copied from hde32?)

disp_size = 2;

Possible fix:

        switch (m_mod) {
            case 0:
                if (m_rm == 5)
                    disp_size = 4;
                break;
            case 1:
                disp_size = 1;
                break;
            case 2:
                disp_size = 4;
                break;
        }

Test:

.CODE

FuncInc PROC
    lea eax, [ecx+10000h]
    ret
FuncInc ENDP

END

Try hooking this function under x64 and call ppOrigin.

Origin function:

Backup function:

@shatyuka shatyuka linked a pull request Aug 25, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant