abyteintime / abit

A Byte in Time - A Hat in Time tweaking toolkit
Apache License 2.0
1 stars 1 forks source link

Implement a working UnrealScript disassembler #2

Closed liquidev closed 1 year ago

liquidev commented 1 year ago

To actually inject bytecode into existing functions, we'll need to know where the jumps are to adjust offsets; however that is impossible to do without implementing a disassembler.

Implementing an UnrealScript disassembler is quite complicated since the instructions nest and vary in length. I've been reverse engineering VM opcodes but there are a lot that are unimplemented or very complex with their disassembly being hard to read or unclear as to what an opcode does.

Reversing an opcode means two things:

Given how much more time the second point can take, doing the first without the second seems like a feasible idea to push the project forward.

It would also be nice to have a test suite for the disassembler, with code examples coming from real UnrealScript code, but that is a more far-fetched goal.

liquidev commented 1 year ago

Implemented in d21d14816aaf3c5afeb49206ce70837d2ebe21f3