ActionScript 3 == Witcher Script?[]
There are numerous indications as to why the mysterious Witcher Script is either based on or identical to ActionScript 3.
- Several mentions of ActionScript (e.g. ACTIONSCRIPT3) in the witcher3.exe:
- http://adobe.com/AS3/2006/builtin as DTD/schema URL
- Failed loading SWF "%s": ActionScript version mismatch
- Scaleform AS3 Socket
- AS3 socket buffer
- ActionScript Memory leaks in movie '%s', including %d string nodes
- ActionScript version mismatched between main and import '%s' files
- Several clear references to Shockwave Flash as a file format, most notably:
- Tag 'DefineBinaryData' (87) is not supported, potentially 'TLF text' fields are used. Switch to 'Classic Text'.
- GFx_DoActionLoader - DoAction tag shouldn't appear in AS3 swf. Tag is skipped.
- GFx_DoInitActionLoader - DoInitAction tag shouldn't appear in AS3 swf. Tag is skipped.
- file extensions .swf and .redswf respectively
--— Gqxidzjqmj (talk) 11:30, 16 July 2019 (UTC)
- Scaleform is using ActionScript, so parts about GFx_ are about that. — Gilrond (talk) 14:29, 16 July 2019 (UTC)
- Yeah, I came across mentions of Scaleform and it makes sense that this is the actual implementation used. But unlike with ActionScript 3 and SWF for which I even wrote some RCE tools some time ago, I never had any firsthand experience with Scaleform. Of course this also makes analysis of witcher3.exe harder than it would be if I had source-level access to most libs. But it's good to see that we're getting somewhere. As a first exercise I am attempting to extract somewhat of a call graph and class hierarchy (AS3 side only) in order to be able to scour the .ws files for useful information such as what debug commands are available, how to use them and what effects they have (some are trivial, but doing this manually - as I tried - seems to take ages). If you could point me to other places where TW3 fans congregate, it'd be most helpful also. --— Gqxidzjqmj (talk) 09:14, 18 July 2019 (UTC)
- You can try TW3 forums, but they aren't so active these days. — Gilrond (talk) 23:31, 18 July 2019 (UTC)
- Hmm thanks. Not sure that something hosted by CDProjekt is going to work out for these topics. After all they'll want to keep it all hush hush while for us fans it's more important to share findings. Guess in the end I might end up publishing my findings in GitHub or so and hope for them to be found. — Gqxidzjqmj (talk) 08:18, 19 July 2019 (UTC)
- You can try TW3 forums, but they aren't so active these days. — Gilrond (talk) 23:31, 18 July 2019 (UTC)
- Yeah, I came across mentions of Scaleform and it makes sense that this is the actual implementation used. But unlike with ActionScript 3 and SWF for which I even wrote some RCE tools some time ago, I never had any firsthand experience with Scaleform. Of course this also makes analysis of witcher3.exe harder than it would be if I had source-level access to most libs. But it's good to see that we're getting somewhere. As a first exercise I am attempting to extract somewhat of a call graph and class hierarchy (AS3 side only) in order to be able to scour the .ws files for useful information such as what debug commands are available, how to use them and what effects they have (some are trivial, but doing this manually - as I tried - seems to take ages). If you could point me to other places where TW3 fans congregate, it'd be most helpful also. --— Gqxidzjqmj (talk) 09:14, 18 July 2019 (UTC)
- Scaleform is using ActionScript, so parts about GFx_ are about that. — Gilrond (talk) 14:29, 16 July 2019 (UTC)
Some further notes[]
It's clear that many people when thinking of ECMAScript (ECMA-262) think immediately of JavaScript as we know it now. However, in case of ActionScript 3 this is but half the truth. ActionScript 3 is indeed closely related to JavaScript and in fact ActionScript 3 was based on a now abandoned proposal for the fourth edition of ECMA-262 (aka ECMAScript, on which JavaScript in turn is based). The VM churning away in the guts of Adobe Flash is called Tamarin and available as open source (MDN page here). A version of this VM can still be found here.
Independent tools that may be able to tokenize and parse ActionScript3 (and therefore Witcher Script) are:
- as3compile from SWFTools (GitHub project)
— Gqxidzjqmj (talk) 11:30, 16 July 2019 (UTC)