0

For starters guys please don't get mad at me because I really googled this question for a while and couldn't find a satisfying answer. Also if I'm asking an idiotic question, I apologize beforehand.

What I basically want to do is to hex edit an executable file to change an integer variable in an address I know from signed to unsigned. Is this even possible? to change variable types by hex editing? I know how to change the value of the variable, but how can I change its type?

Thanks in advance, Ray.

0

Yes, it is possible, but by changing instructions, not data. In assembly there is no way to tell that a particular integer variable is signed or unsigned until you interpret it in the one or another way (and you may change this interpretation many times).

Knowing this, to interpret some integer value you use instructions like ja, jb or mul in case of unsigned integer, or jg, jl or imul in case of signed integer (in x86 architecture). So, if you want to change the way the particular integer is interpreted, you have to change instructions in one of these groups to their counterparts in the second one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.