[OTHER] CON stfs offsets.

Discussion in 'Programming & Scripting' started by edgareatis, Feb 5, 2010 with 5 replies and 857 views.

  1. edgareatis

    edgareatis Enthusiast

    Messages:
    167
    Ratings:
    12
    CON stfs offsets.


    Starting position 49152

    Name of package Type: string length:32 offset: 49152
    Package size Type: int32 length:1 offset: 49204
    Block Type:int16 length:1 offset: 49250
    Offset is block converted to int32 and multiplied by 4096 then added to 49152.

    Thank me if i helped :smile:
     
  2. rawrzorz

    rawrzorz Banned

    Messages:
    58
    Ratings:
    12
    Re: CON stfs offsets.

    Wrong, so very very wrong.

    Skunkie Butt
    Download the source of X360 and you will see how a block is exactly produced per package.
     
  3. SotG Caboose

    SotG Caboose Getting There

    Messages:
    1,444
    Ratings:
    681
    Re: CON stfs offsets.

    >_> There can be multiple files in a package. You would do read that in a loop.
     
  4. OP
    edgareatis

    edgareatis Enthusiast

    Messages:
    167
    Ratings:
    12
    Re: CON stfs offsets.

    I know i just though any1 who could under stand this would know do while and for. lol

    So it was a fluke it worked on every package i tested it on? I must be lucky.
     
  5. ShadowZ

    ShadowZ Enthusiast

    Messages:
    1,364
    Ratings:
    198
    Re: CON stfs offsets.

    Pretty sure that if a file is more than one block, you would need to code a scenario to take that into account.
     
  6. rawrzorz

    rawrzorz Banned

    Messages:
    58
    Ratings:
    12
    Re: CON stfs offsets.

    You tested it on STFS type 1 packages that had a single file allocated that just went back and forth between the same block count less than 0xAA blocks. STFS allocates block by block when needing a new block, so the first 0x1000 bytes of a file could be located at 0xB000 while the second 0x1000 bytes are located at 0xBF000, and the remaining 0x381 bytes could be at 0xE000.

    You also only tested it on files allocated less than 0xAA blocks. Say a file started at block 0xAA, using your equation it would produce 0xB6000. 0xB6000 and 0xB7000 are allocated to be the hash tables of level 0 hash tables. 0xB8000 and 0xB9000 are allocated to be the 2nd level 0 hash tables. 0xBA000 is the block for 0xAA.

    So yes, your method worked on the packages that you tested it on, but it's not the right way and will definitely not work for all packages for that is incorrect STFS. As I said, download X360 source and look at STFS classes, it is full, perfect STFS the way the Xbox does it.

    Block size is int24 (3 bytes, 8 bits in a byte, 8 x 3 = 24)

    If you are looking to simply have STFS functionality in your programs, download the X360 DLL, reference it into your program, and you only have to make functions to mod the content inside the package cause the X360 DLL extracts files, replaces them, hashes properly, and signs them.
     

Share This Page