Want to Join Us ?

you'll be able to discuss, share and send private messages.

Game Tools

Discussion in 'Homebrew' started by Rip Cord, Dec 9, 2016.

Share This Page

  1. Rip Cord

    Administrator Staff Member Admin Developer

    This tool was a member request.
    I don't know what it's used for, but maybe someone else find it useful.

    ml_usage.PNG

    ml_example.PNG
     

    Attached Files:

    catalinnc and storm shadow like this.
  2. Rip Cord

    Administrator Staff Member Admin Developer

    Another member request.
    damn, it wasn't my brilliant idea.:(

    kf_source.PNG

    all credit to the member with the idea.

    password to unzip:
    90385croissant293749cherry840921straWberry
     

    Attached Files:

  3. Rip Cord

    Administrator Staff Member Admin Developer

    updated app in previous post to version 023.
    time searching as text and as unicode text improved, i.e. it's faster.
     
  4. Rip Cord

    Administrator Staff Member Admin Developer

    Another member request.

    dvbfyyy.PNG


    Includes compiled app and source.
    password:
    90385croissant293749cherry840921straWberry
     

    Attached Files:

    catalinnc likes this.
  5. Rip Cord

    Administrator Staff Member Admin Developer

    oh, using x's and y's was his idea. much better than the way I was going to implement it.:cool:
     
  6. Rip Cord

    Administrator Staff Member Admin Developer

    string-table.JPG

    includes source code and exe.
     

    Attached Files:

    catalinnc and storm shadow like this.
  7. catalinnc

    Member Developer

    nice tool...

    it has a little bug:
    Code (Text):
    strtab -x F:\abc\1\strtab\Release\game.elf
     
    strtab version 1.0.0
     
    opening F:\abc\1\strtab\Release\game.elf
     
    Elf Magic: 7F454C46 [.ELF]
    elf class: 0x02 [64bit]
    data encoding: 0x02 [msb]
    file version: 0x01
    abi id: 0x66
    skip: 0x0
    elf type: 0x02 [exe]
    processor type: 0x15 [ppc]
    file format version: 0x00000001
    entry: 0x68E2B8
    program headers offset: 0x40
    section headers offset: 0xCC4528
    processor flags: 0x00000000
    elf header size: 0x40
    program header size: 0x38
    program header count: 0x08
    section header size: 0x40
    section header count: 0x2A
    strtab sh index: 0x29
     
    Strtab Section Header
    section name: 0x1
    section type: 0x3
    section offset: 0xCC428D [13386381]
    section size: 0x294 [660]
     
    saving strtab-F:\abc\1\strtab\Release\game.elf
    failed to create strtab-F:\abc\1\strtab\Release\game.elf
    removing the path from the line solves the problem...
    Code (Text):

    F:\abc\1\strtab\Release>strtab -x game.elf
     
    strtab version 1.0.0
     
    opening game.elf
     
    Elf Magic: 7F454C46 [.ELF]
    elf class: 0x02 [64bit]
    data encoding: 0x02 [msb]
    file version: 0x01
    abi id: 0x66
    skip: 0x0
    elf type: 0x02 [exe]
    processor type: 0x15 [ppc]
    file format version: 0x00000001
    entry: 0x68E2B8
    program headers offset: 0x40
    section headers offset: 0xCC4528
    processor flags: 0x00000000
    elf header size: 0x40
    program header size: 0x38
    program header count: 0x08
    section header size: 0x40
    section header count: 0x2A
    strtab sh index: 0x29
     
    Strtab Section Header
    section name: 0x1
    section type: 0x3
    section offset: 0xCC428D [13386381]
    section size: 0x294 [660]
     
    saving strtab-game.elf
    saving edited-game.elf
    _
     
    Rip Cord, samoray and storm shadow like this.
  8. Rip Cord

    Administrator Staff Member Admin Developer

    thanks for the heads up.

    It's a very very simple app, processing file paths is not implemented.
    The prototypes for make path and split path are there in the header, so it's easy to add.
     
  9. Rip Cord

    Administrator Staff Member Admin Developer

    another request. lol, that means a lot of these are someone else's idea, not mine and I don't know what it's used for.
    binary search

    Usage modes:

    this prints out the offsets in file.in where are found matches with target-hex
    replaces file.in target-hex

    saves file.in as file.out, all matches with target hex bytes removed
    replaces file.in target-hex file.out

    saves file.in as file.out, all matches with target hex are replaced with patch hex
    replaces file.in target-hex file.out patch-hex

    saves file.in as file.out, only hex at specified match offset number are replaced with patch hex
    replaces file.in target-hex file.out patch-hex offset-1 offset-2...

    Code (Text):

    C:\>replaces file.bin F821FF917C0802A6F80100804800
    replaces.exe 0.3.2
     
    argv[0] replaces
    argv[1] file.bin
    argv[2] F821FF917C0802A6F80100804800
     
    opening file.bin
    file size: 0x535B08
     
    hex string: F821FF917C0802A6F80100804800 character length: 28
    hex bytes: F821FF917C0802A6F80100804800 byte length: 14
     
    searching for matches
    match 1 at 0x200
    match 2 at 0x2207E8
    match 3 at 0x24E550
    match 4 at 0x2560E4
    match 5 at 0x325050
    match 6 at 0x336AD0
    match 7 at 0x338C28
     
    to replace match at 200 specify match 1
    Code (Text):

    C:\>replaces file.bin F821FF917C0802A6F80100804800 file-out.bin E732FF917C0802A6F801008037FF 1
    replaces.exe 0.3.2
     
    argv[0] replaces
    argv[1] file.bin
    argv[2] F821FF917C0802A6F80100804800
    argv[3] file-out.bin
    argv[4] E732FF917C0802A6F801008037FF
    argv[5] 1
     
    opening file.bin
    file size: 0x535B08
     
    hex string: F821FF917C0802A6F80100804800 character length: 28
    hex bytes: F821FF917C0802A6F80100804800 byte length: 14
    hex string: E732FF917C0802A6F801008037FF character length: 28
    hex bytes: E732FF917C0802A6F801008037FF byte length: 14
     
    searching for matches
    match 1 at 0x200
    match 2 at 0x2207E8
    match 3 at 0x24E550
    match 4 at 0x2560E4
    match 5 at 0x325050
    match 6 at 0x336AD0
    match 7 at 0x338C28
     
    replace selected target bytes
    match 1 offset 0x200
     
    or can specify any of the other matches, multiple match numbers must be in numerical order.
    like replaces in.bin 4545 out.bin 5454 1 5 9
    to replace the 1st, 5th and 9th occurance.

    only 1st match of overlapping matches is counted as a match.
    so if target hex is 0000 and hex 000000 occurs in file, only first 2 bytes is counted as a match 000000 but not 000000 since it overlaps the first match
     

    Attached Files:

    Last edited: Oct 28, 2018
    catalinnc likes this.
  10. Rip Cord

    Administrator Staff Member Admin Developer

    2 similar but simpler apps
    1. search binary files for ascii string encoded in binary
    2. search binary files for ascii string encoded in binary like unicode string

    1. b-string.exe
    Code (Text):

    C:\>b-string.exe file.bin Group
     
    Searching file.bin
    match 1 at 0x3C8B39
    match 2 at 0x3CF93B
    match 3 at 0x3CF963
    match 4 at 0x3CFA33
    match 5 at 0x3CFA99
    match 6 at 0x3CFAB1
    match 7 at 0x3D0679
    match 8 at 0x3D06AB
    ...
     
    hex bytes searched for: 47726F7570

    match 2:
    Code (Text):

    Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    003CF930  69 50 72 6F 63 65 73 73 69 6E 67 47 72 6F 75 70 iProcessingGroup
     
    2. b-ustring.exe
    Code (Text):

     
    C:\>b-ustring.exe file.bin Group
     
    Searching file.bin
    match 1 at 0x3C8BC3
     
    hex bytes searched for: 470072006F0075007000
    match 1:
    Code (Text):

    Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    003C8BC0  41 A0 00 47 00 72 00 6F 00 75 00 70 00 00 00 00 A .G.r.o.u.p....
     
    Since I use these in batch files, they have no output except to list the matches.
    For more output add option -v to the end: C:\>b-string.exe file.bin Group -v
     

    Attached Files:

    samoray, catalinnc and storm shadow like this.
  11. Rip Cord

    Administrator Staff Member Admin Developer

    update to strtab.exe

    changed user interface from individualized form to generic form
    added some additional minor checks

    Code (Text):

    extract string table:
    strtab -x <input.elf> <output.elf> <strtab.bin>
    restore string table:
    strtab -r <input.elf> <output.elf> <strtab.bin>
    for file information:
    strtab -i <input.elf>
     
    includes exe and source
     

    Attached Files:

    samoray, catalinnc and storm shadow like this.
Top