A fork of https://github.com/xensik/gsc-tool - A utility to compile & decompile IW engine game scripts.
Go to file
2022-05-24 16:40:24 +02:00
.github Create dependabot.yml 2022-05-24 16:40:24 +02:00
data
deps reduce memory usage and cleanup code 2022-01-21 13:31:11 +01:00
docs
gen fix warnings 2022-04-14 20:35:37 +02:00
src t6: fix empty switch cases decompile 2022-05-03 12:15:44 +02:00
tools
.gitignore blackops2 implementation 2022-02-18 19:07:37 +01:00
.gitmodules
appveyor.yml update build 2022-03-21 16:39:04 +01:00
LICENSE
prebuild-macos.sh
prebuild-windows.bat update build 2022-03-21 16:39:04 +01:00
premake5.lua fix arch 2022-03-16 18:21:16 +01:00
README.md update README 2022-05-01 13:52:25 +02:00

Build status license GitHub issues GitHub release (latest by date)

GSC Tool

A utility to compile & decompile IW engine game scripts.

Supported Games

  • IW5 (Call of Duty: Modern Warfare 3)
  • IW6 (Call of Duty: Ghosts)
  • IW7 (Call of Duty: Infinite Warfare)
  • IW8 (Call of Duty: Modern Warfare (2019))
  • S1 (Call of Duty: Advanced Warfare)
  • S2 (Call of Duty: WWII)
  • S4 (Call of Duty: Vanguard)
  • H1 (Call of Duty: Modern Warfare Remastered)
  • H2 (Call of Duty: Modern Warfare 2 Campaign Remastered)
  • T4 (Call of Duty: World at War) *WIP*
  • T5 (Call of Duty: Black Ops) *WIP*
  • T6 (Call of Duty: Black Ops II)
  • T7 (Call of Duty: Black Ops III) *WIP*

Usage

./gsc-tool.exe <mode> <game> <path>

modes: asm, disasm, comp, decomp

games: iw5, iw6, iw7, iw8, s1, s2, s4, h1, h2, t6

paths: file, directory (recursive process all files inside dir)

for zonetool files (.cgsc, .cgsc.stack) use: zasm, zdisasm, zcomp, zdecomp modes

Mode Description Output
asm assemble a file.gscasm file.gscbin
disasm dissasemble a file.gscbin file.gscasm
comp compile a file.gsc file.gscbin
decomp decompile a file.gscbin file.gsc

File Format

If you need to extract scripts from fastfiles or game memory, use Zonetool or Jekyll.

  • gsc-tool .gscbin format is a serialized ScriptFile struct: name: null-term string, compressedLen: 4 byte uint, len: 4 byte uint, bytecodeLen: 4 byte uint, buffer: byte array[compressedLen], bytecode: byte array[bytecodeLen].

  • zonetool (IW5) format made of bytecode file .cgsc and decompressed stack buffer .cgsc.stack.

  • treyarch (T6) format is a single buffer with gscobj data .gsc or .csc.

Credits

This project is based on RektInator's gsc-asm. Special thanks to RektInator, JTAG & Dasfonia.

Disclaimer

This software has been created purely for the purposes of academic research. Project maintainers are not responsible or liable for misuse of the software. Use responsibly.