Author Topic: Minor registry bug in ff7.exe  (Read 3276 times)

Myria kitty

  • *
  • Posts: 42
    • View Profile
Minor registry bug in ff7.exe
« on: 2008-01-02 08:38:41 »
There's a double-close of a registry handle in ff7.exe:

Code: [Select]
.text:00407625 8B 55 E4                                mov     edx, [ebp+hKey]
.text:00407628 52                                      push    edx             ; hKey
.text:00407629 FF 15 10 60 7B 00                       call    ds:RegCloseKey
.text:0040762F 89 45 F0                                mov     [ebp+var_10], eax
.text:00407632 EB 07                                   jmp     short loc_40763B
...
.text:0040763B                         loc_40763B:                             ; CODE XREF: sub_4075B0+82j
.text:0040763B 8B 45 E4                                mov     eax, [ebp+hKey]
.text:0040763E 50                                      push    eax             ; hKey
.text:0040763F FF 15 10 60 7B 00                       call    ds:RegCloseKey

This sets off the debugger.  The patch is simple: EB 07 -> EB 11 to skip that code when doing that jump.

Myria kitty

  • *
  • Posts: 42
    • View Profile
Re: Minor registry bug in ff7.exe
« Reply #1 on: 2008-01-02 08:43:52 »
Same thing at 004076BA, EB 07 -> EB 11.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Minor registry bug in ff7.exe
« Reply #2 on: 2008-01-02 12:13:34 »
These kind of errors are handled by FF7. Of course it's harder to start the game through some decent debugger, but there are more serious errors than those :). Oh, and if you post offsets, also state which version of ff7.exe you're using.