SHARE
TWEET

eso_zosft_extract_names.bms

Byvar Oct 4th, 2013 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. idstring 0 "ZOSFT"
  2. goto 0xA 0 SEEK_CUR #unknown part
  3. endian little
  4. get NUMBER_RECORDS_1 long 0
  5. comtype ZLIB
  6.  
  7. goto 0xA 0 SEEK_CUR
  8. get NUMBER_RECORDS_1 long 0
  9. goto 0x4 0 SEEK_CUR #2nd number records
  10. get BLOCK_SZ long 0
  11. get BLOCK_ZSZ long 0
  12. savepos OFFSET 0
  13. clog MEMORY_FILE OFFSET BLOCK_ZSZ BLOCK_SZ 0
  14. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  15. get BLOCK_SZ long 0 # zsz is larger than sz for some reason!
  16. get BLOCK_ZSZ long 0
  17. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  18. get BLOCK_SZ long 0
  19. get BLOCK_ZSZ long 0
  20. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  21.  
  22. goto 0xA 0 SEEK_CUR
  23. get NUMBER_RECORDS_2 long 0
  24. goto 0x4 0 SEEK_CUR #2nd number records
  25. get BLOCK_SZ long 0
  26. get BLOCK_ZSZ long 0
  27. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  28. get BLOCK_SZ long 0
  29. get BLOCK_ZSZ long 0
  30. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  31. get BLOCK_SZ long 0
  32. get BLOCK_ZSZ long 0
  33. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  34.  
  35. goto 0xA 0 SEEK_CUR
  36. get NUMBER_RECORDS_3 long 0
  37. goto 0x4 0 SEEK_CUR #2nd number records
  38. get BLOCK_SZ long 0
  39. get BLOCK_ZSZ long 0
  40. goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  41.  
  42. if NUMBER_RECORDS_3 != 0
  43.         get BLOCK_SZ long 0
  44.         get BLOCK_ZSZ long 0
  45.         goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  46.         get BLOCK_SZ long 0
  47.         get BLOCK_ZSZ long 0
  48.         goto BLOCK_ZSZ 0 SEEK_CUR #skip zlib block
  49. endif
  50.  
  51. string RENAME_FILENAME = "renamer.bat"
  52. log MEMORY_FILE2 0 0 0
  53.  
  54. get FILENAMES_BLOCK_SIZE long 0
  55. savepos ZOSFT_OFFSET 0
  56. savepos END_OFFSET 0
  57. math END_OFFSET += FILENAMES_BLOCK_SIZE
  58. for ZOSFT_OFFSET = ZOSFT_OFFSET != END_OFFSET
  59.         get NAME string 0
  60.         savepos ZOSFT_OFFSET 0
  61.         for
  62.                 get FILE_ID long MEMORY_FILE
  63.                 if FILE_ID != 0
  64.                         break
  65.                 endif
  66.         next
  67.         putct "ren __" string -1 MEMORY_FILE2
  68.         putct FILE_ID string -1 MEMORY_FILE2
  69.         putct ".* " string -1 MEMORY_FILE2
  70.         putct NAME string -1 MEMORY_FILE2
  71.         put 10 byte MEMORY_FILE2
  72.         savepos MEMORY_OFFSET MEMORY_FILE2
  73. next
  74. log RENAME_FILENAME 0 MEMORY_OFFSET MEMORY_FILE2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top