Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get ext extension
- if ext == "amd"
- callfunction AMD
- elif ext == "pac"
- callfunction PAC
- elif ext == "arc"
- callfunction PAC
- elif ext == "bin"
- callfunction BIN
- else
- print "Not a supported file format! Make sure the extension is correct!"
- endif
- startfunction AMD
- idstring "CHNK"
- get FileCount long
- idstring "MODEL_DATA"
- get NULL long
- get UNK long
- get NULL short
- for i = 0 < FileCount
- get SIZE long
- savepos OFFSET
- get NAME basename
- string NAME += ".gmo"
- log NAME OFFSET SIZE
- math OFFSET + SIZE
- goto OFFSET
- next i
- endfunction
- startfunction PAC
- goto 0
- get FileCount long
- for i = 0 < FileCount
- getdstring NAME 0x20
- get SIZE long
- savepos OFFSET
- log NAME OFFSET SIZE
- math OFFSET + SIZE
- goto OFFSET
- next i
- endfunction
- startfunction BIN
- get Identifier long
- if Identifier == 0x64
- callfunction PSCPersonaBasic
- else // not a PSCPersonaBasic.bin
- goto 0
- get FILENAME string
- strlen FILENAMESZ FILENAME
- if FILENAMESZ > 0 // old persona bin
- callfunction OLDPersonaBin
- else // newest bin type
- callfunction PAC
- endif
- endfunction
- startfunction PSCPersonaBasic
- goto 4
- get FileCount long
- for i = 0 < FileCount
- get OFFSET long
- get NAME basename
- string NAME += OFFSET
- get SIZE long
- log NAME OFFSET SIZE
- next i
- endfunction
- startfunction OLDPersonaBin
- goto 0
- for
- get NAME string
- do
- get NULL byte
- while NULL == 0
- savepos OFFSET
- math OFFSET - 1
- goto OFFSET
- get SIZE long
- savepos OFFSET
- log NAME OFFSET SIZE
- math OFFSET + SIZE
- goto OFFSET
- next
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment