t0m3k
asked on
Editing hex codes in exe files.
How do i do if i want to edit a hexcode in a file?
I know the offset - just need to change 4 bytes...
I know the offset - just need to change 4 bytes...
ASKER
it would be great if u could give me a tiny example.
/t0m3k
/t0m3k
Okay bear with me a while and I'll see what I can come up with
Darren
Darren
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've noticed that the offset must be in decimal format - not hexadecimal.
How do I convert, for example 0005:EA89 to decimal?
How do I convert, for example 0005:EA89 to decimal?
in decimal that would be... 60121.. Hope this helps :-)
Segment:Offset
0005:EA89
Hex = Offset * 10h + Offset
Hex = 0005 * 10h + EA89
Hex = EAD9
HexToDec = 60121
Cheers,
Viktor
Segment:Offset
0005:EA89
Hex = Offset * 10h + Offset
Hex = 0005 * 10h + EA89
Hex = EAD9
HexToDec = 60121
Cheers,
Viktor
Why do you need to do any hex to dec conversion ? the standard integer can take decimal as well as hex numbers, just prefix the number with $ to designate it as base16, just as I have done in the example code for example,
Distance:=$5EA89;
would assign the decimal value 60121 to Distance.
Hope this helps
Darren
Distance:=$5EA89;
would assign the decimal value 60121 to Distance.
Hope this helps
Darren
The hex value would be Distance := $EAD9; not Distance := $5EA89;
Cheers,
Viktor
Cheers,
Viktor
Oh yes, sorry
Any luck with evaluating the answer yet?
Any luck with evaluating the answer yet?
Darren