Author Topic: [N/A] Text and Hex Editors - Hext Tools 3.0  (Read 121960 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools ()
« Reply #100 on: 2017-01-02 15:10:33 »
I have added a new instruction to the Hext format - and expanded on Pointers. This makes it easier to edit code detours, like the ones Aali's driver uses. Instead of forcing the DLL to stay in one place, you can find the needed address by following the jump-to address now. 

Quote
6. Pointers

Sometimes an address points to another address. In these cases you may want to edit the values of the address that is being pointed to. For example, at the address 2E8F0, there may be 4 bytes-  D0 CD 10 00. This may be another address (in this example 0x10CDD0). To edit the address 10CDD0 and not 2E8F0, use the caret (^) as follows:

2E8F0^ = 11 22 33

In the above example, the address that is pointed to at 2E8F0 will be used.

The following type of instructions are all valid:

2E8F0^ = 11 22 33

2E8F0^ = 90 : 5

2E8F0^ = 6A 30 > 90 90 : 3

{Memory permission}
2E8F0^ : 1000

Pointers will only return a 4 byte address.

When using pointers with  Local Add/Subtraction, the correct usage is:

2E8F0^ + 10 = 11 22 33

In the above example, assuming that 2E8F0 points to the address 0x10CDD0, the final address to be changed is 0x10CDE0.

It is also possible to use more than one caret to traverse memory addresses. For example:

2E8F0^^^ = 11 22 33

7. Jumps and Calls (Opcode E9/E8)

What we are referring to here is a 4 byte relative address jump. It may be important for you to locate the address that is being jumped to. This Hext instruction will begin an operation from the location the jump references. For example, at the address 2E8F0 there may be a relative address jump with code E9 0B 17 00 00.  Here, the assembly x86 instruction is jumping to a new memory location at 30000 (2E8F0 + 5 + 170B). To reference this address via the assembly jump, use the 'at sign' (@) as follows:

 2E8F0@ = 11 22 33

Like with Pointers, the following type of instructions are all valid:

2E8F0@ = 11 22 33

2E8F0@ = 90 : 5

2E8F0@ = 6A 30 > 90 90 : 3

{Memory permission}
2E8F0@ : 1000

When using Jumps with  Local Add/Subtraction, the correct usage is:

2E8F0@ + 10 = 11 22 33

In the above example, assuming that 2E8F0 is a jump to address 0x30000, the final address to be changed is 0x30010.

As with Pointers, it is possible to use more than one 'at sign' to traverse memory addresses; for example

2E8F0@@@ = 11 22 33

will follow three x86 Jump/Call instructions.

Combining Pointer and Jump Operations

Pointer and Jump operations can work together in one instruction. For example

2E8F0^@ = 11 22 33

will first retrieve an address at the address 0x2E8F0, and, then, if any jump operation exists at that address, the address that the jump points to will be the one used. Here is a more detailed explanation:

Suppose that at 2E8F0 there are four bytes D0 CD 10 00 (address 0x10CDD0). So, as before, the caret (^) indicates that the bytes at this address will be modified. But the 'at sign' after the caret indicates that you want to also follow a jump to a new address.  At address 0x10CDD0, there may exist a Jump or Call instruction (5 bytes, starting with E8 or E9). This may point to a new address at 0x20A000.  In the above example, the bytes at address 0x20A000 will be ones modified.

In the above example

2E8F0^@ = 11 22 33

is equivalent to

20A000 = 11 22 33
« Last Edit: 2017-01-02 16:45:54 by DLPB »

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools ()
« Reply #101 on: 2017-01-02 16:22:12 »
Damn, nice job! This assembler JMP pointer jump is what I need for patches!
I can't wait for update!
« Last Edit: 2017-01-07 17:09:53 by Maki »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #102 on: 2017-01-08 23:53:26 »
Code: [Select]
Hext Tools v3.0
09.Jan.2017

General
1. A new tool - HextCompare - has been added.
2. Byte Grouping options have been removed.
3. The Command window will always close after operations are complete.
4. The tool collection has been renamed from DLPB Tools to Hext Tools.
5. Hext format: added "Jump/Call" address instruction.
6. Hext format: Pointer instruction now allows multiple address levels.
7. Readme files are now help files. All help files have been updated.
8. Only one instance of each tool is allowed (when the file name is the same).

HextCompare
First release.

HextEdit
None.

HextLaunch
1. The log was reporting the wrong addresses for replaced bytes. This has been corrected.
2. Hext_in / DLL_in wll always be used if files are present. The corresponding options have been removed from Settings.ini.
3. WorkingFolder added to Settings.ini. The default is MyFolder1. With this option, it is possible to add multiple modification configurations for one target program or game.

Hextract
1. The log cannot be disabled.
2. The Hextract Instruction List format has been altered. Please check 'Hextract-Help.rtf'
3. Descriptions can now include spaces.

HextSort
1. The log cannot be disabled.

ListLoad
1. 'Start with Windows' option now works properly.

TextMod
1. Better "whole word" detection.

Please read the main help file for each tool.


See first post for link.

I should also note that TextMod Whole Word detection is only going to work correctly with the English language. For now.
« Last Edit: 2017-01-09 00:07:52 by DLPB »

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #103 on: 2017-01-09 08:42:10 »
No more password?  ;D

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #104 on: 2017-01-09 12:42:58 »
No ;)  Looks like Google isn't going to block my "virus ridden" collection.

I'm only compressing one file there anyway... ListLoad. And that one is mostly never going to be used by people.
« Last Edit: 2017-01-09 13:57:35 by DLPB »

d2grubby

  • *
  • Posts: 1
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #105 on: 2017-08-21 07:59:47 »
Im sorry to bother you guys but the link is not working. Can you guys help me ? Need this tool for fixing bad UV :D.
Sorry for my bad English :( !
« Last Edit: 2017-08-21 08:03:28 by d2grubby »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #106 on: 2017-08-21 16:07:43 »
Done.

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #107 on: 2017-09-11 22:45:08 »
Done.

Hey DLPB, I'm having an issue... when using HextLaunch on FF8, the DLL's i'm injecting are working fine, but when it tries to inject the hext, it's not working....?  I get 0 changes in the log and 12 errors with maki's UV fix and this code:
Code: [Select]
153CC0 = 00
153CCA = 00
153CD8 = 00
153CE2 = 00
153CF2 = 00
153CFC = 00
153D0C = 00
153D16 = 00
153D26 = 00
153D30 = 00
153D38 = 00
153D42 = 00

But when I 'patch' the .exe using that code and HextEdit, it works just fine.

Could this be because I have RaW(ddraw.dll) as well as HextLaunch running at the same time?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #108 on: 2017-09-11 22:49:51 »
Nah, it's because file addresses (hextedit) and memory addresses (hextlaunch) are different. How they differ depends on how the memory is mapped.  It differs based on game/app and on address.  For ff8, from what I have seen, the change is usually to add 400000 on to the file address to get to mem address.  In hextlaunch you can do this as follows (so you don't need to change all addresses):

Code: [Select]
+400000

153CC0 = 00
153CCA = 00
153CD8 = 00
153CE2 = 00
153CF2 = 00
153CFC = 00
153D0C = 00
153D16 = 00
153D26 = 00
153D30 = 00
153D38 = 00
153D42 = 00

But be warned that +400000 is not a universal fix for all ff8 addresses. And it may change from language to language (but I doubt it does). 

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #109 on: 2017-09-11 23:01:53 »
Nah, it's because file addresses (hextedit) and memory addresses (hextlaunch) are different. How they differ depends on how the memory is mapped.  It differs based on game/app and on address.  For ff8, from what I have seen, the change is usually to add 400000 on to the file address to get to mem address.  In hextlaunch you can do this as follows (so you don't need to change all addresses):

Code: [Select]
+400000

153CC0 = 00
153CCA = 00
153CD8 = 00
153CE2 = 00
153CF2 = 00
153CFC = 00
153D0C = 00
153D16 = 00
153D26 = 00
153D30 = 00
153D38 = 00
153D42 = 00

But be warned that +400000 is not a universal fix for all ff8 addresses. And it may change from language to language (but I doubt it does). 

What's -REALLY- strange, is that it seems like this worked for me before -- with some quirky GeDoSaTo settings, it injected just fine on my clean install.  Weird.
that tip didn't work, either... :/

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #110 on: 2017-09-11 23:12:26 »
What's the error message.

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #111 on: 2017-09-11 23:19:10 »

This is what the console shows with or without your +400000 addition.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #112 on: 2017-09-11 23:26:42 »
And what happens with it?  Same thing?  Because that issue is caused by write issues or address not existing  (and I've checked and +400000 is correct and so are the addresses).

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #113 on: 2017-09-11 23:37:40 »
And what happens with it?  Same thing?  Because that issue is caused by write issues or address not existing  (and I've checked and +400000 is correct and so are the addresses).

Yeah... same reaction. 
EDIT* - um... looks like after I set my delay to 5000ms, it worked... but it was too late to bypass the publish.dll even though it claims that it did.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #114 on: 2017-09-11 23:40:40 »
ah yeah... if it's touching same values, the delay will be needed (plus delay may have been needed anyway)....  but it could be that punish.dll is actually updating the values continuously (which would be silly).. in which case hextlauch or any editor in mem will be worthless.  You can try testing this by editing memory with Cheat Engine.
« Last Edit: 2017-09-11 23:42:17 by DLPB »

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #115 on: 2017-09-12 00:13:19 »
ah yeah... if it's touching same values, the delay will be needed (plus delay may have been needed anyway)....  but it could be that punish.dll is actually updating the values continuously (which would be silly).. in which case hextlauch or any editor in mem will be worthless.  You can try testing this by editing memory with Cheat Engine.

Well, it seems I can set the delay to about 3500 and it works as long as I don't have publish.dll in there.  It removes the 'intro' publish splash screen (square enix in this case, eidos in the old PC 2000) and it seems like it works if I put the delay to 5000 without removing it because it takes so long, that it doesn't effect/apply the memory injection from the .dll, so it loads.  Damn you publish.dll!!! I used to like you.  I will have to wait for gaastly's Hext codes to use it again, I suppose.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #116 on: 2017-09-12 00:35:39 »
im thinking of adding an option to hexttools soon anyway that checks for a value before writing.  So it would scan until it found the change and then add it.  Rather than hoping a delay is long enough.  I'll keep delay option too.

Still... this publish thing needs to be hext file instead.

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #117 on: 2017-09-12 01:21:25 »
im thinking of adding an option to hexttools soon anyway that checks for a value before writing.  So it would scan until it found the change and then add it.  Rather than hoping a delay is long enough.  I'll keep delay option too.

Still... this publish thing needs to be hext file instead.

Yeah, I agree.  I'd prefer to have everything be hext instructions, that way they can be 'injected' with the other instructions (UV fix) and also i can patch them with hextedit into the .exe to make launching a bit more convenient for me.  Hooray stability!

Chrysalis

  • ESUI Developer
  • Global moderator
  • *
  • Posts: 414
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #118 on: 2018-02-04 17:06:36 »
Am I been an idiot hextedit is always saying 0 changes made which I Can confirm with a hexeditor.

Here is my txt file which I am trying to use to change all tifa's misses to hit and make vincents ultimate weapon ramp up quicker.

What have I done wrong?

Code: [Select]
ff7.exe|5882880

{{Vincent Ultimate Weapon increase killed divided by 128 to 16 - exe addresses below}}
1DC929 = 04

{{Tifa change all miss to hit - exe addresses below}}
51D4D0 = 01 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01
51D4E0 = 01 01 02 02 02 01 01 01 01 01 01 01 01 01 01 01
51D500 = 01 01 01 02 02 01 01 01 01 01 01 01 01 01 01 01
51D510 = 01 01 01 01 02 02 01 01 01 01 01 01 01 01 01 01
51D530 = 01 01 01 01 01 02 01 02 01 01 01 01 01 01 01 01
51D540 = 01 01 01 01 01 01 02 01 02 01 01 01 01 01 01 01
51D560 = 01 01 01 01 01 01 01 02 01 01 01 01 01 01 01 01

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #119 on: 2018-02-04 17:16:54 »
The log will likely tell you more than just that.  Those Tifa addresses are memory addresses - not file. They don't exist in the file.

But this thread is not for anything other than bug reports or issues that are caused by Hext programs.

Chrysalis

  • ESUI Developer
  • Global moderator
  • *
  • Posts: 414
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #120 on: 2018-02-09 12:20:19 »
It doesnt tell me more then that.

I can confirm the tifa addresses are file, the original post where they documented specifically says to hexedit the file, and I can confirm if I edit the file manually it has the desired affect.

So unless you can confirm I have done something wrong to me it looks like a bug, in which case I am posting in the right thread.

Before confirming please make sure you test as well. If you confirm I made an error in syntax or something please explain what I did wrong.  Thanks

Proof addresses are in file



log output

Code: [Select]
---------------------------
Example.txt (ff7.exe)

Changed: 0
Replaced: 0

No errors.

___________________________

Time taken: 0.000s

04/02/2018, 18:13:28
___________________________

Example.txt contents (same happens if I remove size check for binary)

Code: [Select]
ff7.exe|5882880

{{Tifa change all miss to hit - exe addresses below}}
51D4D0 = 01 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01
51D4E0 = 01 01 02 02 02 01 01 01 01 01 01 01 01 01 01 01
51D500 = 01 01 01 02 02 01 01 01 01 01 01 01 01 01 01 01
51D510 = 01 01 01 01 02 02 01 01 01 01 01 01 01 01 01 01
51D530 = 01 01 01 01 01 02 01 02 01 01 01 01 01 01 01 01
51D540 = 01 01 01 01 01 01 02 01 02 01 01 01 01 01 01 01
51D560 = 01 01 01 01 01 01 01 02 01 01 01 01 01 01 01 01
« Last Edit: 2018-02-09 12:29:41 by Chrysalis »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #121 on: 2018-02-09 17:32:29 »
]ill look later when i get home. have you checked exe write permissions
« Last Edit: 2018-02-09 17:34:06 by DLPB »

Chrysalis

  • ESUI Developer
  • Global moderator
  • *
  • Posts: 414
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #122 on: 2018-02-09 20:44:40 »
yep.

Things I checked.

running tool as admin.
permissions on exe (is writable by YAMP)
if its a filesize issue (by removing the size value)
syntax of address, I checked the documentation supplied, it says 00s at start dont need to be present, but just in case I did try with them present but it made no difference.
if I run using the supplied testfile it functions as expected however.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #123 on: 2018-02-09 23:41:30 »
edit.

{{Tifa change all miss to hit - exe addresses below}}

< This is what's doing it.  You can't have closing double bracket on same line.

{{
Tifa change all miss to hit - exe addresses below
}}


or 

{Tifa change all miss to hit - exe addresses below

or

#Tifa change all miss to hit - exe addresses below

The working example shows the above - but I appreciate how strange it must seem that double curly cannot end on the same line.  I might change that in future revisions.

What {{Tifa change all miss to hit - exe addresses below}} is being seen as is

{{Tifa change all miss to hit - exe addresses below

i.e., skip everything from this point on.
« Last Edit: 2018-02-10 06:28:54 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« Reply #124 on: 2018-06-03 19:07:06 »
I spotted that I messed up the DLL path, so only global DLL will work.  I'll fix this in later revision.